/* ============================================================
   Catálogo IA Perú — Estilos principales
   PCM · SGTD  |  v2.4.1
   ============================================================ */

:root {
  --primary: #BF0909;
  --primary-dark: #920707;
  --dark: #0d1b2a;
  --dark-mid: #1a2e4a;
  --blue: #0f69af;
  --gray-bg: #f3f4f6;
  --gray-border: #dee2e6;
  --control-border: #6b7280;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #212529;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--blue); }
a:hover { color: #0a4f8a; }

/* ── TOP STRIP ───────────────────────────────────────────────────────────── */
.top-strip { background: #202224; padding: .3rem 0; }
.top-strip__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; font-size: .72rem; color: rgba(255,255,255,.8);
}
.top-strip a { color: rgba(255,255,255,.85); text-decoration: none; }
.top-strip a:hover { color: #fff; }
.top-strip .sep { margin: 0 .4rem; opacity: .5; }

/* ── BARRA DE CONTEXTO DE ENTIDAD ────────────────────────────────────────────
   A qué entidad pertenece la sesión (OIA titular o alterno) — visible en toda
   página, justo debajo del nav principal y antes del breadcrumb/título de cada
   pantalla, para que nunca quede escondida dentro de un menú desplegable. */
.entidad-context-bar { background: #fef2f2; border-bottom: 1px solid #fecaca; }
.entidad-context-bar__inner {
  max-width: 1280px; margin: 0 auto; padding: .55rem 1.5rem;
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 700; color: var(--primary-dark);
}
.entidad-context-bar__inner i { color: var(--primary); }

/* ── NAV ─────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--primary) !important;
  border-bottom: 1px solid var(--primary-dark);
}
.site-nav__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1rem;
  height: 76px; display: flex; align-items: center;
  justify-content: space-between; gap: .3rem;
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; flex-shrink: 0; }
.brand-logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand__logo {
  display: flex; align-items: center; flex-shrink: 0;
  background: #fff; border-radius: 6px; padding: .3rem .5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.brand__logo img { display: block; height: 62px; width: auto; }
.brand__divider { width: 1px; height: 32px; background: rgba(255,255,255,.35); flex-shrink: 0; }
.brand__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: #fff; color: var(--primary); font-size: .95rem;
  font-weight: 700; letter-spacing: .04em; border-radius: 4px;
}
.brand__sub {
  font-size: .65rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.7); line-height: 1.2; display: block;
}
.brand__name { font-size: 1.05rem; font-weight: 600; color: #fff; line-height: 1.2; display: block; }
.site-nav__menu {
  display: flex; align-items: center; gap: .05rem; list-style: none;
  flex: 1; justify-content: center;
}
.site-nav__menu a {
  display: inline-flex; align-items: center;
  color: rgba(255,255,255,.85); font-size: .72rem; padding: .4rem .25rem;
  border-radius: 4px; text-decoration: none; white-space: nowrap;
}
.site-nav__menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-nav__btns { display: flex; gap: .35rem; flex-shrink: 0; }
.btn-acceder {
  font-size: .74rem; padding: .38rem .6rem;
  border: 1px solid rgba(255,255,255,.6); border-radius: 4px;
  background: transparent; color: #fff; text-decoration: none; cursor: pointer;
}
.btn-acceder:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-registrar {
  font-size: .74rem; padding: .38rem .6rem; border-radius: 4px;
  background: #fff; color: var(--primary); text-decoration: none;
  font-weight: 700; cursor: pointer;
}
.btn-registrar:hover { background: #f5f5f5; color: var(--primary-dark); }

/* ── MODAL GENÉRICO (compartido por "Ver perfil", "Notificaciones" y "Ver
   auditoría" en GestionCatalogo/Detalle.cshtml) ─────────────────────────── */
.ia-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1050;
  background: rgba(15,15,15,.5);
  align-items: center; justify-content: center; padding: 1rem;
}
.ia-modal-overlay--open { display: flex; }
body.ia-modal-open { overflow: hidden; }

.ia-modal {
  background: #fff; border-radius: 10px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
  max-height: calc(100vh - 2rem); display: flex; flex-direction: column;
}
.ia-modal__header {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.ia-modal__title {
  margin: 0; font-size: 1rem; font-weight: 700; color: var(--primary-dark, #333);
  display: flex; align-items: center; gap: .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ia-modal__header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.ia-modal__close {
  background: none; border: none; cursor: pointer; color: #888;
  font-size: 1.1rem; line-height: 1; padding: .25rem .4rem; border-radius: 4px; flex-shrink: 0;
}
.ia-modal__close:hover { background: #f5f5f5; color: #333; }
.ia-modal__body { padding: 1.25rem; overflow-y: auto; }
.ia-modal__loading, .ia-modal__error, .ia-modal__vacio {
  margin: 0; text-align: center; color: #777; font-size: .85rem; padding: 2rem 0;
}
.ia-modal__error { color: #c0392b; }

/* ── MODAL "VER PERFIL" (solo lo que le es propio) ───────────────────────── */
.ia-modal--perfil { max-width: 540px; }
.perfil-modal__datos { display: grid; grid-template-columns: 140px 1fr; gap: .6rem 1rem; margin: 0; }
.perfil-modal__datos dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #999; align-self: center; }
.perfil-modal__datos dd { margin: 0; font-size: .88rem; color: #222; overflow-wrap: anywhere; }

/* ── PANEL "NOTIFICACIONES" (solo lo que le es propio) ───────────────────── */
.ia-modal--notif { max-width: 480px; }
.ia-modal--notif .ia-modal__body { padding: .5rem 0; }
.notif-modal__marcar-todas {
  background: none; border: none; cursor: pointer; color: var(--primary, #BF0909);
  font-size: .74rem; font-weight: 600; padding: .25rem .3rem; white-space: nowrap;
}
.notif-modal__marcar-todas:hover { text-decoration: underline; }

.notif-modal__lista { list-style: none; margin: 0; padding: 0; }
.notif-item {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .8rem 1.25rem; border-bottom: 1px solid #f2f2f2; cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f9fafb; }
.notif-item[data-leida="false"] { background: #fef2f2; }
.notif-item[data-leida="false"]:hover { background: #fde8e8; }
.notif-item__dot {
  width: 9px; height: 9px; border-radius: 50%; margin-top: .35rem; flex-shrink: 0;
  background: transparent;
}
.notif-item[data-leida="false"] .notif-item__dot { background: #ef4444; }
.notif-item__contenido { min-width: 0; flex: 1; }
.notif-item__mensaje { margin: 0; font-size: .85rem; color: #222; line-height: 1.5; }
.notif-item[data-leida="false"] .notif-item__mensaje { font-weight: 600; }
.notif-item__mensaje--truncado {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.notif-item__ver-mas {
  display: inline-block; margin: .3rem 0 0; font-size: .78rem; font-weight: 600;
  color: var(--primary, #BF0909); background: none; border: none; padding: 0; cursor: pointer;
}
.notif-item__ver-mas:hover { text-decoration: underline; }
.notif-item__fecha { display: block; margin-top: .2rem; font-size: .72rem; color: #999; }
.notif-item__link {
  display: inline-block; margin-top: .35rem; font-size: .78rem; font-weight: 600;
  color: var(--primary, #BF0909); text-decoration: none;
}
.notif-item__link:hover { text-decoration: underline; }

/* ── HAMBURGER MENU ──────────────────────────────────────────────────────── */
.menu-toggle {
  display: none; background: transparent;
  border: 2px solid rgba(255,255,255,.8); color: #fff;
  padding: .5rem .65rem; border-radius: 4px; cursor: pointer;
  flex-direction: column; gap: .28rem;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.menu-toggle span {
  display: block; width: 22px; height: 2.5px; background: #fff;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(10px, 10px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: scale(0); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(9px, -9px); }
/* Reglas de .site-nav__menu.mobile-open: ver @media (max-width: 1300px) más
   abajo — deben quedar dentro del breakpoint para que el menú vuelva a modo
   desktop automáticamente al ensanchar la ventana (sin recargar la página). */

/* ── HERO ────────────────────────────────────────────────────────────────── */
.hero {
  background: url('/img/hero/fondo_hero.png') center/cover no-repeat;
  color: #000; padding: 5rem 1.5rem 4rem;
}
.hero__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero__badge {
  display: inline-block; background: rgba(191,9,9,.08);
  border: 1px solid rgba(191,9,9,.18); color: #BF0909;
  font-size: .7rem; font-weight: 600; letter-spacing: .06em;
  padding: .3rem .85rem; border-radius: 20px; margin-bottom: 1.5rem;
}
.hero__title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 1.25rem;
}
.hero__title em { color: #BF0909; font-style: normal; }
.hero__desc { font-size: .95rem; color: #495057; line-height: 1.7; margin-bottom: 2rem; max-width: 500px; }
.hero__btns { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.btn-hero-primary {
  background: #BF0909; color: #fff; padding: .65rem 1.4rem;
  border-radius: 5px; text-decoration: none; font-weight: 600;
  font-size: .875rem; border: none; cursor: pointer;
}
.btn-hero-sec {
  background: transparent; color: #BF0909; padding: .65rem 1.4rem;
  border-radius: 5px; text-decoration: none; font-size: .875rem;
  border: 1px solid #BF0909; cursor: pointer;
}
.hero__meta { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .72rem; color: #6c757d; }
.hero__meta .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #BF0909;
  display: inline-block; margin-right: .3rem; vertical-align: middle;
}

/* ── TERMINAL ────────────────────────────────────────────────────────────── */
.terminal {
  background: #0f172a; border-radius: 10px; overflow: hidden;
  border: 1px solid #1e3a5f;
}
.terminal__bar {
  background: #1e293b; padding: .5rem .9rem;
  display: flex; align-items: center; gap: .4rem;
}
.terminal__dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal__label { margin-left: .5rem; font-size: .68rem; color: #64748b; font-family: var(--mono); }
.terminal__body {
  padding: 1.1rem 1.25rem; font-family: var(--mono); font-size: .73rem;
  line-height: 1.7; overflow-x: auto; color: #e2e8f0;
}
.t-comment { color: #475569; }
.t-cmd     { color: #38bdf8; }
.t-key     { color: #a5b4fc; }
.t-val     { color: #86efac; }
.t-str     { color: #fde68a; }
.terminal__cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .75rem; padding: .5rem .9rem 1rem;
}
.tcard { background: #1e293b; border-radius: 6px; padding: .6rem .85rem; }
.tcard__label { font-size: .62rem; color: #64748b; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .2rem; }
.tcard__val   { font-family: var(--mono); font-size: .68rem; color: #e2e8f0; word-break: break-all; }
.tcard__badge {
  display: inline-block; background: #14532d; color: #86efac;
  font-size: .6rem; font-weight: 700; padding: .1rem .4rem;
  border-radius: 3px; margin-top: .25rem;
}

/* ── KPI BAR ─────────────────────────────────────────────────────────────── */
.kpi-bar { background: var(--gray-bg); border-bottom: 1px solid var(--gray-border); padding: 1.5rem; }
.kpi-bar__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.kpi { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.kpi__icon           { font-size: 1.8rem; color: #BF0909; }
.kpi__icon--modelo   { color: #0f69af; }
.kpi__icon--dataset  { color: #16a34a; }
.kpi__icon--algoritmo { color: #BF0909; }
.kpi__icon--entidad  { color: #6c757d; }
.kpi__num   { font-size: 1.75rem; font-weight: 800; color: var(--dark); line-height: 1; }
.kpi__label { font-size: .78rem; color: #6c757d; margin-top: .3rem; }

/* ── SECTIONS ────────────────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section--alt { background: var(--gray-bg); }
.section__inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.section__eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: .75rem;
}
.section__heading { font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 800; color: var(--dark); margin-bottom: .75rem; }
.section__sub { font-size: .9rem; color: #6c757d; max-width: 600px; margin-bottom: 2rem; line-height: 1.65; }
.section__sub--full { max-width: none; }
.section-label { font-size: .7rem; color: #6c757d; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; }

/* ── SEARCH ──────────────────────────────────────────────────────────────── */
.search-bar { display: flex; gap: .75rem; margin-bottom: .75rem; align-items: center; }
.search-bar input {
  flex: 1; padding: .55rem 1rem; border: 1px solid var(--gray-border);
  border-radius: 5px; font-size: .875rem; min-width: 0;
}
.search-bar input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15,105,175,.12);
}
.btn-filtros {
  position: relative; display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1.1rem; border: 1px solid var(--gray-border); border-radius: 5px;
  background: #fff; font-size: .875rem; cursor: pointer; white-space: nowrap;
  transition: border-color .2s, background .2s;
}
.btn-filtros:hover          { border-color: #adb5bd; background: #f8f9fa; }
.btn-filtros.is-open        { border-color: var(--primary); background: #fff5f5; }
.filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px;
  background: var(--primary); color: #fff; font-size: .65rem; font-weight: 700; line-height: 1;
}

/* ── PANEL FILTROS ───────────────────────────────────────────────────────── */
.filter-panel {
  display: none; background: #fff; border: 1px solid var(--gray-border);
  border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: .75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.filter-panel.is-open { display: block; }
.filter-panel__row { display: flex; gap: .85rem; flex-wrap: wrap; align-items: flex-end; }
.filter-panel__row + .filter-panel__row {
  margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--gray-border);
}
.filter-panel__section-label {
  font-size: .68rem; font-weight: 700; color: #adb5bd;
  text-transform: uppercase; letter-spacing: .06em; width: 100%; margin-bottom: -.25rem;
}
.filter-group { display: flex; flex-direction: column; gap: .3rem; min-width: 140px; flex: 1; }
.filter-group label { font-size: .72rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; }
.filter-group select {
  padding: .4rem .7rem; border: 1px solid var(--gray-border); border-radius: 5px;
  font-size: .84rem; background: #fff; cursor: pointer; appearance: auto;
}
.filter-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(191,9,9,.1); }
.filter-group input[type="date"] {
  padding: .4rem .7rem; border: 1px solid var(--gray-border); border-radius: 5px;
  font-size: .84rem; background: #fff; cursor: pointer; color: #495057;
}
.filter-group input[type="date"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(191,9,9,.1); }
.filter-group input[type="date"].input-error { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220,53,69,.15); }
.filter-group .field-hint   { font-size: .7rem; color: #dc3545; margin-top: .15rem; display: none; }
.filter-group .field-hint.visible { display: block; }
.filter-date-range { display: flex; gap: .85rem; flex: 2; min-width: 280px; flex-wrap: wrap; }
.filter-date-range .filter-group { min-width: 120px; }
.filter-panel__actions { display: flex; align-items: flex-end; gap: .5rem; margin-left: auto; }
.btn-apply-filters {
  padding: .42rem 1.1rem; background: var(--primary); color: #fff;
  border: none; border-radius: 5px; font-size: .84rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn-apply-filters:hover { background: #7a0505; }
.btn-clear-filters-panel {
  padding: .42rem .9rem; background: #fff; color: #6c757d;
  border: 1px solid var(--gray-border); border-radius: 5px;
  font-size: .84rem; cursor: pointer; white-space: nowrap;
}
.btn-clear-filters-panel:hover { background: #f8f9fa; color: #212529; }

@media (max-width: 700px) {
  .filter-group           { min-width: 100%; }
  .filter-date-range      { min-width: 100%; }
  .filter-panel__actions  { width: 100%; justify-content: flex-end; }
}

/* ── FILTER CHIPS ────────────────────────────────────────────────────────── */
.filter-chips {
  display: flex; flex-wrap: wrap; gap: .45rem;
  align-items: center; margin-bottom: 1rem; min-height: 0;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .75rem; background: #f0f4ff;
  border: 1px solid #c2d0f0; border-radius: 20px;
  font-size: .78rem; color: #2c4a8a; font-weight: 500;
}
.filter-chip__remove {
  background: none; border: none; padding: 0 0 0 .1rem;
  cursor: pointer; color: #2c4a8a; font-size: .72rem;
  line-height: 1; display: flex; align-items: center; opacity: .7;
}
.filter-chip__remove:hover { opacity: 1; color: var(--primary); }
.filter-chips__clear {
  background: none; border: none; padding: 0; font-size: .78rem;
  color: #555; cursor: pointer; text-decoration: none; margin-left: .25rem; font-weight: 400;
}
.filter-chips__clear:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 899px) {
  .btn-filtros .btn-filtros__text { display: none; }
  .btn-filtros { padding: .55rem .75rem; }
}

/* ── VIEW TOGGLE ─────────────────────────────────────────────────────────── */
.view-toggle {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem;
  flex-wrap: wrap; justify-content: space-between;
}
.view-toggle__left  { display: flex; align-items: center; gap: .5rem; }
.view-toggle__label { font-size: .78rem; color: #6c757d; white-space: nowrap; }
.toggle-switch {
  display: flex; background: var(--gray-bg);
  border: 1px solid var(--gray-border); border-radius: 6px; overflow: hidden;
}
.toggle-switch__btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .38rem .85rem; font-size: .78rem; border: none;
  background: transparent; color: #6c757d; cursor: pointer; transition: all .2s ease;
}
.toggle-switch__btn.active { background: var(--primary); color: #fff; }
.toggle-switch__btn i      { font-size: .85rem; }

/* ── DENSITY SELECTOR ────────────────────────────────────────────────────── */
.density-selector { display: flex; align-items: center; gap: .4rem; }
.density-selector select {
  padding: .32rem .6rem; border: 1px solid var(--gray-border);
  border-radius: 5px; font-size: .78rem; background: #fff;
  color: #495057; cursor: pointer; appearance: auto;
}
.density-selector select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(191,9,9,.08); }

/* ── LOAD MORE ───────────────────────────────────────────────────────────── */
.load-more-wrap { display: flex; justify-content: center; margin: 1.5rem 0 .5rem; }
.btn-load-more {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .65rem 2rem; background: #fff; border: 1.5px solid #ced4da;
  border-radius: 30px; font-size: .875rem; color: #495057;
  cursor: pointer; font-weight: 500;
  transition: border-color .2s, box-shadow .2s, color .2s;
}
.btn-load-more:hover { border-color: #868e96; color: #212529; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.btn-load-more i { font-size: .8rem; }

/* ── SORT BAR ────────────────────────────────────────────────────────────── */
.sort-bar__wrapper { display: flex; align-items: center; gap: .5rem; }
.sort-bar {
  display: flex; align-items: center; background: var(--gray-bg);
  border: 1px solid var(--gray-border); border-radius: 6px; overflow: hidden;
}
.sort-bar__btn {
  font-size: .78rem; font-weight: 500; padding: .38rem .85rem;
  border: none; border-right: 1px solid var(--gray-border);
  background: transparent; color: #6c757d; cursor: pointer;
  transition: all .2s ease; white-space: nowrap;
}
.sort-bar__btn:last-child  { border-right: none; }
.sort-bar__btn.active      { background: var(--primary); color: #fff; font-weight: 700; }
.sort-bar__btn:hover:not(.active) { background: rgba(0,0,0,.06); color: var(--dark); }

@media (max-width: 700px)  { .view-toggle { flex-direction: column; align-items: flex-start; } }
@media (max-width: 899px)  { #btn-table { display: none !important; } }

/* ── CARDS GRID ──────────────────────────────────────────────────────────── */
.catalog-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem; margin-bottom: 1.25rem;
}
.asset-card {
  background: #fff; border: 1px solid var(--gray-border); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .25s ease, transform .25s ease;
}
.asset-card:hover                           { box-shadow: 0 8px 22px rgba(0,0,0,.12); transform: translateY(-3px); }
.asset-card:hover .asset-card__type        { color: #fff; }
.asset-card:hover .asset-card__type i     { color: #fff; }
.asset-card:hover .asset-card__badge i.fa-circle-check { color: #4ade80; filter: drop-shadow(0 0 4px #4ade80); }
.asset-card__header {
  padding: .6rem .9rem; display: flex; align-items: center;
  justify-content: space-between; gap: .5rem; transition: background .25s ease;
}
.asset-card__code-line {
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  color: #111; letter-spacing: .04em; margin-top: .15rem;
}
.asset-card__type { display: flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; color: var(--dark); }
.asset-card__type i { font-size: .82rem; color: var(--dark); }
.asset-card__badge {
  display: flex; align-items: center; gap: .3rem; font-size: .65rem;
  font-weight: 700; white-space: nowrap; background: #fff;
  border-radius: 20px; padding: .2rem .55rem; box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.asset-card__badge i         { color: #22c55e; font-size: .65rem; }
.asset-card__badge i.fa-clock { color: #f59e0b; }
.asset-card__id-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .9rem; font-size: .7rem; color: #6c757d;
  border-bottom: 1px solid var(--gray-border); background: #fff;
}
.asset-card__id-strip .pub-label { font-weight: 600; }
.asset-card__id-strip .stars     { font-size: .7rem; gap: .1rem; }
.asset-card__body  { padding: .85rem .9rem; flex: 1; display: flex; flex-direction: column; gap: .55rem; }
.asset-card__title  { font-size: .88rem; font-weight: 700; line-height: 1.3; }
.asset-card__entity { font-size: .78rem; color: #495057; display: flex; align-items: center; gap: .35rem; }
.asset-card__entity i { color: #6c757d; font-size: .75rem; }
.asset-card__desc {
    font-size: .78rem; color: #4b5563; line-height: 1.6;
}
.asset-card__tags  { display: flex; flex-wrap: wrap; gap: .35rem; }
.asset-card__tag   { font-size: .63rem; padding: .15rem .5rem; border-radius: 3px; border: 1px solid var(--gray-border); color: #495057; background: #f8f9fa; }
.asset-card__tag--license { background: #dbeafe; border-color: #bfdbfe; color: #1d4ed8; }
.asset-card__tag--more { font: inherit; cursor: pointer; font-weight: 700; -webkit-appearance: none; appearance: none; }
.asset-card__tag--more:hover { background: rgba(191,9,9,.08); border-color: rgba(191,9,9,.3); color: var(--primary); }
.js-tag-hidden { display: none; }
.asset-card__footer {
  padding: .7rem .9rem; border-top: 1px solid var(--gray-border);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.asset-card__metric       { font-size: .72rem; color: #6c757d; }
.asset-card__metric strong { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #adb5bd; font-weight: 600; }
.asset-card__metric span   { font-size: .92rem; font-weight: 700; color: var(--dark); }
.btn-ver-card {
  font-size: .73rem; padding: .3rem .85rem; border-radius: 4px;
  background: transparent; text-decoration: none; white-space: nowrap;
  border: 2px solid; cursor: pointer; font-weight: 600;
  transition: background .2s ease, color .2s ease;
}

/* Card — ALGORITMO (rojo) */
.asset-card--algoritmo .asset-card__header  { background: rgba(191,9,9,.08); }
.asset-card--algoritmo:hover .asset-card__header { background: var(--primary); }
.asset-card--algoritmo .asset-card__title   { color: var(--primary); }
.asset-card--algoritmo .btn-ver-card        { color: var(--primary); border-color: var(--primary); }
.asset-card--algoritmo .btn-ver-card:hover  { background: var(--primary); color: #fff; }

/* Card — DATASET (verde) */
.asset-card--dataset .asset-card__header    { background: rgba(22,163,74,.08); }
.asset-card--dataset:hover .asset-card__header { background: #16a34a; }
.asset-card--dataset .asset-card__title     { color: #16a34a; }
.asset-card--dataset .btn-ver-card          { color: #16a34a; border-color: #16a34a; }
.asset-card--dataset .btn-ver-card:hover    { background: #16a34a; color: #fff; }

/* Card — MODELO (azul) */
.asset-card--modelo .asset-card__header     { background: rgba(15,105,175,.08); }
.asset-card--modelo:hover .asset-card__header { background: #0f69af; }
.asset-card--modelo .asset-card__title      { color: #0f69af; }
.asset-card--modelo .btn-ver-card           { color: #0f69af; border-color: #0f69af; }
.asset-card--modelo .btn-ver-card:hover     { background: #0f69af; color: #fff; }

@media (max-width: 1100px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 750px)  { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .catalog-grid { grid-template-columns: 1fr; } }

/* ── TABLE ───────────────────────────────────────────────────────────────── */
.catalog-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.catalog-table th { background: var(--primary); color: #fff; padding: 0; text-align: left; font-weight: 600; font-size: .74rem; letter-spacing: .04em; white-space: nowrap; }
.catalog-table th .th-inner { display: flex; align-items: center; gap: .35rem; padding: .65rem .85rem; }
.catalog-table th.sortable .th-inner { cursor: pointer; -webkit-user-select: none; user-select: none; }
.catalog-table th.sortable .th-inner:hover { background: rgba(255,255,255,.12); }
.catalog-table th.sortable button.th-inner {
  width: 100%; border: none; background: transparent; color: inherit;
  font: inherit; text-align: left; letter-spacing: inherit;
}
.catalog-table th.sortable button.th-inner:focus-visible {
  outline: 2px solid #fff; outline-offset: -2px;
}
.sort-icon { display: inline-flex; flex-direction: column; gap: 1px; opacity: .45; font-size: .6rem; line-height: 1; transition: opacity .15s; }
.catalog-table th.sortable .th-inner:hover .sort-icon { opacity: .75; }
.catalog-table th[aria-sort="ascending"]  .sort-icon,
.catalog-table th[aria-sort="descending"] .sort-icon  { opacity: 1; }
.catalog-table th[aria-sort="ascending"]  .sort-icon .sa { color: #fff; }
.catalog-table th[aria-sort="ascending"]  .sort-icon .sd { opacity: .3; }
.catalog-table th[aria-sort="descending"] .sort-icon .sd { color: #fff; }
.catalog-table th[aria-sort="descending"] .sort-icon .sa { opacity: .3; }
.catalog-table td { padding: .65rem .85rem; border-bottom: 1px solid var(--gray-border); vertical-align: middle; }
.catalog-table td:nth-child(2) { white-space: nowrap; font-weight: 400; }
.catalog-table tr:hover td     { background: #f8f9fa; }
.badge-tipo    { display: inline-flex; align-items: center; gap: .3rem; font-size: .63rem; font-weight: 700; padding: .2rem .55rem; border-radius: 20px; white-space: nowrap; }
.badge-modelo  { background: rgba(15,105,175,.12); color: #0f69af; }
.badge-dataset { background: rgba(22,163,74,.12); color: #16a34a; }
.badge-codigo  { background: rgba(191,9,9,.12); color: #BF0909; }
.badge-activo  { display: inline-flex; align-items: center; gap: .3rem; font-size: .63rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; background: #d1fae5; color: #065f46; }
.badge-revision { display: inline-flex; align-items: center; gap: .3rem; font-size: .63rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; background: #fef3c7; color: #92400e; }
.stars .fa-star.filled { color: #f59e0b; }
.stars .fa-star.empty  { color: #d1d5db; }
.stars { display: inline-flex; gap: .15rem; font-size: .85rem; }
.btn-ver {
  font-size: .73rem; padding: .3rem .85rem; border-radius: 4px;
  background: transparent; color: var(--primary); text-decoration: none;
  white-space: nowrap; border: 2px solid var(--primary); cursor: pointer;
  font-weight: 600; transition: background .2s ease, color .2s ease;
}
.btn-ver:hover { background: var(--primary); color: #fff; }
.btn-ver-normas {
  display: inline-block; font-size: .85rem; padding: .55rem 1.4rem; border-radius: 6px;
  background: transparent; color: var(--primary); text-decoration: none;
  border: 2px solid var(--primary); font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.btn-ver-normas:hover { background: var(--primary); color: #fff; }
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.25rem; font-size: .8rem; color: #6c757d;
  flex-wrap: wrap; gap: .5rem;
}
.pagination-btns { display: flex; gap: .35rem; }
.pagination-btns button { padding: .3rem .7rem; border: 1px solid var(--gray-border); border-radius: 4px; background: #fff; cursor: pointer; font-size: .78rem; }
.pagination-btns button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── ÉTICA ───────────────────────────────────────────────────────────────── */
.etica-section { background: var(--gray-bg); }
.etica-inner   { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.etica-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; color: var(--primary);
  background: rgba(191,9,9,.08); border: 1px solid rgba(191,9,9,.2);
  border-radius: 20px; padding: .25rem .75rem; margin-bottom: 1.1rem;
}
.etica-heading { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1.2; margin-bottom: 1.75rem; }
.etica-features { display: flex; flex-direction: column; gap: 1.5rem; }
.etica-feature  { display: flex; align-items: flex-start; gap: 1rem; }
.etica-feature__icon {
  flex-shrink: 0; width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(191,9,9,.08); border: 1px solid rgba(191,9,9,.18);
  border-radius: 6px; color: var(--primary); font-size: 1rem;
}
.etica-feature__title { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: .3rem; }
.etica-feature__desc  { font-size: .82rem; color: #495057; line-height: 1.55; margin: 0; }
.etica-right          { position: relative; }

/* Code window */
.code-window { background: #1e1e2e; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.code-window__bar { display: flex; align-items: center; gap: .45rem; background: #2a2a3d; padding: .65rem 1rem; }
.dot         { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }
.code-window__filename { font-family: var(--mono); font-size: .72rem; color: #a0a0b0; margin-left: .5rem; }
.code-window__body {
  margin: 0; padding: 1.1rem 1.25rem 1.25rem;
  font-family: var(--mono); font-size: .72rem; line-height: 1.7;
  color: #cdd6f4; overflow-x: auto;
}
.c-kw   { color: #cba6f7; }
.c-fn   { color: #89dceb; }
.c-str  { color: #a6e3a1; }
.c-cm   { color: #6c7086; }
.c-fade { color: #585b70; }

/* Audit card */
.audit-card {
  position: absolute; bottom: -1.5rem; right: -1rem;
  background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
  padding: 1rem 1.25rem; min-width: 170px;
}
.audit-card__title  { font-size: .62rem; font-weight: 700; color: #6c757d; letter-spacing: .06em; margin-bottom: .65rem; }
.audit-card__chart  { display: flex; justify-content: center; margin-bottom: .65rem; }
.audit-card__footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.audit-card__passed { font-size: .78rem; font-weight: 800; color: #22c55e; }
.audit-card__trust  { font-size: .78rem; color: #495057; font-weight: 600; }

@media (max-width: 900px) {
  .etica-inner  { grid-template-columns: 1fr; }
  .audit-card   { position: static; margin-top: 1rem; }
}

/* ── FICHA TÉCNICA ───────────────────────────────────────────────────────── */
.ficha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.ficha-card { background: #fff; border: 1px solid var(--gray-border); border-radius: 8px; padding: 1.75rem; }
.ficha-card__title { font-size: .85rem; font-weight: 700; color: var(--dark); margin-bottom: .2rem; }
.ficha-card__ver   { font-size: .72rem; color: #6c757d; margin-bottom: 1.25rem; }
.kpi-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1.5rem; }
.kpi-mini        { background: var(--gray-bg); border-radius: 6px; padding: .65rem; text-align: center; }
.kpi-mini__num   { font-size: 1.1rem; font-weight: 800; color: var(--dark); }
.kpi-mini__label { font-size: .63rem; color: #6c757d; margin-top: .15rem; }
.demo-bar        { margin-bottom: .65rem; }
.demo-bar__row   { display: flex; justify-content: space-between; font-size: .72rem; color: #495057; margin-bottom: .2rem; }
.demo-bar__track { height: 6px; background: var(--gray-border); border-radius: 3px; overflow: hidden; }
.demo-bar__fill  { height: 100%; background: var(--blue); border-radius: 3px; }
.meta-list       { list-style: none; font-size: .82rem; }
.meta-list li    { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--gray-border); gap: 1rem; }
.meta-list li:last-child { border-bottom: none; }
.meta-key  { color: #6c757d; flex-shrink: 0; }
.meta-val  { color: var(--dark); font-weight: 600; text-align: right; }
.ficha-btns { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.btn-outline { padding: .48rem 1rem; border: 1px solid var(--dark); color: var(--dark); border-radius: 5px; background: #fff; font-size: .82rem; text-decoration: none; cursor: pointer; }
.btn-outline:hover { background: var(--dark); color: #fff; }

/* ── MARCO NORMATIVO ─────────────────────────────────────────────────────── */
.norma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.norma-grid--row { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .norma-grid--row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .norma-grid--row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .norma-grid--row { grid-template-columns: 1fr; } }
.norma-card {
  background: #fff; border: 1px solid var(--primary); border-radius: 8px;
  padding: 1.5rem; border-top: 3px solid var(--primary);
  text-decoration: none; color: inherit; display: block;
  transition: all 0.3s ease; cursor: pointer;
}
.norma-card:hover                  { box-shadow: 0 8px 16px rgba(0,0,0,.1); transform: translateY(-2px); border-color: var(--blue); }
.norma-card:hover .norma-card__title { color: var(--primary); }
.norma-card:hover .norma-card__num   { color: var(--primary); }
.norma-card__num   { font-size: .7rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.norma-card__title { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.norma-card__desc  { font-size: .8rem; color: #6c757d; line-height: 1.55; }

/* ── PIPELINE / CICLO ────────────────────────────────────────────────────── */
.pipeline-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.step__num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue);
  color: #fff; font-weight: 800; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: .85rem;
}
.step__title { font-size: .95rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.step__desc  { font-size: .8rem; color: #6c757d; line-height: 1.55; }
.pipeline-cta {
  background: rgba(191,9,9,.08); border: 1px solid var(--gray-border);
  border-radius: 10px; padding: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.pipeline-cta h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin-bottom: .35rem; }
.pipeline-cta p  { font-size: .85rem; color: #6c757d; }
.btn-cta-primary {
  display: inline-block;
  background: var(--primary); color: #fff; padding: .65rem 1.5rem;
  border-radius: 5px; text-decoration: none; font-weight: 600;
  font-size: .875rem; border: none; cursor: pointer; white-space: nowrap;
}
.btn-cta-primary:hover { background: var(--primary-dark); color: #fff; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: #202224 !important; color: rgba(255,255,255,.75);
  padding: 3rem 1.5rem 0; margin-top: auto;
}
.site-footer__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem; padding-bottom: 2.5rem;
}
.footer-brand__name { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.footer-brand__desc { font-size: .8rem; line-height: 1.65; color: rgba(255,255,255,.6); max-width: 340px; }
.footer-col h4 { font-size: .78rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .85rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .45rem; }
.footer-col ul a { color: rgba(255,255,255,.6); font-size: .8rem; text-decoration: none; }
.footer-col ul a:hover { color: #fff; }

/* ── FOOTER: denuncias ante entidades competentes (colapsable) ──────────── */
.footer-denuncias {
  max-width: 1280px; margin: 0 auto; padding: 0 0 2.5rem;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem;
}
.footer-denuncias__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent;
}
.footer-denuncias__summary::-webkit-details-marker { display: none; }
.footer-denuncias__summary::marker { content: ""; }
.footer-denuncias__summary:hover .footer-denuncias__title { color: rgba(255,255,255,.85); }
.footer-denuncias__title {
  font-size: .78rem; font-weight: 700; color: #fff; text-transform: uppercase;
  letter-spacing: .08em; margin: 0;
}
.footer-denuncias__chevron {
  color: rgba(255,255,255,.5); font-size: .8rem; flex-shrink: 0;
  transition: transform .2s ease;
}
.footer-denuncias[open] .footer-denuncias__chevron { transform: rotate(180deg); }
.footer-denuncias__body { padding-top: 1.4rem; }
.footer-denuncias__intro { max-width: 720px; margin-bottom: 1.4rem; }
.footer-denuncias__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.footer-entidad__nombre { font-size: .8rem; font-weight: 700; color: #fff; margin-bottom: .35rem; }
.footer-entidad__competencia {
  font-size: .75rem; line-height: 1.55; color: rgba(255,255,255,.6); margin-bottom: .6rem;
}
.footer-entidad ul { list-style: none; }
.footer-entidad ul li { margin-bottom: .4rem; font-size: .8rem; color: rgba(255,255,255,.6); }
.footer-entidad ul a { color: rgba(255,255,255,.6); font-size: .8rem; text-decoration: none; }
.footer-entidad ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.2); padding: 1rem 0;
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; font-size: .72rem; color: rgba(255,255,255,.5);
}

/* ── PAGE HEADER (Catálogo, Marco Normativo) ─────────────────────────────── */
.cat-page-header {
  background: #fff;
  padding: 1.6rem 0 1rem;
}
.cat-page-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Breadcrumb */
.cat-breadcrumb-bar {
  width: 100%; background: #fff;
  border-bottom: 1px solid var(--gray-border);
  padding: .85rem 0;
  box-sizing: border-box;
}
.cat-breadcrumb-bar__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
}
.breadcrumb { margin-bottom: 1.1rem; }
.breadcrumb ol {
  display: flex; align-items: center; gap: .35rem;
  list-style: none; padding: 0; margin: 0;
  font-size: .8rem; color: var(--gray-text);
}
.breadcrumb ol li { display: flex; align-items: center; gap: .35rem; }
/* ── A11Y: CTAs sin destino convertidas a botón deshabilitado (WCAG 2.4.4 / 4.1.2) ── */
.btn-outline, .btn-cta-primary, .btn-registrar, .btn-ver, .btn-ver-card {
  font-family: inherit;
}
.btn-outline:disabled, .btn-cta-primary:disabled, .btn-registrar:disabled,
.btn-ver:disabled, .btn-ver-card:disabled {
  opacity: .55; cursor: not-allowed; pointer-events: none;
}

/* ── A11Y: contraste de bordes de controles interactivos (WCAG 1.4.11 AA) ── */
.search-bar input,
.btn-filtros,
.filter-group select,
.filter-group input[type="date"],
.btn-clear-filters-panel,
.btn-load-more,
.density-selector select {
  border-color: var(--control-border);
}

.breadcrumb ol li + li::before {
  content: '/'; color: var(--gray-border); font-size: .75rem;
}
.breadcrumb ol li a {
  color: var(--primary); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: .3rem;
}
.breadcrumb ol li a:hover { text-decoration: underline; }
.breadcrumb ol li:last-child { color: #374151; font-weight: 500; }

/* Título y subtítulo */
.cat-page-header__title {
  font-size: 2rem; font-weight: 800; color: var(--dark);
  margin: 0 0 .55rem; display: flex; align-items: center; gap: .55rem;
  line-height: 1.2;
}
.cat-page-header__title i { color: var(--primary); font-size: 1.7rem; }
.cat-page-header__sub {
  font-size: .95rem; color: var(--gray-text); margin: 0; max-width: 700px;
}

/* ── RESPONSIVE GLOBAL ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner           { grid-template-columns: 1fr; }
  .ficha-grid            { grid-template-columns: 1fr; }
  .pipeline-steps        { grid-template-columns: 1fr 1fr; }
  .kpi-bar__inner        { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner    { grid-template-columns: 1fr; }
  .footer-denuncias__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
/* La marca (logo PCM + badge IA) ahora ocupa más ancho, así que el menú
   completo solo cabe desde ~1300px; por debajo se colapsa al hamburger. */
@media (max-width: 1300px) {
  .menu-toggle           { display: flex; order: 4; }
  .site-nav__menu        { display: none; }

  .site-nav__menu.mobile-open {
    display: flex !important; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; background: var(--primary);
    border-bottom: 1px solid var(--primary-dark);
    padding: 1rem 0; gap: 0; justify-content: flex-start; width: 100%;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .site-nav__menu.mobile-open li  { width: 100%; }
  .site-nav__menu.mobile-open a   { display: block; padding: .75rem 1.5rem; border-radius: 0; }

  .site-nav__inner       { height: auto; flex-wrap: wrap; justify-content: center; row-gap: .5rem; padding-top: .6rem; padding-bottom: .6rem; }
  .brand-logo            { order: 1; flex-basis: 100%; justify-content: center; }
  .brand__divider        { display: none; }
  .brand                 { order: 2; margin-right: auto; }
  .site-nav__btns        { order: 3; }
}
@media (max-width: 600px) {
  .pipeline-steps        { grid-template-columns: 1fr; }
  .kpi-bar__inner        { grid-template-columns: 1fr 1fr; }
  .terminal__cards       { grid-template-columns: 1fr; }
  .hero__btns            { flex-direction: column; }
  .brand                 { gap: .4rem; }
  .brand__logo           { padding: .4rem .65rem; }
  .brand__logo img       { height: 72px; }
  .brand__badge          { width: 38px; height: 38px; font-size: .85rem; }
  .brand__name           { font-size: .9rem; }
  .brand__sub            { font-size: .58rem; }
  .site-nav__btns .btn-registrar { display: none; }
}
