/* ====================================================================
   CENFIC · CAPA DE PORTADA (REDISEÑO V2)
   --------------------------------------------------------------------
   Se carga DESPUÉS de base.css, premium.css e inicio.css:
     base → premium → inicio → portada
   Aquí vive solo el nuevo acabado de la cabecera y del hero:
   fotografía institucional, dorado más luminoso, botones con icono,
   tarjetas de nivel y panel del simulador.
   Quitando el <link> de este archivo, la página vuelve al diseño anterior.
==================================================================== */


/* ====================================================================
   01. PALETA
   Dorado más cálido y luminoso, y fondo azul más profundo.
==================================================================== */

:root {
  /* Dorado de marca (versión luminosa) */
  --cenfic-gold: #E3C07A;
  --cenfic-gold-2: #B98D3D;
  --cenfic-gold-soft: #F6E3B4;
  --cenfic-gold-glow: rgba(227, 192, 122, 0.32);

  /* Azules del rediseño */
  --azul-panel: rgba(13, 42, 80, 0.72);
  --azul-linea: rgba(120, 170, 235, 0.22);
  --azul-linea-2: rgba(140, 185, 245, 0.38);

  /* --------------------------------------------------------------
     FOTOGRAFÍA DEL HERO
     Foto del Palacio de Justicia, ya recortada, reducida y virada a
     azul noche. Para cambiarla por otra, deja el archivo en
     shared/img/ y cambia SOLO esta línea. Queda también la
     ilustración vectorial de reserva:
       --hero-foto: url("../../../shared/img/hero-institucional.svg");
  -------------------------------------------------------------- */
  --hero-foto: url("../../../shared/img/hero-palacio.jpg");
}

body {
  background:
    radial-gradient(1200px 900px at 86% 6%, rgba(40, 100, 180, 0.26), transparent 62%),
    linear-gradient(162deg, #08203E 0%, #071A33 48%, #050F22 100%);
  background-attachment: fixed;
}


/* ====================================================================
   02. CABECERA
   Franja oscura continua con la marca sobre un bloque más denso y
   filo dorado inferior.
==================================================================== */

.site-header {
  background:
    linear-gradient(90deg,
      rgba(3, 11, 24, 0.97) 0%,
      rgba(3, 11, 24, 0.95) 24%,
      rgba(5, 18, 38, 0.74) 33%,
      rgba(5, 18, 38, 0.52) 100%);
  border-bottom: 1px solid rgba(227, 192, 122, 0.16);
}

/* El desenfoque de premium.css solo se activaba al desplazar: ahora
   acompaña a la barra desde el inicio. */
.site-header::before {
  opacity: 1;
}

.site-header.is-stuck {
  background:
    linear-gradient(90deg,
      rgba(3, 11, 24, 0.99) 0%,
      rgba(3, 11, 24, 0.97) 26%,
      rgba(5, 18, 38, 0.92) 40%,
      rgba(5, 18, 38, 0.88) 100%);
  border-bottom-color: rgba(227, 192, 122, 0.26);
}

.site-header .brand-legend {
  color: #C8D6E8;
}

/* --- Enlaces del menú --- */
.site-nav a:not(.nav-cta) {
  font-weight: 500;
  color: #DCE7F6;
}

/* --- Botón "Simulador Examen": rectangular y dorado --- */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.55vw, 10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 240, 205, 0.45);
  background: linear-gradient(135deg, #F4DA9C 0%, #D9AF5F 48%, #B98D3D 100%);
  color: #0A1A30 !important;
  font-weight: 700 !important;
  box-shadow:
    0 12px 26px rgba(185, 141, 61, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.nav-cta:hover {
  filter: brightness(1.05);
  box-shadow:
    0 16px 32px rgba(185, 141, 61, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.nav-cta svg {
  width: clamp(13px, 1.02vw, 18px);
  height: auto;
  flex-shrink: 0;
}


/* ====================================================================
   03. HERO · FOTOGRAFÍA INSTITUCIONAL
   Dos capas propias: la imagen (::before) y el velo azul (::after).
   Ambas suben por detrás de la cabecera.
==================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(44px, 5.2vw, 84px) clamp(66px, 8.4vw, 120px);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  /* Arranca bajo la cabecera para que la bandera no quede tapada */
  top: 0;
  right: 0;
  bottom: 0;
  /* La fotografía ocupa la mitad derecha: así el edificio se ve
     completo y el titular nunca queda encima de la piedra. */
  left: 22%;
  background-image: var(--hero-foto);
  /* Encuadre: sube o baja este porcentaje para desplazar el edificio */
  background-position: 56% center;
  background-size: cover;
  background-repeat: no-repeat;
  /* Su borde izquierdo se funde con el fondo azul */
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%, rgba(0, 0, 0, 0.30) 10%, rgba(0, 0, 0, 0.82) 26%, #000 42%);
  mask-image: linear-gradient(90deg,
      transparent 0%, rgba(0, 0, 0, 0.30) 10%, rgba(0, 0, 0, 0.82) 26%, #000 42%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--header-real, 96px));
  right: 0;
  bottom: 0;
  left: 0;
  background:
    linear-gradient(90deg,
      rgba(5, 17, 36, 0.94) 0%,
      rgba(6, 22, 44, 0.74) 34%,
      rgba(7, 26, 54, 0.36) 62%,
      rgba(9, 32, 66, 0.22) 100%),
    linear-gradient(180deg,
      rgba(4, 12, 26, 0.62) 0%,
      transparent 30%,
      rgba(4, 12, 26, 0.78) 100%);
  pointer-events: none;
}

/* --- Diagonales doradas de las esquinas --- */
.hero__streak {
  position: absolute;
  /* Por encima del velo azul (z-index -1) y por debajo del contenido */
  z-index: 0;
  height: 2px;
  width: min(560px, 42vw);
  background: linear-gradient(90deg, transparent, var(--cenfic-gold), transparent);
  opacity: 0.65;
  pointer-events: none;
}

/* Segunda línea paralela, más fina */
.hero__streak::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 16px;
  width: 68%;
  height: 1px;
  background: inherit;
  opacity: 0.6;
}

.hero__streak--tl {
  top: 4%;
  left: -7%;
  transform: rotate(34deg);
}

.hero__streak--br {
  bottom: 6%;
  right: -7%;
  transform: rotate(34deg);
}

/* Los resplandores existentes se atenúan: ahora manda la fotografía */
.hero__glow--blue {
  opacity: 0.55;
}

.hero__glow--gold {
  opacity: 0.7;
}


/* ====================================================================
   04. TITULAR Y ENTRADILLA
==================================================================== */

.hero__title {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 20px;
  font-size: clamp(29px, 3.55vw, 62px);
  text-shadow: 0 6px 26px rgba(2, 8, 20, 0.55);
}

/* Palabras destacadas en degradado dorado */
.hero__title em {
  background: linear-gradient(100deg, #F6E3B4 0%, #DCB566 46%, #C79A45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Filete dorado bajo el titular */
.hero__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(440px, 52%);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cenfic-gold), rgba(227, 192, 122, 0));
}

.hero__lead {
  position: relative;
  padding-left: clamp(14px, 1.15vw, 22px);
  color: #CFDCEE;
}

.hero__lead::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--cenfic-gold-soft), rgba(227, 192, 122, 0.06));
}


/* ====================================================================
   05. BOTONES DEL HERO
   Principal en dorado, secundario con contorno dorado. Ambos con
   icono a la izquierda y flecha a la derecha.
==================================================================== */

.hero__actions .btn {
  border-radius: 14px;
  gap: 11px;
  font-weight: 700;
}

.hero__actions .btn-primary {
  background: linear-gradient(135deg, #F4DA9C 0%, #D9AF5F 48%, #B98D3D 100%);
  border-color: rgba(255, 242, 212, 0.55);
  color: #0A1A30;
  box-shadow:
    0 16px 34px rgba(185, 141, 61, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hero__actions .btn-primary:hover {
  filter: brightness(1.05);
  box-shadow:
    0 22px 44px rgba(185, 141, 61, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero__actions .btn-outline {
  background: rgba(9, 27, 54, 0.45);
  border-color: rgba(227, 192, 122, 0.50);
  color: #F2E5C9;
  backdrop-filter: blur(6px);
}

.hero__actions .btn-outline:hover {
  background: rgba(227, 192, 122, 0.12);
  border-color: rgba(227, 192, 122, 0.80);
}

.btn__ic {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.btn__arrow {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}


/* ====================================================================
   06. TARJETAS DE NIVEL
==================================================================== */

.levels {
  gap: clamp(12px, 1.1vw, 18px);
}

.level-card {
  border-radius: 14px;
  border-color: var(--azul-linea);
  background: linear-gradient(180deg, rgba(13, 42, 80, 0.80), rgba(8, 26, 51, 0.62));
  padding-bottom: clamp(16px, 1.7vw, 28px);
}

.level-card:hover {
  border-color: rgba(227, 192, 122, 0.38);
  background: linear-gradient(180deg, rgba(17, 52, 96, 0.86), rgba(9, 29, 56, 0.70));
}

/* Base dorada de la tarjeta */
.level-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--cenfic-gold), rgba(227, 192, 122, 0.18));
}

/* El hilo blanco superior de premium.css pasa a dorado tenue */
.level-card::after {
  background: linear-gradient(90deg, transparent, rgba(227, 192, 122, 0.30), transparent);
}

/* Iconos: sin caja, más grandes y en dorado */
.level-card__icon,
.level-card__icon--blue,
.level-card__icon--gold {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cenfic-gold);
}

.level-card__icon svg {
  width: clamp(23px, 2.05vw, 34px);
  height: auto;
}

.level-card__head {
  gap: 13px;
  margin-bottom: 10px;
}

.level-card__head h3 {
  font-size: clamp(14px, 1.28vw, 22px);
}

.level-card p {
  color: #B7C8DD;
}


/* ====================================================================
   07. PANEL DEL SIMULADOR
==================================================================== */

.app-mock__tab {
  border-color: var(--azul-linea-2);
  background: rgba(8, 26, 50, 0.95);
}

.app-window {
  border-color: var(--azul-linea-2);
  background: linear-gradient(180deg, rgba(14, 42, 82, 0.74), rgba(8, 25, 49, 0.68));
  box-shadow:
    0 40px 90px rgba(3, 10, 24, 0.60),
    0 0 70px rgba(45, 110, 210, 0.26);
}

.app-rail {
  background: rgba(9, 28, 55, 0.55);
  border-right-color: var(--azul-linea);
}

.app-rail__btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #7E9AC0;
}

.app-rail__btn.is-active {
  background: linear-gradient(135deg, #2E5FDC, #1E3DA8);
  border-color: rgba(140, 180, 255, 0.50);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(35, 80, 190, 0.45);
}

.app-list__item {
  position: relative;
  padding-right: clamp(26px, 2.2vw, 38px);
  border-color: var(--azul-linea);
  background: rgba(12, 36, 70, 0.62);
}

.app-list__item:hover {
  background: rgba(18, 50, 94, 0.78);
  border-color: var(--azul-linea-2);
}

.app-list__item svg {
  color: #9EC1F5;
}

/* Flecha de la derecha en cada fila */
.app-list__item::after {
  content: "";
  position: absolute;
  right: clamp(11px, 1vw, 16px);
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(160, 195, 240, 0.65);
  border-right: 2px solid rgba(160, 195, 240, 0.65);
  transform: translateY(-50%) rotate(45deg);
}

.app-mock::after {
  background: radial-gradient(closest-side, rgba(45, 110, 210, 0.32), transparent 72%);
}


/* ====================================================================
   08. RESPONSIVE
==================================================================== */

@media (max-width: 1180px) {
  /* En pantallas estrechas la foto pasa a fondo general, más tenue,
     para no competir con el texto. */
  .hero::before {
    left: 0;
    background-position: 58% 30%;
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 62%, transparent 100%);
  }

  .hero::after {
    background:
      linear-gradient(180deg,
        rgba(4, 13, 28, 0.72) 0%,
        rgba(5, 18, 38, 0.86) 55%,
        rgba(5, 15, 34, 0.96) 100%);
  }

  .hero__streak {
    width: min(320px, 60vw);
    opacity: 0.35;
  }
}

@media (max-width: 780px) {
  .hero__title::after {
    width: 62%;
  }

  .hero__actions .btn {
    justify-content: center;
  }
}
