/* ==========================================================================
   SUTERM Sección 54 — Hoja de estilos del portal
   ========================================================================== */
:root {
  --bg: #080d19;
  --bg-2: #0b1222;
  --surface: #101a2c;
  --surface-2: #15213a;
  --surface-3: #1b2945;
  --border: rgba(148, 163, 184, .14);
  --border-strong: rgba(148, 163, 184, .26);
  --text: #eef2f8;
  --text-2: #c3cbd9;
  --muted: #8d99ad;
  --red: #e5202e;
  --red-hover: #f23441;
  --red-soft: rgba(229, 32, 46, .12);
  --red-border: rgba(229, 32, 46, .45);
  --orange: #f26b1d;
  --green: #22c55e;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --grid-line: rgba(148, 163, 184, .045);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --surface-3: #e8edf6;
  --border: rgba(15, 23, 42, .1);
  --border-strong: rgba(15, 23, 42, .2);
  --text: #0e1626;
  --text-2: #334155;
  --muted: #64748b;
  --red-soft: rgba(229, 32, 46, .08);
  --green: #16a34a;
  --amber: #d97706;
  --blue: #2563eb;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --pink: #db2777;
  --grid-line: rgba(15, 23, 42, .04);
  --shadow: 0 16px 40px -20px rgba(15, 23, 42, .25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
i[data-lucide], svg.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; flex-shrink: 0; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(860px, 100% - 32px); }

/* ---------- Barra superior ---------- */
.topbar { background: var(--bg-2); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; white-space: nowrap; }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .sep { width: 1px; height: 14px; background: var(--border-strong); }
.topbar .live { color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.topbar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.topbar .item { display: inline-flex; align-items: center; gap: 6px; }
.topbar .item i { color: var(--amber); }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #f23441, #b8121d); box-shadow: 0 10px 24px -8px rgba(229, 32, 46, .7); color: #ffd23f; }
.brand-logo i { width: 26px; height: 26px; fill: #ffd23f; stroke: #ffd23f; }
.brand-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -.03em; line-height: 1; }
.brand-sec { font-size: 11.5px; font-weight: 700; color: var(--red); border: 1px solid var(--red-border); background: var(--red-soft);
  padding: 3px 8px; border-radius: 999px; letter-spacing: 0; }
.brand-tag { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav .dd > button { font-size: 14.5px; font-weight: 600; color: var(--text-2); padding: 10px 12px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; font-family: inherit; line-height: 1.2; white-space: nowrap; }
.nav > a:hover, .nav .dd > button:hover, .nav > a.active { color: var(--text); background: var(--surface-2); }
.nav > a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--red); }
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); display: none; }
.dd.open .dd-menu { display: block; }
.dd-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14.5px; color: var(--text-2); font-weight: 500; }
.dd-menu a:hover { background: var(--surface-2); color: var(--text); }
.dd-menu a i { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: none; border: 0;
  color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn i { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 12px 30px -10px rgba(229, 32, 46, .75); }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-xs { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn i { width: 18px; height: 18px; }
.btn-cta { padding: 12px 20px; }
.btn-cta i { color: #ffd23f; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 80px; border-bottom: 1px solid var(--border); overflow: hidden; }
.grid-bg { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 30%, transparent 75%); }
.hero::after { content: ""; position: absolute; width: 600px; height: 600px; left: -200px; top: -250px; pointer-events: none;
  background: radial-gradient(circle, rgba(229, 32, 46, .14), transparent 65%); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: start; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--red);
  background: var(--red-soft); border: 1px solid var(--red-border); padding: 7px 14px; border-radius: 999px; }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(229, 32, 46, .2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(229, 32, 46, 0); } }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); font-weight: 900; letter-spacing: -.045em; line-height: 1.02; margin: 26px 0 22px; }
.grad { background: linear-gradient(95deg, var(--red) 10%, var(--orange) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; color: var(--text-2); max-width: 640px; margin-bottom: 30px; }
.hero .lead strong { color: var(--text); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.stat span { font-size: 13px; color: var(--text-2); }
.stat:nth-child(1) b { color: var(--red); }
.stat:nth-child(2) b { color: var(--green); }
.stat:nth-child(3) b { color: var(--amber); }

/* Tablero de avisos */
.board { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.board-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.board-head h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.board-head h2 i { color: var(--red); width: 20px; height: 20px; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; }
.badge-green { color: var(--green); background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .3); }
.badge-red { color: var(--red); background: var(--red-soft); border: 1px solid var(--red-border); }
.badge-amber { color: var(--amber); background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .3); }
.badge-blue { color: var(--blue); background: rgba(96, 165, 250, .12); border: 1px solid rgba(96, 165, 250, .3); }
.badge-muted { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.alert-card { border-radius: var(--radius); padding: 16px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.alert-card.urgent { background: linear-gradient(160deg, rgba(229, 32, 46, .12), rgba(229, 32, 46, .03)); border-color: var(--red-border); }
.alert-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--red); margin-bottom: 6px; }
.alert-card:not(.urgent) .alert-top { color: var(--amber); }
.alert-card h3 { font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1.45; margin: 0 0 10px; letter-spacing: 0; }
.alert-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.alert-bottom a { color: var(--red); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.mini { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 14px; transition: border-color .15s, transform .15s; }
.mini:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.mini i { width: 24px; height: 24px; margin-bottom: 10px; }
.mini b { display: block; font-size: 14px; font-weight: 700; }
.mini span { font-size: 12.5px; color: var(--muted); }
.doc-strip { display: flex; align-items: center; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.doc-strip > i { color: var(--amber); width: 26px; height: 26px; }
.doc-strip b { display: block; font-size: 14px; }
.doc-strip span { display: block; font-size: 12px; color: var(--muted); }
.doc-strip .btn { margin-left: auto; }

/* ---------- Colores por tipo ---------- */
.c-red { color: var(--red); } .c-green { color: var(--green); } .c-amber { color: var(--amber); } .c-blue { color: var(--blue); }
.c-violet { color: var(--violet); } .c-cyan { color: var(--cyan); } .c-pink { color: var(--pink); } .c-muted { color: var(--muted); }
.bg-red { --tone: var(--red); } .bg-green { --tone: var(--green); } .bg-amber { --tone: var(--amber); } .bg-blue { --tone: var(--blue); }
.bg-violet { --tone: var(--violet); } .bg-cyan { --tone: var(--cyan); } .bg-pink { --tone: var(--pink); }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.section-head.left { text-align: left; margin-inline: 0; max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--red);
  border: 1px solid var(--red-border); background: var(--red-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -.04em; }
.section-head p { color: var(--text-2); font-size: 17px; margin: 0; }
.page-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; letter-spacing: -.04em; margin: 14px 0 12px; }
.page-hero p { color: var(--text-2); font-size: 18px; max-width: 720px; margin: 0; }
.page-hero .container { position: relative; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }

/* Filtros tipo chip */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.chip { padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-2); cursor: pointer; font-family: inherit; }
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 10px 24px -12px rgba(229, 32, 46, .8); }

/* Tarjetas */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
a.card:hover, .card.hover:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .more { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--red); display: inline-flex; gap: 6px; align-items: center; }
.icon-tile { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  color: var(--tone, var(--red)); background: color-mix(in srgb, var(--tone, var(--red)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone, var(--red)) 30%, transparent); }
.icon-tile i { width: 24px; height: 24px; }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.tag-clausula { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 9px; border-radius: 7px; white-space: nowrap; }
.dato { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--tone, var(--red)); letter-spacing: -.02em; margin-bottom: 4px; }

/* Flyer de comunicados */
.flyer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s, box-shadow .2s; }
.flyer:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.flyer-head { padding: 20px 22px 18px; background: linear-gradient(135deg, #7f0d15, #c3131f 55%, #e8521d); color: #fff; position: relative; overflow: hidden; }
.flyer-head::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,255,255,.08); }
.flyer-head.local { background: linear-gradient(135deg, #0e2a5c, #1d4ed8 60%, #0891b2); }
.flyer-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .92; margin-bottom: 10px; position: relative; z-index: 1; }
.flyer-head h3 { font-size: 21px; font-weight: 900; line-height: 1.2; margin: 0; position: relative; z-index: 1; color: #fff; }
.flyer-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.flyer-body p { margin: 0; color: var(--text-2); font-size: 15px; }
.flyer-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.flyer-points li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.flyer-points li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--red); margin-top: 8px; flex-shrink: 0; transform: rotate(45deg); }
.flyer-facts { display: grid; gap: 8px; }
.fact { display: flex; gap: 10px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.fact i { color: var(--amber); margin-top: 2px; }
.fact b { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.flyer-foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-top: 1px solid var(--border); margin-top: auto; align-items: center; }
.flyer-foot .src { font-size: 12px; color: var(--muted); margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }

.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.tabs a { padding: 10px 18px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--text-2); display: inline-flex; gap: 8px; align-items: center; }
.tabs a.active { background: var(--red); color: #fff; }

/* Detalle / prosa */
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.prose { color: var(--text-2); font-size: 16.5px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose h2 { color: var(--text); font-size: 24px; margin-top: 1.4em; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.box h2, .box h3 { font-size: 18px; display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.box h2 i, .box h3 i { color: var(--red); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; color: var(--text-2); }
.checklist li i { color: var(--green); margin-top: 3px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--text-2); }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }
.steps li span { padding-top: 6px; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .28); color: var(--text-2); font-size: 14.5px; }
.note i { color: var(--amber); margin-top: 3px; }
.note.info { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .28); }
.note.info i { color: var(--blue); }

/* Contrato / buscador */
.ask { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.ask-form { display: flex; gap: 10px; }
.input, .ask-form input, select.input, textarea.input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-strong); color: var(--text); border-radius: 12px; padding: 13px 16px;
  font-size: 16px; font-family: inherit; }
.input:focus, .ask-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.suggest button, .suggest a { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.suggest button:hover, .suggest a:hover { color: var(--text); border-color: var(--border-strong); }
.answer { margin-top: 22px; padding: 20px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(96,165,250,.08), transparent); border: 1px solid rgba(96,165,250,.25); }
.answer .label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.result { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.result:hover { border-color: var(--border-strong); }
.result b { display: block; margin-bottom: 4px; }
.result small { color: var(--muted); font-size: 14px; display: block; }
.idx { columns: 2; column-gap: 24px; font-size: 14.5px; }
.idx a { display: block; padding: 6px 0; color: var(--text-2); break-inside: avoid; border-bottom: 1px dashed var(--border); }
.idx a:hover { color: var(--red); }
.idx a span { color: var(--muted); font-weight: 700; display: inline-block; min-width: 32px; }
.clause-text { white-space: pre-line; font-size: 16.5px; color: var(--text-2); line-height: 1.75; }
mark { background: rgba(251, 191, 36, .3); color: inherit; border-radius: 3px; padding: 0 2px; }

/* Herramientas */
.tool-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tool { display: none; }
.tool.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field small { color: var(--muted); font-size: 12.5px; }
.out { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.out .stat b { font-size: 24px; }
.out .stat { background: var(--surface-2); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.tbl th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.tbl tr.hl td { background: var(--red-soft); color: var(--text); font-weight: 700; }
.table-wrap { overflow-x: auto; }

/* Calendario */
.event { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; }
.event-date { text-align: center; border-radius: 12px; background: var(--red-soft); border: 1px solid var(--red-border); padding: 8px 4px; align-self: start; }
.event-date b { display: block; font-size: 26px; font-family: var(--font-display); line-height: 1; color: var(--red); }
.event-date span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-2); }
.event h3 { font-size: 16.5px; margin: 0 0 4px; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.event p { margin: 0; color: var(--muted); font-size: 14px; }
.event .meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); margin: 4px 0; }
.event .meta span { display: inline-flex; align-items: center; gap: 5px; }

/* Galería */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery a { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; background: rgba(5, 8, 15, .95); z-index: 100; display: none; place-items: center; padding: 20px 64px; touch-action: pan-y; }
.lightbox.open { display: grid; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lightbox img { max-height: 84vh; max-width: 100%; border-radius: 10px; object-fit: contain; user-select: none; }
.lightbox figcaption { color: #e5e7eb; display: flex; gap: 14px; justify-content: center; align-items: baseline; margin-top: 12px; font-size: 14.5px; text-align: center; }
.lightbox .lb-num { color: #9ca3af; font-size: 13px; white-space: nowrap; }
.lb-btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: var(--red); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Galería: mosaico de recuerdos */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; gap: 12px; }
.mosaic-item { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.mosaic-item:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic-item:nth-child(6) { grid-column: span 2; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mosaic-item:hover img { transform: scale(1.05); }
.mosaic-cap { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .25s; }
.mosaic-cap b { font-size: 14px; line-height: 1.25; }
.mosaic-cap small { font-size: 12px; opacity: .8; }
.mosaic-item:hover .mosaic-cap, .mosaic-item:first-child .mosaic-cap { opacity: 1; }
.mosaic.mini { grid-template-columns: repeat(5, 1fr); grid-auto-rows: 150px; }
.mosaic.mini .mosaic-item:first-child { grid-column: span 1; grid-row: span 1; }
.mosaic.mini .mosaic-item:first-child .mosaic-cap { opacity: 0; }
.mosaic.mini .mosaic-item:hover .mosaic-cap { opacity: 1; }
.mosaic.mini .mosaic-item:nth-child(6) { grid-column: auto; }

/* Galería: álbumes */
.year-title { font-size: 15px; font-weight: 800; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.year-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.album-year { margin-bottom: 34px; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.album-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .2s, border-color .2s; display: flex; flex-direction: column; }
.album-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.album-cover { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--surface-2); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.album-card:hover .album-cover img { transform: scale(1.05); }
.album-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.65); padding: 4px 9px; border-radius: 99px; }
.album-count i { width: 14px; height: 14px; }
.album-ejemplo { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #111; background: #fbbf24; padding: 3px 8px; border-radius: 6px; }
.album-body { padding: 14px 16px 16px; }
.album-body h4 { font-size: 17px; margin: 8px 0 6px; line-height: 1.3; }
.album-body .meta, .album-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-2); }
.album-body .meta span, .album-meta span { display: inline-flex; align-items: center; gap: 5px; }
.album-body .meta i, .album-meta i { width: 14px; height: 14px; }
.album-meta { font-size: 14.5px; }
.album-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.podio { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-weight: 600; }
.podio li::marker { color: var(--amber); font-weight: 800; }
.photo-wall { columns: 4 160px; column-gap: 12px; }
.photo-wall a { display: block; margin-bottom: 12px; border-radius: 12px; overflow: hidden; background: var(--surface-2); break-inside: avoid; }
.photo-wall img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.photo-wall a:hover img { transform: scale(1.03); }
.event .ver-fotos { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--red); }
.event .ver-fotos i { width: 15px; height: 15px; }

/* Comité */
.member { text-align: center; align-items: center; }
.avatar { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; background: var(--surface-2);
  border: 2px solid var(--red-border); color: var(--red); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar i { width: 36px; height: 36px; }
.member .cargo { font-weight: 800; font-size: 16.5px; }
.member .nombre { color: var(--muted); font-size: 14px; margin-bottom: 10px; }

/* Acordeón (FAQ) */
details.faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--red); font-size: 22px; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq .prose { padding: 0 20px 18px; font-size: 15.5px; }

/* Glosario */
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.letters a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.letters a:hover { border-color: var(--red); color: var(--red); }
.term { padding: 18px 0; border-bottom: 1px solid var(--border); }
.term h3 { font-size: 18px; margin: 0 0 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Formularios públicos */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.form-card .field { margin-bottom: 16px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { cursor: pointer; }
.radio-row input { position: absolute; opacity: 0; }
.radio-row span { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border-strong); font-weight: 600; font-size: 14px; color: var(--text-2); }
.radio-row input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.hp { position: absolute; left: -9999px; }

/* Contacto */
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 14px; align-items: start; }
.contact-item .icon-tile { margin: 0; width: 44px; height: 44px; }
.contact-item b { display: block; }
.contact-item span, .contact-item a { color: var(--text-2); }
.map { border: 0; width: 100%; height: 100%; min-height: 360px; border-radius: var(--radius-lg); filter: grayscale(.2); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }

/* CTA banda */
.cta-band { background: linear-gradient(120deg, #8a0f18, #d01622 50%, #ef5a1d); border-radius: 24px; padding: 44px; color: #fff; display: grid;
  grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255,255,255,.08); }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); font-weight: 900; margin-bottom: 8px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); font-size: 17px; }
.cta-band .btn { background: #fff; color: #b8121d; position: relative; z-index: 1; }

/* Empty state */
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty i { width: 40px; height: 40px; color: var(--muted); margin: 0 auto 12px; }

/* Pie */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 28px; margin-top: 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font); margin-bottom: 14px; }
.footer a { display: block; color: var(--text-2); padding: 4px 0; }
.footer a:hover { color: var(--red); }
.disclaimer { border-top: 1px solid var(--border); padding-top: 22px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Botón flotante WhatsApp/ayuda */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; box-shadow: 0 14px 30px -10px rgba(229, 32, 46, .8); }
.fab i { width: 24px; height: 24px; }

/* Menú móvil */
.mobile-nav { position: fixed; inset: 0; z-index: 60; background: var(--bg); padding: 20px; overflow-y: auto; display: none; }
.mobile-nav.open { display: block; }
.mobile-nav .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 6px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-nav a i { color: var(--red); }
.search-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(4, 8, 16, .75); backdrop-filter: blur(6px); display: none; padding: 12vh 16px; }
.search-overlay.open { display: block; }
.search-overlay form { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .topbar .right { display: none; }
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
  .header .btn-cta span { display: none; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .mosaic-item:nth-child(6) { grid-column: auto; }
  .mosaic-item:nth-child(n+8) { display: none; }
  .mosaic.mini { grid-template-columns: repeat(2, 1fr); }
  .mosaic.mini .mosaic-item:first-child { grid-column: span 2; }
  .mosaic.mini .mosaic-item:nth-child(n+6) { display: none; }
  .lightbox { padding: 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}
@media (max-width: 760px) {
  .topbar .hide-sm { display: none; }
  .header .container { min-height: 64px; gap: 10px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 19px; }
  .header .btn-cta { display: none; }
  .header-actions { gap: 0; }
  .icon-btn { width: 38px; height: 38px; }
  .brand { min-width: 0; }
  .brand-sec { font-size: 10.5px; padding: 2px 6px; }
  .hero { padding: 44px 0 56px; }
  .hero .lead { font-size: 17px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 56px 0; }
  .ask-form { flex-direction: column; }
  .idx { columns: 1; }
  .cta-band { grid-template-columns: 1fr; padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .tabs { display: flex; width: 100%; }
  .tabs a { flex: 1; justify-content: center; padding: 10px 8px; }
  .doc-strip { flex-wrap: wrap; }
  .doc-strip .btn { margin-left: 0; }
}

@media print {
  .topbar, .header, .footer, .fab, .chips, .tabs, .flyer-foot .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
.pasados .event { opacity: .7; }
.pasados .event:has(.ver-fotos) { opacity: 1; }
