/* ──────────────────────────────────────────────────────────
   hero-showcase.css — Hero institucional 2026 (portada)
   Composición: foto full-bleed + panel de cristal a la izquierda
   + fila de 4 tarjetas de resumen + indicador de scroll.
   Solo se carga en la home (pageType === 'home').
   ────────────────────────────────────────────────────────── */

:root {
  --topbar-h: 47px;   /* alto real de .topbar (row 46px + borde) */
  --hdr-h:   119px;   /* alto real de .navbar__row (118px + borde) */
}
@media (max-width: 1280px) { :root { --hdr-h: 97px; } }
@media (max-width: 1120px) { :root { --topbar-h: 45px; --hdr-h: 83px; } }

/* ════════════════════════════════════════════════════════════
   1. LIENZO — la foto ocupa la pantalla bajo el topbar y el
      header transparente flota encima (de ahí el margin negativo)
   ════════════════════════════════════════════════════════════ */
.hero-showcase {
  position: relative;
  isolation: isolate;
  display: flex;
  overflow: hidden;
  background: var(--primary);
  margin-top: calc(-1 * var(--hdr-h));
  /* Llena la pantalla bajo el topbar, pero crece si el contenido no entra
     (pantallas bajas: 1366x700, laptops 16:10 pequenas, etc.). */
  min-height: 620px;
  min-height: max(620px, calc(100vh - var(--topbar-h)));
  min-height: max(620px, calc(100svh - var(--topbar-h)));
}

.hero-showcase__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  pointer-events: none;
  user-select: none;
}

/* Velo doble: aclara la izquierda (legibilidad del panel) y
   oscurece el pie (legibilidad de tarjetas y scroll). */
.hero-showcase__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      rgba(255,255,255,0.52) 0%,
      rgba(255,255,255,0.26) 15%,
      rgba(255,255,255,0.07) 28%,
      rgba(255,255,255,0) 40%),
    linear-gradient(180deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0) 13%),
    linear-gradient(180deg,
      rgba(4,22,48,0) 62%,
      rgba(4,22,48,0.16) 100%);
}

.hero-showcase .hero-showcase__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1640px;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.6vw, 46px);
  padding-top: calc(var(--hdr-h) + clamp(10px, 3vh, 34px));
  padding-bottom: clamp(12px, 2.2vh, 26px);
  gap: clamp(10px, 2vh, 26px);
}

/* ════════════════════════════════════════════════════════════
   2. PANEL DE CRISTAL — badge MINEDU + titular + CTA
   ════════════════════════════════════════════════════════════ */
.hero-showcase__panel {
  position: relative;
  z-index: 0;
  width: min(100%, 624px);
  padding: clamp(18px, 2.2vh, 30px) clamp(22px, 2.6vw, 40px) clamp(20px, 2.4vh, 32px);
}

/* Capa de cristal: va detrás del texto y se disuelve hacia la derecha, de
   modo que nunca llega a velar a las personas de la foto. */
.hero-showcase__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.55);
  background: linear-gradient(112deg,
    rgba(255,255,255,0.70) 0%,
    rgba(255,255,255,0.54) 42%,
    rgba(255,255,255,0.22) 70%,
    rgba(255,255,255,0.04) 100%);
  box-shadow: 0 30px 70px -48px rgba(4,22,48,0.42);
  backdrop-filter: blur(11px) saturate(1.04);
  -webkit-backdrop-filter: blur(11px) saturate(1.04);
  -webkit-mask-image: linear-gradient(104deg, #000 0%, #000 44%, rgba(0,0,0,0.45) 68%, rgba(0,0,0,0.12) 85%, rgba(0,0,0,0) 97%);
          mask-image: linear-gradient(104deg, #000 0%, #000 44%, rgba(0,0,0,0.45) 68%, rgba(0,0,0,0.12) 85%, rgba(0,0,0,0) 97%);
}

/* Retícula de puntos decorativa (esquina superior izquierda) */
.hero-showcase__panel::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 18px;
  width: 100px;
  height: 34px;
  background-image: radial-gradient(rgba(11,37,69,0.26) 1.4px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.8;
  pointer-events: none;
}

.hero-showcase__minedu {
  display: block;
  width: clamp(178px, 13vw, 216px);
  height: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 32px -20px rgba(4,22,48,0.55);
  margin-bottom: clamp(12px, 1.8vh, 22px);
  object-fit: contain;
}

.hero-showcase__panel > * { position: relative; }

.hero-showcase__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.05rem, 3.55vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--primary);
}
.hero-showcase__title span { color: var(--primary-steel); }

.hero-showcase__rule {
  display: block;
  width: 74px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  margin: clamp(12px, 1.6vh, 20px) 0 clamp(10px, 1.3vh, 16px);
}

.hero-showcase__description {
  margin: 0;
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: clamp(0.86rem, 0.95vw, 0.98rem);
  font-weight: 500;
  line-height: 1.62;
}

.hero-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(14px, 2vh, 26px);
}

.hero-showcase__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.hero-showcase__button svg { transition: transform var(--t-fast); }
.hero-showcase__button:hover svg { transform: translateX(4px); }

.hero-showcase__button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 22px 36px -22px rgba(214,40,40,0.9);
}
.hero-showcase__button--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

.hero-showcase__button--secondary {
  background: rgba(255,255,255,0.82);
  color: var(--primary);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 18px 34px -26px rgba(4,22,48,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-left: 8px;
}
.hero-showcase__button--secondary:hover {
  background: #fff;
  color: var(--primary);
  transform: translateY(-2px);
}
.hero-showcase__button--secondary:hover svg { transform: none; }

.hero-showcase__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  flex: 0 0 auto;
}
.hero-showcase__play svg { fill: currentColor; }

/* ════════════════════════════════════════════════════════════
   3. TARJETAS DE RESUMEN — pie del hero
   ════════════════════════════════════════════════════════════ */
.hero-showcase__stats {
  margin-top: auto;
  margin-inline: auto;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1vw, 16px);
}

.hero-showcase__stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(14px, 1.4vw, 20px) clamp(14px, 1.5vw, 22px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.74);
  box-shadow: 0 26px 52px -34px rgba(4,22,48,0.7);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  color: var(--primary);
}
.hero-showcase__stat--featured {
  background: linear-gradient(140deg, var(--primary-light) 0%, var(--primary) 58%, var(--primary-dark) 100%);
  border-color: rgba(255,255,255,0.30);
  color: #fff;
}

.hero-showcase__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: rgba(11,37,69,0.08);
  color: var(--primary);
}
.hero-showcase__stat-icon--red {
  background: rgba(214,40,40,0.10);
  color: var(--accent);
}
.hero-showcase__stat--featured .hero-showcase__stat-icon {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.hero-showcase__stat > div { min-width: 0; }

.hero-showcase__stat strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.9vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: inherit;
}
.hero-showcase__stat > div > span {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.7rem, 0.82vw, 0.84rem);
  line-height: 1.22;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-showcase__stat b { color: var(--primary-steel); }
.hero-showcase__stat--featured b { color: #fff; }

.hero-showcase__stat p {
  margin: 6px 0 0;
  font-size: clamp(0.68rem, 0.76vw, 0.76rem);
  font-weight: 500;
  line-height: 1.42;
  color: var(--ink-soft);
}
.hero-showcase__stat--featured p { color: rgba(255,255,255,0.84); }

/* ════════════════════════════════════════════════════════════
   4. INDICADOR DE SCROLL
   ════════════════════════════════════════════════════════════ */
.hero-showcase__scroll {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  text-shadow: 0 1px 12px rgba(255,255,255,0.95), 0 0 4px rgba(255,255,255,0.9);
  transition: color var(--t-fast);
}
.hero-showcase__scroll:hover { color: var(--accent); }
.hero-showcase__scroll span {
  position: relative;
  width: 17px;
  height: 27px;
  border: 2px solid rgba(11,37,69,0.75);
  background: rgba(255,255,255,0.5);
  box-shadow: 0 2px 10px rgba(255,255,255,0.8);
  border-radius: 999px;
  flex: 0 0 auto;
}
.hero-showcase__scroll span::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2.5px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: hero-scroll-dot 1.9s ease-in-out infinite;
}
@keyframes hero-scroll-dot {
  0%, 100% { opacity: 0; transform: translate(-50%, 0); }
  40%      { opacity: 1; transform: translate(-50%, 2px); }
  75%      { opacity: 0; transform: translate(-50%, 10px); }
}

/* ════════════════════════════════════════════════════════════
   5. RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .hero-showcase__stat { gap: 11px; padding: 14px 15px; }
  .hero-showcase__stat-icon { width: 46px; height: 46px; border-radius: 13px; }
}

@media (max-width: 1120px) {
  .hero-showcase { height: auto; min-height: 0; max-height: none; }
  .hero-showcase .hero-showcase__inner {
    padding-top: calc(var(--hdr-h) + 26px);
    padding-bottom: 30px;
    gap: 26px;
  }
  .hero-showcase__background { object-position: 62% 45%; }
  .hero-showcase__panel { width: 100%; max-width: 620px; }
  .hero-showcase__panel::after {
    -webkit-mask-image: linear-gradient(102deg, #000 0%, #000 74%, rgba(0,0,0,0.6) 92%, rgba(0,0,0,0.25) 100%);
            mask-image: linear-gradient(102deg, #000 0%, #000 74%, rgba(0,0,0,0.6) 92%, rgba(0,0,0,0.25) 100%);
  }
  .hero-showcase__stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero-showcase__panel { padding: 22px 20px 26px; }
  .hero-showcase__panel::after {
    border-radius: 22px;
    -webkit-mask-image: none;
            mask-image: none;
    background: linear-gradient(150deg, rgba(255,255,255,0.66), rgba(255,255,255,0.34));
  }
  .hero-showcase__panel::before { display: none; }
  .hero-showcase__title { font-size: clamp(1.75rem, 8vw, 2.35rem); }
  .hero-showcase__description { max-width: none; }
  .hero-showcase__actions { gap: 10px; }
  .hero-showcase__button { height: 46px; padding: 0 20px; font-size: 0.7rem; }
  .hero-showcase__button--secondary { padding-left: 7px; }
  .hero-showcase__stats { grid-template-columns: 1fr; gap: 10px; }
  .hero-showcase__stat { padding: 13px 14px; }
  .hero-showcase__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-showcase__scroll span::after { animation: none; opacity: 1; }
}

/* Pantallas de poca altura: compactar para que el hero siga entrando */
@media (min-width: 1121px) and (max-height: 820px) {
  .hero-showcase__title { font-size: clamp(1.95rem, 3vw, 3rem); }
  .hero-showcase__minedu { width: clamp(168px, 11.5vw, 196px); }
  .hero-showcase__button { height: 46px; padding: 0 22px; }
  .hero-showcase__stat { padding: 12px 14px; }
  .hero-showcase__stat-icon { width: 44px; height: 44px; border-radius: 12px; }
}
@media (max-height: 760px) {
  .hero-showcase__scroll { display: none; }
}
