/* ===== Еловая Опушка — Custom Styles ===== */

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #C9A97E 0%, #b8956a 100%);
  color: #0C1F17;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(201, 169, 126, 0.35);
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 169, 126, 0.5);
  background: linear-gradient(135deg, #d4b88e 0%, #C9A97E 100%);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border: 2px solid rgba(248, 241, 233, 0.6);
  color: #F8F1E9;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  background: rgba(12, 31, 23, 0.2);
}

.btn-outline:hover {
  border-color: #C9A97E;
  color: #C9A97E;
  background: rgba(201, 169, 126, 0.1);
}

/* Header states */
#header {
  background: transparent;
}

#header.scrolled {
  background: rgba(12, 31, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(201, 169, 126, 0.1);
}

#header.menu-open {
  background: rgba(12, 31, 23, 0.98);
}

/* Hero parallax */
.hero-parallax {
  will-change: transform;
}

/* Image frame */
.img-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(201, 169, 126, 0.3);
  border-radius: 1.25rem;
  pointer-events: none;
  z-index: 1;
}

.img-frame {
  position: relative;
}

/* Card gallery (accommodation) */
.card-gallery {
  overflow: hidden;
  background: #0C1F17;
}

.card-gallery-track {
  display: flex;
  height: 100%;
  min-height: inherit;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-gallery-slide {
  flex: 0 0 100%;
  min-height: inherit;
  height: 100%;
}

.card-gallery-slide img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
}

.card-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(12, 31, 23, 0.65);
  border: 1px solid rgba(201, 169, 126, 0.4);
  color: #F8F1E9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
}

.card-gallery:hover .card-gallery-btn,
.card-gallery:focus-within .card-gallery-btn {
  opacity: 1;
}

.card-gallery-btn:hover {
  background: rgba(201, 169, 126, 0.9);
  color: #0C1F17;
  transform: translateY(-50%) scale(1.05);
}

.card-gallery-prev {
  left: 0.75rem;
}

.card-gallery-next {
  right: 0.75rem;
}

@media (max-width: 1023px) {
  .card-gallery-btn {
    opacity: 1;
  }
}

.card-gallery-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.card-gallery-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(248, 241, 233, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-gallery-dot.active {
  background: #C9A97E;
  width: 1.25rem;
  border-radius: 9999px;
}

.card-gallery-counter {
  position: absolute;
  top: 4rem;
  right: 1rem;
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #F8F1E9;
  background: rgba(12, 31, 23, 0.6);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

/* Hero-style gallery (two-story house) */
.card-gallery-hero .card-gallery-counter {
  top: 1rem;
  right: 1rem;
}

.card-gallery-hero .card-gallery-dots-hero {
  bottom: 5.5rem;
}

@media (min-width: 640px) {
  .card-gallery-hero .card-gallery-dots-hero {
    bottom: 6.5rem;
  }
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(201, 169, 126, 0.15);
  border: 1px solid rgba(201, 169, 126, 0.3);
  color: #C9A97E;
  font-size: 0.75rem;
  border-radius: 9999px;
  letter-spacing: 0.03em;
}

/* Room cards */
.room-card {
  padding: 1.5rem;
  background: rgba(12, 31, 23, 0.4);
  border: 1px solid rgba(201, 169, 126, 0.15);
  border-radius: 1rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.room-card:hover {
  border-color: rgba(201, 169, 126, 0.4);
  transform: translateY(-2px);
}

.room-card-lux {
  background: linear-gradient(135deg, rgba(201, 169, 126, 0.12) 0%, rgba(12, 31, 23, 0.5) 100%);
  border-color: rgba(201, 169, 126, 0.35);
}

.room-card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

/* Activity cards */
.activity-card {
  padding: 2rem;
  background: white;
  border-radius: 1.25rem;
  border: 1px solid rgba(12, 31, 23, 0.06);
  box-shadow: 0 4px 24px rgba(12, 31, 23, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.activity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(12, 31, 23, 0.1);
  border-color: rgba(201, 169, 126, 0.3);
}

.activity-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.activity-card:hover .activity-icon {
  transform: scale(1.1);
}

/* Masonry gallery */
.masonry-gallery {
  columns: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .masonry-gallery {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .masonry-gallery {
    columns: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 31, 23, 0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: 1rem;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

.masonry-item:hover::after {
  opacity: 1;
}

/* Carousel */
.carousel-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 126, 0.4);
  color: #0C1F17;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: white;
}

.carousel-btn:hover {
  background: #C9A97E;
  border-color: #C9A97E;
  color: #0C1F17;
}

.review-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(12, 31, 23, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.review-dot.active {
  background: #C9A97E;
  width: 1.5rem;
  border-radius: 9999px;
}

/* Contact form */
.contact-form {
  background: rgba(26, 61, 46, 0.5);
  border: 1px solid rgba(201, 169, 126, 0.2);
  border-radius: 1.5rem;
  padding: 2rem;
}

@media (min-width: 640px) {
  .contact-form {
    padding: 2.5rem;
  }
}

.form-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(248, 241, 233, 0.8);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(12, 31, 23, 0.5);
  border: 1px solid rgba(201, 169, 126, 0.2);
  border-radius: 0.75rem;
  color: #F8F1E9;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
  color: rgba(248, 241, 233, 0.35);
}

.form-input:focus {
  outline: none;
  border-color: #C9A97E;
  box-shadow: 0 0 0 3px rgba(201, 169, 126, 0.15);
}

.form-input.error {
  border-color: #e57373;
}

.contact-info-card {
  padding: 1.5rem;
  background: rgba(26, 61, 46, 0.4);
  border-radius: 1.25rem;
  border: 1px solid rgba(201, 169, 126, 0.15);
}

/* Max messenger */
.max-icon {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.max-icon-sm {
  width: 1.5rem;
  height: 1.5rem;
}

.max-btn {
  background: linear-gradient(135deg, #5eb3f6 0%, #8b5cf6 50%, #7c3aed 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.max-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
  filter: brightness(1.05);
}

.max-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(94, 179, 246, 0.45), 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-max 2.5s ease-in-out infinite;
}

.max-float .max-icon {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.max-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(94, 179, 246, 0.55), 0 6px 20px rgba(124, 58, 237, 0.45);
}

@keyframes pulse-max {
  0%, 100% {
    box-shadow: 0 6px 24px rgba(94, 179, 246, 0.45), 0 4px 16px rgba(124, 58, 237, 0.35);
  }
  50% {
    box-shadow: 0 8px 32px rgba(94, 179, 246, 0.6), 0 0 0 8px rgba(139, 92, 246, 0.12);
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 31, 23, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: #F8F1E9;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Scroll reveal animations */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero initial animation (no JS needed for first paint) */
#hero .reveal {
  animation: hero-fade-in 1s ease forwards;
}

#hero .reveal-delay-1 { animation-delay: 0.15s; }
#hero .reveal-delay-2 { animation-delay: 0.3s; }
#hero .reveal-delay-3 { animation-delay: 0.45s; }
#hero .reveal-delay-4 { animation-delay: 0.6s; }

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes bounce-slow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.animate-bounce-slow {
  animation: bounce-slow 2s ease-in-out infinite;
}

/* Feature icon */
.feature-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Selection */
::selection {
  background: rgba(201, 169, 126, 0.4);
  color: #0C1F17;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F8F1E9;
}

::-webkit-scrollbar-thumb {
  background: #C9A97E;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  #hero .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .max-float {
    animation: none;
  }

  .hero-parallax {
    transform: none !important;
  }
}
