/* VARIABLES Y TIPOGRAFÍA BASE */
:root {
  --verde-marca: #7ed957;
  --azul-oscuro: #0a2e46 !important;
  --rojo-medico: #d9534f;
  /* Color específico para Primeros Auxilios */
}

/* BANNER PRINCIPAL (HERO) */
.banner-curso {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Imagen sugerida de montaña/rescate */
  background-image: url("recursos/6.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 100px 0;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 46, 70, 0.7),
    rgba(10, 46, 70, 0.95)
  );
  z-index: 1;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
}

.btn-verde {
  background-color: var(--verde-marca);
  color: var(--azul-oscuro);
  border: 2px solid var(--verde-marca);
  transition: all 0.3s;
}

.btn-verde:hover {
  background-color: transparent;
  color: var(--verde-marca);
}

/* SCROLLYTELLING: RUTA MÉDICA */
.contenedor-malla-wafa {
  position: relative;
  height: 2600px;

  /* Fondo sutilmente cálido */
  overflow: hidden;
}

.path-malla {
  fill: none;
  stroke: var(--rojo-medico);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-opacity: 0.2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: none !important;
}

.botiquin-tracker {
  width: 50px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  filter: drop-shadow(0 5px 8px rgba(217, 83, 79, 0.4));
  will-change: transform;
}

.punto-malla {
  position: absolute;
  opacity: 0;
  transform: translateY(40px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}

.punto-malla.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tarjeta-modulo {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border-left: 6px solid var(--rojo-medico);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  max-width: 400px;
}

/* ACORDEÓN FAQ */
.accordion-button {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  background-color: white;
  color: var(--azul-oscuro);
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--rojo-medico);
  color: white;
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

.accordion-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  border-radius: 8px !important;
  overflow: hidden;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .banner-curso {
    background-attachment: scroll;
    padding: 60px 0;
    min-height: auto;
  }

  .banner-curso h1 {
    font-size: 2rem !important;
  }

  .contenedor-malla-wafa {
    height: 1900px;
  }

  .path-malla {
    stroke-width: 15;
  }

  .punto-malla {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(40px) scale(0.9) !important;
    width: 90% !important;
  }

  .punto-malla.is-visible {
    transform: translateX(-50%) translateY(0) scale(1) !important;
  }

  .tarjeta-modulo {
    max-width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* 1. Arreglo del Banner (Evita el zoom gigante y deforme en iPhone) */
  .banner-curso {
    background-attachment: scroll !important;
    background-position: center top !important;
    padding: 60px 0 !important;
    min-height: auto !important;
  }

  .banner-curso h1 {
    font-size: 2rem !important;
  }

  /* 2. Altura del recorrido (Le damos más aire para que no se choquen las tarjetas) */
  .contenedor-malla-wafa {
    height: 2400px !important;
  }

  .path-malla {
    stroke-width: 25 !important;
  }

  /* Línea más gruesa en móvil para que se note */

  /* 3. Forzar alineación al CENTRO PERFECTO (Ignora el left/right del HTML) */
  .punto-malla {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(40px) scale(0.9) !important;
    width: 90% !important;
    max-width: 380px !important;
  }

  /* Animación de entrada centrada en móvil */
  .punto-malla.is-visible {
    transform: translateX(-50%) translateY(0) scale(1) !important;
  }

  .tarjeta-modulo {
    max-width: 100% !important;
    text-align: center !important;
    padding: 15px !important;
  }

  /* 4. Arreglo de la tarjeta de Datos Duros (Rompe las líneas divisorias verticales) */
  .glass-panel .border-end {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding-bottom: 15px !important;
  }

  .glass-panel h3 {
    font-size: 1.3rem !important;
  }
}

.menu-hover:hover {
  color: #0077b6 !important;
}

.social-link:hover {
  background-color: #f8f9fa !important;
  color: #0077b6 !important;
  transform: scale(1.1);
}

.menu-hover:hover {
  color: #0077b6 !important;
}

.social-link:hover {
  background-color: #f8f9fa !important;
  color: #0077b6 !important;
  transform: scale(1.1);
}

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

.site-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border-color);
}

.slide-link {
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.slide-link:hover {
  color: var(--primary-blue) !important;
  padding-left: 8px;
}

.social-icon {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--primary-blue);
}

/* FIX: Contraste del Footer */
.site-footer p,
.site-footer .text-muted,
.site-footer .slide-link,
.site-footer .social-icon {
  color: #e0e0e0 !important;
  /* Gris ultra claro para máxima legibilidad */
}

.site-footer h2,
.site-footer h4,
.site-footer h5 {
  color: #ffffff !important;
}
