/**
 * AllinBand — Estilos de Secciones
 * Estilos específicos para cada sección de la landing
 */

/* ========================================
   NAVEGACIÓN
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.75); /* Fondo blanco semitransparente */
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%); /* Efecto acrílico */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.navbar-logo {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: all var(--transition-base);
}

.navbar-logo:hover {
  color: var(--color-cyan); /* Cambia el texto a celeste */
  transform: translateY(-1px);
}

.navbar-logo-icon {
  height: 40px;
  width: auto;
  /* Filtro eliminado para mostrar colores originales */
  transition: filter var(--transition-base);
}

.navbar-logo:hover .navbar-logo-icon {
  /* Efecto hover eliminado */
}

.navbar-menu {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  position: relative;
}

.navbar-link {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-gray-700);
  transition: color var(--transition-base);
  padding-bottom: var(--space-2);
}

.navbar-link:hover {
  color: var(--color-primary);
}

.navbar-link.active {
  color: var(--color-cyan);
}

/* Línea indicadora animada */
.navbar-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.5);
  pointer-events: none;
}

.navbar-indicator.visible {
  opacity: 1;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 767px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(
      255,
      255,
      255,
      0.85
    ); /* Más opaco en móvil para legibilidad */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    flex-direction: column;
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  /* Ocultar indicador en móvil */
  .navbar-indicator {
    display: none;
  }
}

/* ========================================
   HERO SECTION (US12, US14)
   ======================================== */

.hero {
  padding-top: calc(var(--section-padding-y) + 60px); /* Offset navbar */
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(37, 99, 235, 0.12) 50%,
    rgba(6, 182, 212, 0.08) 100%
  ); /* Gradiente violeta → azul → celeste */
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-text {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-text {
    text-align: left;
  }
}

.hero-title {
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--text-6xl);
  }
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-gray-600);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  max-width: 500px;
  width: 100%;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ========================================
   HEARTBEAT MONITOR ANIMATION
   ======================================== */

.heartbeat-monitor {
  position: absolute;
  width: 300px;
  height: 146px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.4;
  z-index: 0;
  overflow: hidden;
}

.heartbeat-line {
  width: 100%;
  height: 100%;
  color: var(--color-primary);
  position: relative;
}

.heartbeat-line svg {
  width: 100%;
  height: 100%;
}

/* Efecto de revelado progresivo usando clip-path */
.heartbeat-monitor::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    transparent 20%,
    rgba(255, 255, 255, 1) 100%
  );
  animation: heartbeatReveal 2.5s ease-in-out infinite;
  z-index: 1;
}

/* Asegurar que la imagen esté sobre la animación */
.hero-image img {
  position: relative;
  z-index: 1;
}

/* Animación de revelado del pulso */
@keyframes heartbeatReveal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsive: Ajustar tamaño en móviles */
@media (max-width: 767px) {
  .heartbeat-monitor {
    width: 200px;
    height: 97px;
  }
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .heartbeat-monitor {
    display: none;
  }
}

/* ========================================
   SECCIÓN "CÓMO FUNCIONA" (US13)
   ======================================== */

.how-it-works-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
  align-items: center;
  margin-top: var(--space-12);
}

@media (min-width: 992px) {
  .how-it-works-content {
    grid-template-columns: 1fr 1fr;
  }
}

.how-it-works-image {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  order: 2; /* En móvil, la imagen va después de los pasos */
}

@media (min-width: 992px) {
  .how-it-works-image {
    order: 1; /* En desktop, la imagen va primero (izquierda) */
  }
}

.how-it-works-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-base);
}

.how-it-works-image img:hover {
  transform: scale(1.02);
}

.how-it-works-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  order: 1; /* En móvil, los pasos van primero */
}

@media (min-width: 992px) {
  .how-it-works-steps {
    order: 2; /* En desktop, los pasos van después (derecha) */
  }
}

@media (min-width: 768px) {
  .how-it-works-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin: 0 auto var(--space-6);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.step-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.step-description {
  color: var(--color-gray-600);
}

/* Conectores entre pasos (desktop) */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 30px;
    right: -40px;
    font-size: var(--text-3xl);
    color: var(--color-primary-alpha);
  }
}

/* ========================================
   SECCIÓN DE BENEFICIOS (US12, US14)
   ======================================== */

.section-with-background {
  position: relative;
  background-image: url("../assets/images/ancianos-haciendo-deporte.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-with-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(249, 250, 251, 0.78) 100%
  );
  z-index: 0;
}

.section-with-background .container {
  position: relative;
  z-index: 1;
}

/* Efecto acrílico en las tarjetas de esta sección */
.section-with-background .card {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-with-background .card:hover {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.benefits-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-list {
  max-width: 800px;
  margin: var(--space-12) auto 0;
}

.faq-item {
  margin-bottom: var(--space-4);
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: var(--space-6);
  background-color: var(--color-white);
  border: none;
  text-align: left;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-black);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-base);
}

.faq-question:hover {
  background-color: var(--color-gray-50);
}

.faq-icon {
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 var(--space-6) var(--space-6);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
}

/* ========================================
   CTA FINAL
   ======================================== */

.cta-section {
  text-align: center;
}

.cta-title {
  margin-bottom: var(--space-6);
}

.cta-form {
  max-width: 600px;
  margin: var(--space-8) auto 0;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-section h3 {
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  color: var(--color-gray-400);
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-700);
  text-align: center;
  color: var(--color-gray-500);
  font-size: var(--text-sm);
}

/* ========================================
   SECCIÓN DE TÍTULO CENTRADO
   ======================================== */

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
}

/* ========================================
   VARIANTES DE SECCIÓN CON COLORES ANÁLOGOS
   ======================================== */

.section-cyan {
  background: linear-gradient(
    135deg,
    rgba(6, 182, 212, 0.05) 0%,
    rgba(6, 182, 212, 0.1) 100%
  );
}

.section-violet {
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.05) 0%,
    rgba(139, 92, 246, 0.1) 100%
  );
}

.section-gradient {
  background: var(--gradient-vibrant);
  color: var(--color-white);
}

.section-gradient h2,
.section-gradient h3 {
  color: var(--color-white);
}

.section-gradient .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Efectos de acentos con colores análogos */
.accent-line {
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-6);
}

.accent-line-left {
  margin: 0 0 var(--space-6) 0;
}
