/* ================================
   HERO PREMIUM CON SLIDER
   Versión compatible con Customizer
================================ */

/* ========================================
   BASE DEL HERO
======================================== */
.hero {
  position: relative;
  min-height: 100vh; /* Se modifica dinámicamente desde el Customizer */
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ========================================
   SLIDER DE IMÁGENES
======================================== */

/* Contenedor del slider */
.hero-media-slider {
  position: absolute;
  inset: 0;
}

/* Cada slide individual */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Leyenda de la imagen (esquina superior derecha) */
.hero-slide-caption {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
}

/* ========================================
   OVERLAY
======================================== */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 1;
  /* El gradiente se modifica dinámicamente desde el Customizer */
}

/* ========================================
   CONTENIDO DEL HERO
======================================== */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 1.5rem;
  color: #fff;
}

/* ========================================
   TÍTULO
======================================== */
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards;
}

.hero-title span {
  color: #e0f2ff; /* Se modifica dinámicamente desde el Customizer */
}

/* ========================================
   SUBTÍTULO
======================================== */
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0;
  max-width: 720px;
  margin: 0 auto 2rem;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.15s;
}

/* ========================================
   BOTÓN CTA (CALL TO ACTION)
======================================== */
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.4rem; /* Se modifica dinámicamente */
  font-size: 1rem; /* Se modifica dinámicamente */
  font-weight: 600;
  color: #fff; /* Se modifica dinámicamente */
  background: #25D366; /* Se modifica dinámicamente */
  border-radius: 999px; /* Se modifica dinámicamente */
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: 
    heroFadeUp 0.8s ease forwards 0.3s,
    ctaPulse 3s 1.1s infinite;
}

@media (hover: hover) {
  .hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(37, 211, 102, 0.55);
  }
}

/* Icono del botón */
.hero-cta i {
  transition: transform 0.25s ease;
}

@media (hover: hover) {
  .hero-cta:hover i {
    transform: translateX(3px);
  }
}

/* ========================================
   ENLACE DE LOGIN
======================================== */
.login-link-container {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.45s;
}

.login-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.login-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.login-link i {
  transition: transform 0.25s ease;
}

.login-link:hover i {
  transform: scale(1.1);
}

/* ========================================
   CONTROLES DEL SLIDER (PUNTOS)
======================================== */
.hero-slider-dots {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 0.8s ease forwards 0.6s;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-dot:hover {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero-dot:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.hero-dot.active {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ========================================
   ANIMACIONES
======================================== */
@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ctaPulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); 
  }
  70% { 
    box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); 
  }
}

/* ========================================
   ACCESIBILIDAD
======================================== */

/* Clase para ocultar elementos visualmente pero mantenerlos para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Mejorar el foco visible en elementos interactivos */
.hero-cta:focus,
.login-link:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
  .hero-content {
    padding: 1rem;
  }

  .hero-slide-caption {
    top: 15px;
    right: 15px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-slider-dots {
    gap: 10px;
    margin-top: 1.5rem;
  }

  .hero-dot {
    width: 10px;
    height: 10px;
  }

  .hero-cta {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }

  .login-link-container {
    margin-top: 1.2rem;
  }

  .login-link {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-slide-caption {
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .hero-cta {
    padding: 0.8rem 1.6rem;
    font-size: 0.9rem;
  }

  .hero-slider-dots {
    gap: 8px;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
  }
}

/* ========================================
   OPTIMIZACIÓN DE RENDIMIENTO
======================================== */

/* Reducir animaciones en dispositivos con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .login-link-container,
  .hero-slider-dots {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-cta {
    animation: none;
  }

  .hero-dot,
  .hero-cta,
  .login-link,
  .hero-cta i,
  .login-link i {
    transition: none;
  }
}

/* Will-change para optimizar transiciones */
.hero-slide {
  will-change: opacity;
}

.hero-cta,
.hero-dot,
.login-link {
  will-change: transform;
}

/* ========================================
   MODO OSCURO (opcional)
======================================== */
@media (prefers-color-scheme: dark) {
  /* Los estilos ya están optimizados para fondos oscuros */
  /* Pero puedes agregar ajustes adicionales si es necesario */
}

/* ========================================
   FIN DEL CSS
======================================== */