/* ============================================
   QUINTA P.L. - HERO SECTION
   Banner principal full-screen
   ============================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -80px; /* Compensa el padding del body */
}

/* === SLIDER DE IMÁGENES === */

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(135deg, #2d7a3e 0%, #1a1a1a 100%);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0s linear 1.5s;
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
  animation: heroZoomOut 8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1 !important;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Animación suave de dezoom */
@keyframes heroZoomOut {
  0% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* Legacy - mantener para compatibilidad */
@keyframes heroFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroImageLoad {
  0% {
    opacity: 0;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}


/* === OVERLAY === */

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(45, 122, 62, 0.6) 0%,
    rgba(26, 26, 26, 0.7) 100%
  );
  z-index: 2;
}

/* === CONTENIDO === */

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--color-white);
  padding: var(--spacing-xl);
  max-width: 900px;
  /* CRÍTICO PARA LCP: Sin animación, visible inmediatamente */
  opacity: 1 !important;
}

.hero-logo {
  margin-bottom: var(--spacing-xl);
  animation: fadeIn 1.2s ease-out;
}

.hero-logo img {
  max-width: 250px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-title {
  font-family: var(--font-heading);
  /* Fix browser warning: explicit font-size for h1 in section */
  font-size: var(--font-size-3xl) !important;
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin-bottom: var(--spacing-lg);
  line-height: var(--line-height-tight);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  /* CRÍTICO PARA LCP: Sin animación, visible inmediatamente */
  opacity: 1 !important;
  /* Asegurar que el texto se renderice inmediatamente */
  font-display: swap;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-white);
  margin-bottom: var(--spacing-2xl);
  line-height: var(--line-height-relaxed);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 0.95;
  animation: fadeInUp 1.6s ease-out;
}

.hero-content .btn {
  animation: fadeInUp 1.8s ease-out;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === SCROLL INDICATOR === */

.hero-scroll {
  display: none;
}

.hero-scroll-icon {
  font-size: var(--font-size-3xl);
  line-height: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* === RESPONSIVE === */

@media (min-width: 768px) {
  .hero-logo img {
    max-width: 300px;
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-xl);
  }
}

@media (min-width: 1024px) {
  .hero-logo img {
    max-width: 350px;
  }

  .hero-title {
    font-size: var(--font-size-5xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    margin-top: -70px;
  }

  .hero-logo img {
    max-width: 180px;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .hero-scroll {
    bottom: 20px;
  }

  .hero-indicators {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }

  .hero-indicator {
    width: 10px;
    height: 10px;
  }
}

/* Efecto parallax suave (opcional, puede agregarse con JS) */
@media (min-width: 1024px) {
  .hero-slide img {
    transform: scale(1.1);
  }
}
