/* Ruta Aprendiz — hoja de estilos principal (sin dependencias)
   Paleta: base blanca + verde SENA (#39A900) + azul (#3366CB).
   - --green puro: logo, iconos, bordes y titulares grandes (contraste 3:1).
   - --green-600: fondos con texto blanco (botones, pasos) → 4,7:1 (AA).
   - --blue: enlaces, etiquetas e información → 5,4:1 (AA). */

/* ---------- Tokens (tema claro, predeterminado) ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --tint: #f7f9fe;
  --text: #1b2430;
  --muted: #5b6675;
  --border: #e3e8ef;

  --green: #39a900;
  --green-600: #2d8600;
  --green-700: #267300;
  --green-soft: #eef8e6;
  --blue: #3366cb;
  --blue-700: #2851a6;
  --blue-soft: #edf2fc;
  --on-fill: #ffffff;

  --warn: #8a5300;
  --warn-soft: #fff5e3;
  --danger: #c0271b;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(27 36 48 / 5%), 0 6px 20px rgb(27 36 48 / 6%);
  --shadow-lg: 0 18px 44px rgb(27 36 48 / 14%);
  --maxw: 1180px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* Tema oscuro: solo si la persona lo activa con el botón (grises neutros). */
:root[data-theme='dark'] {
  --bg: #0f1419;
  --surface: #161c24;
  --surface-2: #1b232d;
  --tint: #141b24;
  --text: #e7ecf2;
  --muted: #9aa7b6;
  --border: #2a3441;
  --green: #5cc41a;
  --green-600: #5cc41a;
  --green-700: #86dd52;
  --green-soft: #1a2c12;
  --blue: #86a9ee;
  --blue-700: #a9c1f3;
  --blue-soft: #1a2540;
  --on-fill: #0b1a02;
  --warn: #f3c06a;
  --warn-soft: #33270f;
  --danger: #ff8b80;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  --shadow-lg: 0 20px 50px rgb(0 0 0 / 50%);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-700); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; overflow-wrap: anywhere; }
kbd { font: 600 0.7rem/1 var(--font); border: 1px solid var(--border); border-bottom-width: 2px; padding: 0.25em 0.45em; border-radius: 6px; color: var(--muted); background: var(--surface); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hl { color: var(--green); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.icon--sm { width: 1em; height: 1em; vertical-align: -0.15em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .container { padding-inline: 24px; } }
.narrow { max-width: 820px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; padding: 0.75em 1.25em; border-radius: 999px; border: 1px solid transparent; font: 700 0.95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green-600); color: var(--on-fill); }
.btn--primary:hover { background: var(--green-700); color: var(--on-fill); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 0.5em 1em; font-size: 0.875rem; }
.btn--block { width: 100%; margin-top: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Cabecera ---------- */

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand__mark { width: 36px; height: 36px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand__tag { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.nav a:hover { background: var(--surface-2); color: var(--blue); }
.nav a[aria-current='page'] { color: var(--blue-700); background: var(--blue-soft); }
.header__actions { display: flex; align-items: center; gap: 8px; }
.btn-agent { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 0.9rem var(--font); cursor: pointer; }
.btn-agent .icon { color: var(--green); }
.btn-agent:hover { border-color: var(--blue); }
[data-theme-toggle] .icon--sun { display: none; }
:root[data-theme='dark'] [data-theme-toggle] .icon--sun { display: block; }
:root[data-theme='dark'] [data-theme-toggle] .icon--moon { display: none; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px; font-size: 1rem; }
}
@media (max-width: 640px) {
  .btn-agent span, .btn-agent kbd, .brand__tag { display: none; }
  .btn-agent { width: 42px; padding: 0; justify-content: center; }
}

/* ---------- Migas de pan ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 14px 0 0; margin: 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '›'; margin: 0 6px 0 2px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* ---------- Hero (inicio) ---------- */
.kicker { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.76rem; font-weight: 800; color: var(--blue); margin-bottom: 12px; }
.kicker .icon { color: var(--green); }
.lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.hero {
  padding: 40px 0 56px;
  background:
    radial-gradient(900px 420px at 92% -12%, rgb(51 102 203 / 8%), transparent 62%),
    radial-gradient(700px 380px at -8% 108%, rgb(57 169 0 / 8%), transparent 60%),
    var(--bg);
}
.hero__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1.1fr 0.9fr; } .hero { padding: 64px 0 80px; } }
.hero-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); margin: 24px 0 14px; max-width: 620px; }
.hero-search .icon { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 1rem var(--font); color: var(--text); padding: 10px 4px; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.hero__chips { font-size: 0.9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.hero__chips a { padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.85rem; }
.hero__chips a:hover { border-color: var(--blue); color: var(--blue); }
.hero__trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 600; font-size: 0.92rem; }
.hero__trust .icon { color: var(--green); }
.hero__visual { position: relative; }
.hero__media { margin: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3.4; background: linear-gradient(135deg, var(--blue-soft), var(--green-soft)); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media--empty { background: linear-gradient(135deg, var(--blue-soft), var(--green-soft)); }
.route-card { position: absolute; left: -12px; bottom: -24px; width: min(290px, 85%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-lg); }
@media (max-width: 959px) { .route-card { position: relative; left: auto; bottom: auto; width: 100%; margin-top: -40px; margin-inline: auto; max-width: 92%; } }
.route-card__title { font-weight: 800; margin-bottom: 8px; }
.route-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.route-card li { display: flex; align-items: center; gap: 10px; }
.route-card__n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-600); color: var(--on-fill); font-weight: 800; font-size: 0.8rem; flex: none; }

/* ---------- Encabezado de guías ---------- */
.page-hero { padding: 28px 0 36px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--tint), var(--bg) 90%); margin-bottom: 36px; }
.page-hero__inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .page-hero--media .page-hero__inner { grid-template-columns: 1fr 460px; } .page-hero { padding: 40px 0 48px; } }
.page-hero h1 { margin-bottom: 0.4em; }
.page-hero__meta { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.86rem; font-weight: 600; }
.page-hero__meta li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.page-hero__meta .icon { color: var(--green); }
.page-hero__media { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Secciones y rejillas ---------- */
.section { padding: 56px 0; }
.section--alt { background: var(--surface-2); }
.section__head { max-width: 720px; margin-bottom: 28px; }
.section__head p:last-child { color: var(--muted); }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.more-link { margin-top: 20px; font-weight: 700; }
.more-link a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Tarjetas ---------- */
.platform-card, .course-card, .guide-card, .mini-card, .aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.platform-card { border-top: 4px solid var(--green); }
.platform-card:nth-child(2) { border-top-color: var(--blue); }
.platform-card h3 { font-size: 1.4rem; margin-bottom: 0.3em; }
.platform-card__step { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); margin-bottom: 8px; }
.platform-card p { color: var(--muted); }
.platform-card__link { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.course-card { display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.course-card:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: var(--shadow-lg); }
.course-card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.course-card__top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.course-card__hours { font-size: 0.82rem; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.course-card__title { font-size: 1.08rem; margin: 4px 0 0; }
.course-card__title a { color: var(--text); text-decoration: none; }
.course-card__title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.course-card__title a:focus-visible { outline: none; }
.course-card:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.course-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto !important; padding-top: 8px; font-size: 0.82rem !important; font-weight: 600; }
.course-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.course-card__meta .icon { color: var(--green); }
.area-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-700); }

.guide-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); transition: transform 0.15s, border-color 0.15s; }
.guide-card:hover { color: var(--text); transform: translateY(-2px); border-color: var(--green); }
.guide-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); color: var(--green-700); }
.guide-card:nth-child(even) .guide-card__icon { background: var(--blue-soft); color: var(--blue); }
.guide-card__title { font-weight: 800; font-size: 1.05rem; }
.guide-card__text { color: var(--muted); font-size: 0.92rem; }
.guide-card__more { margin-top: auto; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }

.area-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.area-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; height: 100%; transition: border-color 0.15s, box-shadow 0.15s; }
.area-tile:hover { border-color: var(--blue); color: var(--text); box-shadow: var(--shadow); }
.area-tile .icon { width: 28px; height: 28px; color: var(--green); margin-bottom: 6px; }
.area-grid li:nth-child(even) .area-tile .icon { color: var(--blue); }
.area-tile__name { font-weight: 700; }
.area-tile__count { font-size: 0.85rem; color: var(--muted); }

.mini-cards { margin: 16px 0 8px; }
.mini-card { box-shadow: none; }
.mini-card .icon { color: var(--green); width: 26px; height: 26px; }
.mini-card:nth-child(even) .icon { color: var(--blue); }
.mini-card h3 { margin: 10px 0 4px; font-size: 1rem; }
.mini-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- Diseño con barra lateral ---------- */
.with-aside { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .with-aside { grid-template-columns: minmax(0, 1fr) 300px; }
  .with-aside--left { grid-template-columns: 250px minmax(0, 1fr); }
  .aside { position: sticky; top: 96px; align-self: start; }
}
.aside-card { border-top: 4px solid var(--green); }
.aside-card__title { font-weight: 800; margin-bottom: 8px; }
.facts { margin: 0 0 8px; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 0.93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; font-size: 0.92rem; }
.toc__title { font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.toc__title .icon { color: var(--green); }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--blue); font-weight: 700; }

/* ---------- Prosa ---------- */
.prose { min-width: 0; }
.prose > section { margin-bottom: 44px; }
.prose h2 { margin-top: 0.2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--green); }
.prose .tip { display: flex; gap: 8px; align-items: baseline; background: var(--surface-2); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.prose .tip .icon { color: var(--blue); }
.checklist { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.checklist .icon { color: var(--green-700); background: var(--green-soft); border-radius: 50%; padding: 3px; width: 24px; height: 24px; margin-top: 1px; }
.legal h2 { margin-top: 1.6em; font-size: 1.35rem; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0 !important; margin: 24px 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; position: relative; padding-bottom: 24px; margin: 0 !important; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--border); }
.step__num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green-600); color: var(--on-fill); font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 0 6px var(--green-soft); }
.step__body h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.step__body p:last-child { margin-bottom: 0; }

/* ---------- Avisos ---------- */
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); margin: 28px 0; border: 1px solid var(--border); border-left-width: 4px; }
.callout > .icon { width: 24px; height: 24px; margin-top: 2px; }
.callout p:last-child { margin-bottom: 0; }
.callout__title { font-weight: 800; margin-bottom: 4px; }
.callout--info { background: var(--blue-soft); border-left-color: var(--blue); }
.callout--info > .icon { color: var(--blue); }
.callout--warning { background: var(--warn-soft); border-left-color: #e09a1a; }
.callout--warning > .icon { color: var(--warn); }
.callout--success { background: var(--green-soft); border-left-color: var(--green); }
.callout--success > .icon { color: var(--green-700); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: 18px 0; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 700; }

/* ---------- Comparativa y estados ---------- */
.compare { display: grid; gap: 14px; margin: 18px 0; }
@media (min-width: 640px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare__col { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--blue); }
.compare__col--strong { border-top-color: var(--green); background: var(--green-soft); }
.compare__title { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.compare__title .icon { color: var(--blue); }
.compare__col--strong .compare__title .icon { color: var(--green-700); }
.compare__col p:last-child { margin: 0; }
.status-list { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.status { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); border-left-width: 5px; margin: 0 !important; }
@media (min-width: 640px) { .status { grid-template-columns: 210px 1fr; gap: 16px; } }
.status__name { font-weight: 800; }
.status__desc { color: var(--muted); }
.status--good { border-left-color: var(--green); }
.status--bad { border-left-color: var(--danger); }
.status--neutral { border-left-color: var(--blue); }

/* ---------- Preguntas frecuentes ---------- */
.faq { margin: 40px 0; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 500; color: var(--green); }
.faq details[open] summary::after { content: '–'; }
.faq details[open] { border-color: var(--blue); }
.faq__a { padding: 0 18px 4px; color: var(--muted); }

/* ---------- Directorio ---------- */
.filters { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); align-items: end; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr 1.3fr 1fr 1fr auto; } }
.filters__field { display: grid; gap: 6px; }
.filters label { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.filters input, .filters select { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 500 0.95rem var(--font); padding: 0 12px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 40px; }
.filters__reset { height: 46px; }
.filters__count { margin: 18px 0 14px; font-weight: 700; color: var(--muted); }
.empty { text-align: center; padding: 40px 16px; border: 2px dashed var(--border); border-radius: var(--radius); margin-top: 12px; }
.empty .icon { width: 36px; height: 36px; color: var(--muted); margin: 0 auto 8px; display: block; }
.area-list { display: grid; gap: 18px; margin: 18px 0; }
@media (min-width: 640px) { .area-list { grid-template-columns: 1fr 1fr; } }
.area-list__group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.area-list__group h3 { margin: 0 0 8px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.area-list__group h3 .icon { color: var(--green); }
.area-list__group ul { margin: 0; padding-left: 1.1em; }

/* ---------- Publicidad (espacio reservado para evitar saltos de diseño) ---------- */
.ad-slot { margin: 32px auto; text-align: center; min-height: 120px; }
.ad-slot__label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.ad-slot ins { display: block; min-height: 100px; }
.ad-slot__ph { display: grid; place-items: center; min-height: 100px; border: 2px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: 0.85rem; background: var(--surface-2); }

/* ---------- Contacto ---------- */
.contact-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.contact-card .icon { color: var(--blue); width: 26px; height: 26px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 40px; font-size: 0.92rem; }
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer__about p { color: var(--muted); }
.footer__disclaimer { font-size: 0.85rem; background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius-sm); }
.brand--footer { margin-bottom: 12px; }
.footer__title { font-weight: 800; margin-bottom: 10px; }
.footer__title--sub { margin-top: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--blue); }
.footer__bottom { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 18px; color: var(--muted); font-size: 0.82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer__bottom p { margin: 0; }

/* ---------- Asistente de navegación ---------- */
.agent { width: min(640px, calc(100% - 24px)); max-height: min(640px, calc(100% - 48px)); margin: 8vh auto auto; padding: 0; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; }
.agent[open] { display: flex; flex-direction: column; }
.agent::backdrop { background: rgb(15 20 25 / 45%); backdrop-filter: blur(3px); }
.agent__form { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--border); }
.agent__form > .icon { color: var(--green); width: 22px; height: 22px; }
.agent__form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 500 1.05rem var(--font); padding: 10px 0; }
.agent__form input:focus { outline: none; }
.agent__help { font-size: 0.82rem; color: var(--muted); margin: 10px 18px 0; }
.agent__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px 4px; }
.agent__chips button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 12px; font: 600 0.82rem var(--font); cursor: pointer; }
.agent__chips button:hover { border-color: var(--blue); color: var(--blue); }
.agent__results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; }
.agent__group { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; padding: 10px 10px 4px; }
.agent__item a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text); }
.agent__item a .icon { color: var(--blue); margin-top: 3px; }
.agent__item[aria-selected='true'] a, .agent__item a:hover { background: var(--blue-soft); }
.agent__item strong { display: block; font-weight: 700; }
.agent__item small { color: var(--muted); font-size: 0.85rem; }
.agent__empty { padding: 16px; color: var(--muted); font-size: 0.93rem; }
.agent__foot { margin: 0; padding: 10px 18px; font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--border); }

/* ---------- Aviso de cookies ---------- */
.cookie { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-lg); font-size: 0.88rem; }
.cookie p { margin: 0; flex: 1 1 280px; }

/* ---------- Tarjetas con foto ---------- */
.guide-card--media, .area-tile--media, .area-list__group--media { padding: 0; overflow: hidden; }
.guide-card__media, .area-tile__media, .area-list__media { display: block; overflow: hidden; background: var(--surface-2); }
.guide-card__media { aspect-ratio: 16 / 10; }
.area-tile__media { aspect-ratio: 3 / 2; }
.area-list__media { aspect-ratio: 3 / 1; }
.guide-card__media img, .area-tile__media img, .area-list__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.guide-card:hover .guide-card__media img, .area-tile:hover .area-tile__media img { transform: scale(1.05); }
.guide-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.guide-card--media .guide-card__body { padding: 0 20px 20px; }
.guide-card--media .guide-card__icon { margin-top: -22px; border: 3px solid var(--surface); position: relative; }
.area-tile__body { display: flex; flex-direction: column; gap: 2px; }
.area-tile--media .area-tile__body { padding: 14px 16px 16px; }
.area-tile--media .icon { width: 22px; height: 22px; margin-bottom: 4px; }
.area-list__group--media h3 { margin: 14px 18px 8px; }
.area-list__group--media ul { margin: 0 18px 16px; }

/* ---------- Franja de llamada a la acción (verde → azul) ---------- */
.cta-band { background: linear-gradient(120deg, #2d8600 0%, #3366cb 100%); color: #fff; padding: 56px 0; }
.cta-band__inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .cta-band__inner { grid-template-columns: 1fr 460px; } .cta-band { padding: 72px 0; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgb(255 255 255 / 92%); max-width: 56ch; }
.cta-band .kicker { color: #fff; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn--white { background: #fff; color: #1f5f00; }
.btn--white:hover { background: #eef8e6; color: #1f5f00; }
.btn--outline-white { background: transparent; color: #fff; border-color: rgb(255 255 255 / 75%); }
.btn--outline-white:hover { background: rgb(255 255 255 / 12%); color: #fff; }
.cta-band__media { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; border: 4px solid rgb(255 255 255 / 30%); box-shadow: 0 20px 50px rgb(0 0 0 / 25%); }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }

@media print {
  .site-header, .site-footer, .ad-slot, .agent, .cookie, .aside--toc { display: none !important; }
  body { background: #fff; color: #000; }
}
