/* ═══════════════════════════════════════════════════════════
   UTILIDADES TROPA Y MARINERÍA — style.css
   Tema: Militar limpio · Blanco y verde · BOE 2026
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');

/* ── VARIABLES ──────────────────────────────────────────── */
:root {
  --verde:        #2d6a4f;
  --verde-claro:  #40916c;
  --verde-hover:  #1b4332;
  --verde-suave:  #d8f3dc;
  --verde-bg:     #f0faf3;
  --acento:       #52b788;
  --blanco:       #ffffff;
  --gris-claro:   #f4f6f4;
  --gris-medio:   #e2e8e4;
  --gris-borde:   #c8d5cc;
  --gris-texto:   #6b7c72;
  --negro:        #111a14;
  --texto:        #1a2e22;
  --sombra:       rgba(45, 106, 79, 0.12);
  --sombra-fuerte:rgba(45, 106, 79, 0.22);

  --fuente-titulo: 'Barlow Condensed', sans-serif;
  --fuente-cuerpo: 'Barlow', sans-serif;
  --fuente-mono:   'Share Tech Mono', monospace;

  --radio: 3px;
  --radio-card: 4px;
  --nav-h: 64px;
  --max-w: 1000px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--fuente-cuerpo);
  background: var(--gris-claro);
  color: var(--texto);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gris-claro); }
::-webkit-scrollbar-thumb { background: var(--gris-borde); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--verde-claro); }

/* ══════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--verde);
  border-bottom: 3px solid var(--verde-hover);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px var(--sombra-fuerte);
}

.navbar-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.navbar-logo-texto {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.navbar-logo-titulo {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blanco);
}

.navbar-logo-sub {
  font-family: var(--fuente-mono);
  font-size: .6rem;
  letter-spacing: .15em;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}

/* enlaces directos Y botón dropdown comparten el mismo estilo base */
.navbar-nav a,
.nav-dropdown-btn {
  font-family: var(--fuente-titulo);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  padding: .4rem .9rem;
  border-radius: var(--radio);
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.navbar-nav a:hover,
.navbar-nav a.activo,
.nav-dropdown-btn:hover,
.nav-dropdown.activo .nav-dropdown-btn {
  background: rgba(255,255,255,.15);
  color: var(--blanco);
}

.navbar-nav a.activo {
  background: rgba(255,255,255,.2);
}

/* ── DROPDOWN ───────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-arrow {
  font-size: .65rem;
  transition: transform .2s;
  opacity: .7;
}

.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--verde-hover);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radio-card);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  z-index: 200;
  overflow: hidden;
  padding-top: .5rem;  /* desplaza el menú visualmente pero el área hover es continua */
}

/* Puente invisible entre botón y menú para que el hover no se interrumpa */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: .5rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  font-family: var(--fuente-titulo);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  border-radius: 0;
  transition: background .12s, color .12s;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-dropdown-menu a:last-child { border-bottom: none; }

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.activo {
  background: rgba(255,255,255,.12);
  color: var(--blanco);
}

.navbar-badge {
  margin-left: auto;
  font-family: var(--fuente-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.2);
  padding: .2rem .6rem;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── HAMBURGER (móvil) ──────────────────────────────────── */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
  padding: .3rem;
}

/* ══════════════════════════════════════════════════════════
   FRANJA DECORATIVA BAJO NAVBAR
   ══════════════════════════════════════════════════════════ */
.franja-deco {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--acento) 0px, var(--acento) 12px,
    transparent 12px, transparent 16px
  );
}

/* ══════════════════════════════════════════════════════════
   PÁGINA WRAPPER
   ══════════════════════════════════════════════════════════ */
.pagina {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ══════════════════════════════════════════════════════════
   HERO / CABECERA DE PÁGINA
   ══════════════════════════════════════════════════════════ */
.hero {
  background: var(--verde);
  position: relative;
  overflow: hidden;
  padding: 3rem 1.5rem 2.5rem;
  margin-bottom: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,.025) 18px,
    rgba(255,255,255,.025) 20px
  );
}

.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-eyebrow {
  font-family: var(--fuente-mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--acento);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--acento);
}

.hero h1 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blanco);
  line-height: 1.05;
  margin-bottom: .6rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--acento);
}

.hero-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  font-family: var(--fuente-mono);
  letter-spacing: .03em;
}

/* ══════════════════════════════════════════════════════════
   TARJETAS / PANELES
   ══════════════════════════════════════════════════════════ */
.panel {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-card);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px var(--sombra);
}

.panel-titulo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--verde-claro);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.panel-titulo::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gris-medio);
}

/* ══════════════════════════════════════════════════════════
   ALERTAS
   ══════════════════════════════════════════════════════════ */
.alerta {
  padding: .8rem 1.2rem;
  border-radius: var(--radio);
  font-size: .85rem;
  margin-bottom: 1rem;
  display: none;
  font-family: var(--fuente-mono);
  font-size: .78rem;
}
.alerta.error {
  background: #fff3f3;
  border: 1px solid #f4b8b8;
  color: #9b2226;
}
.alerta.info {
  background: var(--verde-suave);
  border: 1px solid var(--acento);
  color: var(--verde-hover);
}
.alerta.visible { display: block; }

/* ══════════════════════════════════════════════════════════
   FORMULARIO / INPUTS
   ══════════════════════════════════════════════════════════ */
.busqueda-fila {
  display: flex;
  gap: .75rem;
  align-items: stretch;
}

.nio-input {
  flex: 1;
  background: var(--gris-claro);
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  color: var(--texto);
  font-family: var(--fuente-mono);
  font-size: 1rem;
  letter-spacing: .06em;
  padding: .7rem 1.1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.nio-input:focus {
  border-color: var(--verde-claro);
  box-shadow: 0 0 0 3px rgba(64,145,108,.15);
  background: var(--blanco);
}

.nio-input::placeholder {
  color: var(--gris-texto);
  font-size: .85rem;
}

/* ── BOTONES ────────────────────────────────────────────── */
.btn {
  background: var(--verde);
  color: var(--blanco);
  border: none;
  border-radius: var(--radio);
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .7rem 1.8rem;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 6px var(--sombra);
}

.btn:hover { background: var(--verde-hover); box-shadow: 0 4px 10px var(--sombra-fuerte); }
.btn:active { transform: scale(.97); }
.btn:disabled { background: var(--gris-borde); cursor: not-allowed; box-shadow: none; }

/* ══════════════════════════════════════════════════════════
   STATS FILA
   ══════════════════════════════════════════════════════════ */
.stats-fila {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-top: 3px solid var(--verde-claro);
  border-radius: var(--radio-card);
  padding: 1rem 1.1rem;
  text-align: center;
  box-shadow: 0 1px 4px var(--sombra);
}

.stat-val {
  font-family: var(--fuente-titulo);
  font-size: 2rem;
  font-weight: 800;
  color: var(--verde);
  line-height: 1;
}

.stat-label {
  font-size: .65rem;
  color: var(--gris-texto);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .3rem;
  font-family: var(--fuente-mono);
}

/* ══════════════════════════════════════════════════════════
   RESULTADO CABECERA
   ══════════════════════════════════════════════════════════ */
.resultado-cabecera {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.nio-tag {
  font-family: var(--fuente-mono);
  font-size: .8rem;
  background: var(--verde-suave);
  border: 1px solid var(--acento);
  color: var(--verde-hover);
  padding: .3rem .9rem;
  border-radius: 2px;
  letter-spacing: .05em;
}

.resultado-titulo {
  font-family: var(--fuente-titulo);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--texto);
  letter-spacing: .03em;
  text-transform: uppercase;
  flex: 1;
}

/* ══════════════════════════════════════════════════════════
   TARJETAS DE VACANTE
   ══════════════════════════════════════════════════════════ */
.vacante-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vacante-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-card);
  overflow: hidden;
  box-shadow: 0 1px 4px var(--sombra);
  animation: slideIn .3s ease both;
}

.vacante-card.plaza    { border-left: 4px solid var(--verde); }
.vacante-card.en-lista { border-left: 4px solid #2196a6; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vacante-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.3rem;
  background: var(--gris-claro);
  border-bottom: 1px solid var(--gris-medio);
}

.vacante-head > div:first-child { flex: 1; }

.vac-num {
  font-family: var(--fuente-titulo);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--texto);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vac-petic {
  font-family: var(--fuente-mono);
  font-size: .65rem;
  color: var(--gris-texto);
  letter-spacing: .08em;
}

.vac-destino {
  font-family: var(--fuente-cuerpo);
  font-size: .82rem;
  font-weight: 600;
  color: var(--verde);
  margin: .15rem 0 .1rem;
  line-height: 1.3;
}

.vac-cfor {
  font-family: var(--fuente-mono);
  font-size: .65rem;
  font-weight: 600;
  color: var(--blanco);
  background: var(--verde-claro);
  padding: .1rem .45rem;
  border-radius: 2px;
  letter-spacing: .06em;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════ */
.badge {
  font-family: var(--fuente-mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .25rem .7rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge.verde { background: var(--verde); color: var(--blanco); }
.badge.azul  { background: #2196a6; color: var(--blanco); }

/* ══════════════════════════════════════════════════════════
   VACANTE BODY / META GRID
   ══════════════════════════════════════════════════════════ */
.vacante-body {
  padding: 1rem 1.3rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .6rem 1rem;
  margin-bottom: .9rem;
}

.meta-item {}

.meta-label {
  font-family: var(--fuente-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gris-texto);
  margin-bottom: .15rem;
}

.meta-val {
  font-family: var(--fuente-titulo);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--texto);
}

.meta-val.highlight {
  color: var(--verde);
  font-size: 1.2rem;
}

/* ══════════════════════════════════════════════════════════
   BARRA DE POSICIÓN
   ══════════════════════════════════════════════════════════ */
.pos-info {
  margin-top: .5rem;
}

.pos-label {
  font-size: .65rem;
  color: var(--gris-texto);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: var(--fuente-mono);
  margin-bottom: .3rem;
}

.pos-barra-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.pos-barra {
  flex: 1;
  height: 6px;
  background: var(--gris-medio);
  border-radius: 3px;
  overflow: hidden;
}

.pos-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}
.pos-fill.buena { background: var(--verde); }
.pos-fill.media { background: #e9a319; }
.pos-fill.mala  { background: #c1440e; }

.pos-texto {
  font-family: var(--fuente-mono);
  font-size: .72rem;
  color: var(--gris-texto);
  white-space: nowrap;
}

.pos-nota-elim {
  font-size: .72rem;
  color: #888;
  margin-top: .3rem;
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   RESUMEN BOX
   ══════════════════════════════════════════════════════════ */
.resumen-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: 1rem 1.4rem;
  background: var(--verde-suave);
  border: 1px solid var(--acento);
  border-radius: var(--radio-card);
  box-shadow: 0 2px 8px var(--sombra);
}

.resumen-icon {
  font-size: 2rem;
  line-height: 1;
}

.resumen-texto {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.resumen-texto strong {
  font-family: var(--fuente-titulo);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--verde-hover);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.resumen-texto small {
  font-family: var(--fuente-mono);
  font-size: .7rem;
  color: var(--verde);
  letter-spacing: .05em;
}

/* ── PANEL ALGORITMO ──────────────────────────────────────────────────────── */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--verde);
  color: var(--verde);
  font-size: .78rem;
  padding: .4rem .9rem;
}
.btn-outline:hover { background: var(--verde); color: #fff; }

.btn-gris {
  background: #eee;
  color: #555;
  font-size: .78rem;
  padding: .4rem .9rem;
  border: 1px solid #ccc;
}
.btn-gris:hover { background: #ddd; }

#algo-panel {
  margin: 1.2rem 0;
  border: 1.5px solid var(--verde-claro);
  border-radius: 8px;
  overflow: hidden;
  font-size: .8rem;
}
.algo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.1rem;
  background: var(--verde);
  color: #fff;
  gap: 1rem;
  flex-wrap: wrap;
}
.algo-header-left { display: flex; flex-direction: column; gap: .1rem; }
.algo-header-title { font-family: var(--fuente-titulo); font-size: 1rem; font-weight: 700; letter-spacing: .03em; }
.algo-header-sub { font-size: .72rem; opacity: .8; }
.algo-close {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 4px;
  padding: .3rem .7rem;
  cursor: pointer;
  font-size: .75rem;
  white-space: nowrap;
}
.algo-close:hover { background: rgba(255,255,255,.25); }
.algo-explicacion {
  padding: .7rem 1.1rem;
  background: #f5faf7;
  border-bottom: 1px solid #d8e8dd;
  color: #445;
  font-size: .78rem;
  line-height: 1.55;
}
.algo-explicacion p { margin: 0; }
.algo-busqueda-fila {
  display: flex;
  gap: .5rem;
  padding: .7rem 1.1rem;
  background: #fff;
  border-bottom: 1px solid #e8eee8;
  flex-wrap: wrap;
  align-items: center;
}
.algo-nio-input { flex: 1; min-width: 200px; font-size: .8rem; padding: .35rem .6rem; }
#algo-iteraciones { padding: .6rem 1.1rem; background: #fff; }
.algo-bloque {
  margin-bottom: .5rem;
  border: 1px solid #e0ece5;
  border-radius: 5px;
  overflow: hidden;
}
.algo-bloque.destacado { border-color: var(--verde-claro); box-shadow: 0 0 0 2px rgba(64,145,108,.15); }
.algo-iter-titulo {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .75rem;
  background: #f3f8f5;
  cursor: pointer;
  user-select: none;
  font-family: var(--fuente-titulo);
  font-size: .82rem;
  font-weight: 600;
  color: #334;
  transition: background .12s;
}
.algo-iter-titulo:hover { background: #e6f2ec; }
.algo-bloque.destacado .algo-iter-titulo { background: #e2f0e8; }
.algo-iter-count { font-size: .72rem; color: #888; font-weight: 400; font-family: var(--fuente-mono); }
.algo-ok { color: var(--verde); font-size: .72rem; font-weight: 600; }
.algo-nio-badge {
  margin-left: auto;
  background: var(--verde);
  color: #fff;
  border-radius: 3px;
  padding: .1rem .4rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.algo-iter-contenido { display: none; padding: .3rem .75rem .5rem; }
.algo-iter-contenido.abierto { display: block; }
.algo-ok-msg { color: var(--verde); font-size: .78rem; padding: .3rem 0; }
.algo-fila {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .22rem 0;
  border-bottom: 1px solid #f0f4f1;
  flex-wrap: wrap;
  font-size: .76rem;
}
.algo-fila:last-child { border-bottom: none; }
.algo-fila.algo-fila-nio {
  background: #fffbe6;
  padding: .3rem .4rem;
  border-radius: 3px;
  border: 1px solid #f0d060;
  margin: .1rem 0;
}
.algo-vac  { font-family: var(--fuente-mono); color: #888; font-size: .7rem; min-width: 4rem; }
.algo-nio  { font-family: var(--fuente-mono); color: #334; font-size: .73rem; }
.algo-nio.destacado { color: var(--verde); font-weight: 700; }
.algo-nota { font-family: var(--fuente-mono); color: #6a6; font-size: .72rem; }
.algo-elim { background: #fdd; color: #922; border-radius: 3px; padding: .05rem .3rem; font-size: .67rem; font-weight: 700; letter-spacing: .04em; }
.algo-razon { color: #778; font-size: .72rem; flex: 1; }
.algo-resto { color: #aaa; font-size: .7rem; padding: .3rem 0 .1rem; font-style: italic; }
.algo-resumen {
  display: flex;
  gap: 1.5rem;
  padding: .7rem 1rem;
  margin-top: .6rem;
  background: #f5faf7;
  border-top: 1px solid #d8e8dd;
  border-radius: 4px;
  font-size: .76rem;
  color: #556;
  flex-wrap: wrap;
}
.algo-resumen strong { color: var(--verde); }

.disclaimer {
  background: #fffbe6;
  border: 1px solid #f0d060;
  border-left: 4px solid #e9a319;
  border-radius: var(--radio-card);
  padding: .75rem 1.1rem;
  margin-bottom: 1.25rem;
  font-family: var(--fuente-mono);
  font-size: .75rem;
  color: #6b4f00;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
footer {
  background: var(--verde-hover);
  border-top: 3px solid var(--verde);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blanco);
}

.footer-txt {
  font-family: var(--fuente-mono);
  font-size: .62rem;
  letter-spacing: .08em;
  color: rgba(255,255,255,.45);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .navbar-nav { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--verde-hover); padding: .5rem 0; z-index: 99; box-shadow: 0 4px 12px var(--sombra-fuerte); }
  .navbar-nav.abierto { display: flex; }
  .navbar-nav a,
  .nav-dropdown-btn { padding: .7rem 1.5rem; border-radius: 0; width: 100%; justify-content: flex-start; box-sizing: border-box; }
  .nav-dropdown { width: 100%; }
  .navbar-toggle { display: block; }
  .navbar-badge { display: none; }
  .navbar-inner { position: relative; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; border-radius: 0; background: rgba(0,0,0,.2); }
  .nav-dropdown-menu a { padding-left: 2.5rem; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .pagina { padding: 1.5rem 1rem 3rem; }
  .stats-fila { grid-template-columns: repeat(2, 1fr); }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; text-align: center; }
  .busqueda-fila { flex-direction: column; }
  .algo-busqueda-fila { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════
   HOME — HERO
   ══════════════════════════════════════════════════════════ */
.home-hero {
  background: var(--verde);
  position: relative;
  overflow: hidden;
  padding: 4rem 1.5rem 3rem;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 18px,
    rgba(255,255,255,.025) 18px,
    rgba(255,255,255,.025) 20px
  );
}

.home-hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.home-hero-eyebrow {
  font-family: var(--fuente-mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--acento);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.home-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--acento);
}

.home-hero h1,
.home-hero > .home-hero-inner > h1 {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blanco);
  line-height: 1.05;
  margin-bottom: .6rem;
}

.home-hero h1 em {
  font-style: normal;
  color: var(--acento);
}

.home-hero-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  max-width: 560px;
  font-family: var(--fuente-mono);
  letter-spacing: .03em;
  line-height: 1.7;
  margin-bottom: 1.8rem;
}

.home-hero-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   HOME — SECCIÓN
   ══════════════════════════════════════════════════════════ */
.seccion-titulo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--verde-claro);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.seccion-titulo::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gris-medio);
}

.seccion-sub {
  font-size: .82rem;
  color: var(--gris-texto);
  font-family: var(--fuente-mono);
  letter-spacing: .04em;
  margin-bottom: 1.2rem;
}

/* ══════════════════════════════════════════════════════════
   HOME — TARJETAS DE UTILIDADES
   ══════════════════════════════════════════════════════════ */
.utilidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.utilidad-card {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-top: 3px solid var(--verde-claro);
  border-radius: var(--radio-card);
  padding: 1.6rem 1.5rem;
  text-decoration: none;
  color: var(--texto);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  box-shadow: 0 1px 4px var(--sombra);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.utilidad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--sombra-fuerte);
  border-top-color: var(--verde);
}

.utilidad-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.utilidad-card-titulo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--texto);
}

.utilidad-card-desc {
  font-size: .82rem;
  color: var(--gris-texto);
  line-height: 1.6;
  flex: 1;
}

.utilidad-card-arrow {
  font-family: var(--fuente-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--verde-claro);
  margin-top: .4rem;
  text-transform: uppercase;
}

.utilidad-card:hover .utilidad-card-arrow {
  color: var(--verde);
}


/* ══════════════════════════════════════════════════════════
   TABLA CALENDARIO
   ══════════════════════════════════════════════════════════ */
.cal-tabla-wrap {
  overflow-x: auto;
  margin-bottom: .75rem;
  border-radius: var(--radio-card);
  border: 1px solid var(--gris-borde);
}

.cal-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  font-family: var(--fuente-cuerpo);
  min-width: 640px;
}

.cal-tabla thead tr {
  background: var(--verde);
  color: var(--blanco);
}

.cal-tabla th {
  padding: .7rem .9rem;
  text-align: left;
  font-family: var(--fuente-titulo);
  font-size: .7rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 700;
  border-right: 1px solid rgba(255,255,255,.1);
}

.cal-tabla th:last-child { border-right: none; }

.cal-tabla tbody tr {
  border-bottom: 1px solid var(--gris-medio);
  transition: background .12s;
}

.cal-tabla tbody tr:last-child { border-bottom: none; }
.cal-tabla tbody tr:hover { background: var(--verde-bg); }

.cal-tabla td {
  padding: .75rem .9rem;
  color: var(--texto);
  border-right: 1px solid var(--gris-medio);
  vertical-align: top;
  line-height: 1.45;
}

.cal-tabla td:last-child { border-right: none; }

.cal-ciclo {
  font-family: var(--fuente-titulo);
  font-weight: 700;
  font-size: .9rem;
  color: var(--verde);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.cal-dest {
  font-family: var(--fuente-mono);
  font-weight: 700;
  color: var(--verde-hover);
}

.cal-nota {
  font-family: var(--fuente-mono);
  font-size: .7rem;
  color: var(--gris-texto);
  margin-top: .5rem;
}

/* ══════════════════════════════════════════════════════════
   TIMELINE PROMOCIÓN
   ══════════════════════════════════════════════════════════ */
.promocion-lista {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 1rem;
}

.promocion-lista::before {
  content: '';
  position: absolute;
  left: 3.2rem;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 2px;
  background: var(--gris-medio);
}

.promo-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .5rem 0;
  position: relative;
}

.promo-badge {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  padding: .35rem .55rem;
  border-radius: var(--radio);
  min-width: 5rem;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.promo-texto {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio-card);
  padding: .65rem .9rem;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--texto);
  flex: 1;
  box-shadow: 0 1px 3px var(--sombra);
}

.promo-texto strong {
  color: var(--verde-hover);
}

.material-subnota a {
  color: var(--verde-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.material-subnota a:hover { color: var(--verde); }
.material-nota-pie a {
  color: var(--verde-hover);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
   FASES PLAN DE ESTUDIOS
   ══════════════════════════════════════════════════════════ */
.fases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: .5rem;
}

.fase-card {
  border-radius: var(--radio-card);
  padding: 1rem 1.1rem;
  border: 1px solid var(--gris-borde);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.fase-siglas {
  font-family: var(--fuente-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.fase-nombre {
  font-size: .82rem;
  line-height: 1.4;
  color: var(--texto);
  font-weight: 500;
  flex: 1;
}

.fase-duracion {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .03em;
  margin-top: .25rem;
}

.fase-paoavm { background: #fffde7; border-color: #f9c900; }
.fase-paoavm .fase-siglas { color: #b8960a; }
.fase-paoavm .fase-duracion { color: #b8960a; }

.fase-ffmg { background: #f0faf3; border-color: #a8d8b0; }
.fase-ffmg .fase-siglas { color: #2e7d32; }
.fase-ffmg .fase-duracion { color: #2e7d32; }

.fase-ffme { background: #f0f4ff; border-color: #aab8e0; }
.fase-ffme .fase-siglas { color: #1a3a8a; }
.fase-ffme .fase-duracion { color: #1a3a8a; }

/* Filas tabla por fase */
.fila-paoavm td { background: #fffde7; }
.fila-ffmg td   { background: #f0faf3; }
.fila-ffme td   { background: #eef2ff; }
.fila-especial td { background: #fdecea; }
.fila-permiso td  { background: var(--gris-claro); }

.fase-col {
  font-family: var(--fuente-titulo);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  border-left: 2px solid var(--gris-borde);
}

.fila-paoavm-col { color: #b8960a; background: #fff9c4 !important; }
.fila-ffmg-col   { color: #2e7d32; background: #dff5e3 !important; }
.fila-ffme-col   { color: #1a3a8a; background: #dde5ff !important; }

@media (max-width: 640px) {
  .fases-grid { grid-template-columns: 1fr; }
}

.meta-sub {
  font-family: var(--fuente-mono);
  font-size: .62rem;
  color: var(--gris-texto);
  margin-top: .2rem;
}
