/* =================================================================
   BANNER HERO - FUNDECIMA (Inspirado en tuhabi.mx)
   Sección montada por React en #banner-hero-root
   Requiere: assets/js/banner-hero-react.js + React 18 + Babel

   ⚠️ IMPORTANTE: La imagen images/banner.png mide 1400 x 484 px.
   El banner usa aspect-ratio 1400/484 para respetar la proporción
   REAL de la imagen (sin estiramientos ni recortes).
   ================================================================= */

.bh-section {
  --bh-azul: #1e3a8a;
  --bh-azul-vivo: #1d4ed8;
  --bh-verde: #059669;
  --bh-verde-oscuro: #047857;
  --bh-tinta: #0f172a;
  --bh-gris: #475569;
  --bh-radius: 24px;

  position: relative;
  max-width: 1720px;   /* Evita banners gigantes en monitores ultra-wide */
  margin: 0 auto;
  padding: 20px 20px 0;
  font-family: 'Poppins', 'Inter', sans-serif;
}

/* ---------- SPINNER DE CARGA (respaldo antes de montar React) ---------- */
.bh-cargando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  color: #64748b;
  font-size: 14px;
}

.bh-cargando__spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  border-top-color: #1e3a8a;
  animation: bhGirar 0.8s linear infinite;
}

@keyframes bhGirar {
  to { transform: rotate(360deg); }
}

/* ---------- BANNER PRINCIPAL ---------- */
.bh-banner {
  position: relative;
  /* Proporción EXACTA de la imagen real (1400 x 484 px):
     el alto se calcula solo y la imagen nunca se deforma */
  aspect-ratio: 1400 / 484;
  min-height: 440px;   /* Piso mínimo para que el texto quepa en pantallas pequeñas */
  border-radius: var(--bh-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-color: #0f2f66; /* Respaldo mientras carga la imagen */
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

/* Overlay degradado SUAVE: garantiza legibilidad del texto
   dejando ver la fotografía con sus píxeles reales */
.bh-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    95deg,
    rgba(10, 45, 95, 0.92) 0%,
    rgba(15, 60, 125, 0.68) 36%,
    rgba(15, 60, 125, 0.18) 62%,
    rgba(15, 60, 125, 0) 85%
  );
}

/* ---------- CONTENIDO (columna izquierda) ---------- */
.bh-contenido {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 46px 48px 112px;
}

.bh-etiqueta {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 12px;
}

.bh-titulo {
  margin: 0 0 16px;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  color: #ffffff;
}

/* "Vida Digna" con efecto marcador verde */
.bh-titulo-destacado {
  padding: 0 8px;
  background: linear-gradient(transparent 62%, rgba(16, 185, 129, 0.5) 62%);
}

.bh-descripcion {
  margin: 0;
  max-width: 560px;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

/* ---------- BOTÓN TESTIMONIOS ---------- */
.bh-acciones {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.bh-boton-testimonios {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--bh-verde);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.38);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bh-boton-testimonios:hover,
.bh-boton-testimonios:focus-visible {
  background: var(--bh-verde-oscuro);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.48);
}

.bh-boton-testimonios:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* ---------- FLECHA SCROLL DOWN (visible solo escritorio grande) ---------- */
.bh-scroll {
  position: absolute;
  left: 36px;
  bottom: 26px;
  z-index: 7;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: #10b981;
  color: #ffffff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.45);
  animation: bhBounce 2.4s ease-in-out infinite;
  transition: background 0.25s ease, transform 0.25s ease;
}

.bh-scroll:hover,
.bh-scroll:focus-visible {
  background: var(--bh-verde-oscuro);
  transform: translateY(-3px);
  animation-play-state: paused;
}

@keyframes bhBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ---------- PANEL BLANCO SUPERPUESTO (frase + estadísticas) ---------- */
.bh-panel {
  position: relative;
  z-index: 6;
  max-width: 940px;
  margin: -76px auto 0;
  padding: 30px 40px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  display: flex;
  align-items: center;
  gap: 36px;
}

.bh-panel-frase {
  flex: 1 1 auto;
  margin: 0;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--bh-tinta);
}

/* Marca "FUNDECIMA." destacada SOLO con color, SIN background */
.bh-panel-marca {
  color: var(--bh-azul-vivo);
  white-space: nowrap;
}

.bh-stats {
  display: flex;
  gap: 16px;
  flex: 0 0 auto;
}

.bh-stat {
  width: 210px;
  padding: 22px 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bh-stat--azul  { background: #dbeafe; }
.bh-stat--verde { background: #d1fae5; }

.bh-stat-numero {
  font-family: 'Poppins', sans-serif;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

.bh-stat--azul  .bh-stat-numero { color: var(--bh-azul); }
.bh-stat--verde .bh-stat-numero { color: #065f46; }

.bh-stat-etiqueta {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.45;
  color: var(--bh-gris);
}

/* ---------- ANIMACIONES DE ENTRADA ---------- */
@keyframes bhFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bh-anim-1 { animation: bhFadeUp 0.7s ease-out 0.05s backwards; }
.bh-anim-2 { animation: bhFadeUp 0.7s ease-out 0.18s backwards; }
.bh-anim-3 { animation: bhFadeUp 0.7s ease-out 0.31s backwards; }
.bh-anim-4 { animation: bhFadeUp 0.7s ease-out 0.44s backwards; }
.bh-panel  { animation: bhFadeUp 0.8s cubic-bezier(0.22, 0.8, 0.36, 1) 0.5s backwards; }

/* ---------- ACCESIBILIDAD: reducir movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .bh-anim-1, .bh-anim-2, .bh-anim-3, .bh-anim-4,
  .bh-panel, .bh-scroll {
    animation: none !important;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .bh-contenido { padding: 42px 36px 108px; }
}

@media (max-width: 1279px) {
  /* El panel puede alcanzar la esquina izquierda: se oculta la flecha */
  .bh-scroll { display: none; }
}

@media (max-width: 992px) {
  .bh-banner { min-height: 460px; }
  .bh-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    margin-top: -70px;
    margin-left: 24px;
    margin-right: 24px;
  }
  .bh-stats { width: 100%; }
  .bh-stat  { flex: 1; width: auto; }
}

@media (max-width: 576px) {
  .bh-section { padding: 12px 12px 0; }
  .bh-banner {
    min-height: 470px;
    /* En móvil la proporción real dejaría el banner muy bajito
       para el texto; se prioriza la zona derecha del collage */
    aspect-ratio: auto;
    background-position: 78% center;
  }
  .bh-contenido { padding: 40px 24px 100px; }
  .bh-panel {
    margin: -60px 12px 0;
    padding: 26px 22px;
    border-radius: 16px;
  }
  .bh-stats { flex-direction: column; }
  .bh-stat  { width: 100%; }
  .bh-boton-testimonios {
    width: 100%;
    justify-content: center;
  }
}