/* =========================
   GLOBAL
========================= */

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: #C5A059;
  color: white;
}

/* =========================
   HERO BACKGROUND
========================= */

.hero-bg {
  background: url('/attached_assets/generated_images/Banner.png');
  background-size: cover;
  background-position: center;
}

/* =========================
   HERO CAROUSEL (FIX DEFINITIVO)
========================= */

.hero-carousel {
  position: relative;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.slide[hidden] {
  display: none !important;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Asegura que el contenido interno use todo el alto del hero */
.slide > div {
  min-height: 100%;
}

/* =========================
   ZOOM IMAGEN ACTIVA
========================= */

.scale-img {
  transform: scale(1);
}

.slide.active .scale-img {
  animation: zoom 12s ease forwards;
}

@keyframes zoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

/* =========================
   NAVEGACIÓN CAROUSEL
========================= */

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  border: none;
  font-size: 28px;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 20;
  border-radius: 8px;
}

.nav.prev {
  left: 20px;
}

.nav.next {
  right: 20px;
}

.nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* =========================
   DOTS
========================= */

.dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
}

.dot {
  width: 10px;
  height: 10px;
  background: white;
  opacity: 0.5;
  border-radius: 9999px;
  cursor: pointer;
}

.dot.active {
  opacity: 1;
  transform: scale(1.2);
}

/* =========================
   BOTONES
========================= */

.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1ebe5d);
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.btn-whatsapp:hover {
  opacity: 0.9;
}

/* =========================
   ANIMACIONES DE CONTENIDO
========================= */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animaciones solo en el slide activo */
.slide .animate-fade-in,
.slide .animate-slide-up,
.slide .animate-slide-up-delay,
.slide .animate-slide-up-delay-2 {
  opacity: 0;
}

.slide.active .animate-fade-in {
  animation: fade-in 0.8s ease-out both;
}

.slide.active .animate-slide-up {
  animation: slide-up 0.8s ease-out both;
  animation-delay: 0.2s;
}

.slide.active .animate-slide-up-delay {
  animation: slide-up 0.8s ease-out both;
  animation-delay: 0.4s;
}

.slide.active .animate-slide-up-delay-2 {
  animation: slide-up 0.8s ease-out both;
  animation-delay: 0.6s;
}

/* =========================
   STATS / HOVERS
========================= */

.stat-item {
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
}

/* =========================
   NAVBAR SCROLL
========================= */

.nav-scrolled {
  border-color: rgb(229 231 235);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .nav {
    display: none;
  }
}

/* =========================
   POPUP ROV – FIX DEFINITIVO
========================= */

#popup-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#popup-overlay.popup-open {
  opacity: 1;
  pointer-events: auto;
}

/* Popup box animado */
#popup-box {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

#popup-box .header {
  height: 120px; /* antes 180+ */
}


#popup-overlay.popup-open #popup-box {
  transform: scale(1);
  opacity: 1;
}

/* Lock scroll */
body.popup-active {
  overflow: hidden;
}

/* =========================
   CAROUSEL MEJORADO
========================= */
.slide {
  transition: opacity 0.7s ease;
}
.dot {
  transition: all 0.3s ease;
  width: 8px;
  height: 8px;
}
.dot.active {
  width: 24px;
  border-radius: 4px;
  background: #C5A059;
  opacity: 1;
}
.nav {
  transition: all 0.2s ease;
  font-size: 32px;
  padding: 8px 16px;
}