/* ============================================================
   SUTEYM — Institutional Modern · 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap');

:root {
  /* ── Neutrals (clean, cool) ──────────────────────────── */
  --paper:        #ffffff;     /* fondo principal */
  --paper-2:      #f4f5f7;     /* surface secundario */
  --paper-3:      #e9eaee;     /* surface terciario / placeholder */
  --ink:          #0b1220;     /* texto principal (azul-negro institucional) */
  --ink-2:        #404754;     /* texto secundario */
  --ink-3:        #6c7280;     /* texto terciario / meta */
  --hairline:     #cbd0d8;     /* divisor visible */
  --hairline-soft:#e5e7eb;     /* divisor sutil */

  /* ── Acentos institucionales (paleta SUTEYM) ─────────── */
  --rojo:         #e20612;     /* CTA principal */
  --rojo-tint:    #fdecee;
  --rojo-deep:    #a3000a;
  --verde:        #2e8f2c;     /* afirmaciones, fresh */
  --verde-tint:   #e6f4e3;
  --verde-deep:   #1a5e19;

  /* ── Acento institucional adicional (azul confianza) ─── */
  --azul:         #1d4ed8;
  --azul-tint:    #eaf0fc;

  /* ── Tipografía ──────────────────────────────────────── */
  --sans:   'Geist', -apple-system, system-ui, sans-serif;
  --serif:  'Source Serif 4', Georgia, serif;     /* uso muy puntual */
  --serif-text: 'Source Serif 4', Georgia, serif;
  --mono:   'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* ── Espacio ─────────────────────────────────────────── */
  --gutter: 24px;
  --maxw: 1320px;

  /* ── Radios (modernos pero sobrios) ──────────────────── */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  /* ── Elevación ───────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.04), 0 1px 1px rgba(11, 18, 32, 0.03);
  --shadow-md: 0 4px 16px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, 0.12);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ============================================================
   App shell
   ============================================================ */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--paper-2);
}

/* Sidebar */
.sidebar {
  background: var(--ink);
  color: var(--paper);
  padding: 24px 16px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255,255,255,0.08);
  overflow-y: auto;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.sidebar .brand .mark {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.sidebar .brand .mark .dot-r { color: var(--rojo); }
.sidebar .brand .mark .dot-g { color: var(--verde); }
.sidebar .brand .sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.nav-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  padding: 12px 10px 6px;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--paper); }
.nav-item.active {
  background: var(--paper);
  color: var(--ink);
}
.nav-item .badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  background: var(--rojo);
  color: white;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.nav-item .new-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--verde);
  letter-spacing: 0.1em;
  font-weight: 600;
}
.nav-item.active .new-tag { color: var(--verde-deep); }

.sidebar .footer-mini {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.50);
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* ============================================================
   Main + topbar
   ============================================================ */
.main {
  background: var(--paper-2);
  min-height: 100vh;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 500;
}
.topbar .global-search {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  background: var(--paper-2);
  cursor: text;
  transition: border-color .15s, background .15s;
}
.topbar .global-search:hover { border-color: var(--hairline); background: var(--paper); }
.topbar .global-search input {
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  flex: 1;
  color: var(--ink);
}
.topbar .global-search input::placeholder { color: var(--ink-3); }
.topbar .global-search .kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  background: var(--paper);
  font-weight: 500;
}
.topbar .device-toggle {
  display: flex;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-2);
}
.topbar .device-toggle button {
  border: none;
  background: transparent;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  font-weight: 600;
}
.topbar .device-toggle button.active {
  background: var(--ink);
  color: var(--paper);
}

.topbar .auth-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper);
}
.topbar .auth-chip.authed { background: var(--verde-tint); color: var(--verde-deep); border-color: #bce0b3; }
.topbar .auth-chip .avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  display: grid;
  place-items: center;
}

/* ============================================================
   Typography
   ============================================================ */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.eyebrow .red { color: var(--rojo); }
.eyebrow .green { color: var(--verde); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

.display-xl {
  font-family: var(--sans);
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
}
.display-lg {
  font-family: var(--sans);
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.display-md {
  font-family: var(--sans);
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
}
.display-sm {
  font-family: var(--sans);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 600;
}

/* italic-em was used everywhere as a flourish — neutralize it
   to a subtle deep-red emphasis instead of editorial italic */
.italic-em {
  font-style: normal;
  font-weight: 600;
  color: var(--rojo);
}

.lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* Underline highlights — flat, restrained */
.hl-red {
  border-bottom: 2px solid var(--rojo);
  padding-bottom: 1px;
}
.hl-green {
  border-bottom: 2px solid var(--verde);
  padding-bottom: 1px;
}

/* ============================================================
   Buttons / inputs
   ============================================================ */
.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .08s, background .12s, box-shadow .12s;
  letter-spacing: -0.005em;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--hairline); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.red { background: var(--rojo); border-color: var(--rojo); color: white; }
.btn.green { background: var(--verde); border-color: var(--verde); color: white; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.lg { padding: 13px 22px; font-size: 15px; }

/* Tags / chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--hairline-soft);
  font-weight: 500;
}
.tag.red { background: var(--rojo-tint); color: var(--rojo-deep); border-color: #f5c5c9; }
.tag.green { background: var(--verde-tint); color: var(--verde-deep); border-color: #b9d9b3; }
.tag.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================================
   Dividers
   ============================================================ */
.rule  { height: 1px; background: var(--hairline); border: 0; }
.rule-soft { height: 1px; background: var(--hairline-soft); border: 0; }
.rule-thick { height: 3px; background: var(--ink); border: 0; }

/* ============================================================
   Layout helpers
   ============================================================ */
.col-grid { display: grid; gap: var(--gutter); }
.section-pad { padding: 64px 32px; }
.section-pad-tight { padding: 40px 32px; }
.container { max-width: var(--maxw); margin: 0 auto; }

/* ============================================================
   Mobile stage
   ============================================================ */
.mobile-stage {
  background: #0b1220;
  min-height: calc(100vh - 56px);
  display: flex;
  justify-content: center;
  padding: 32px 0 64px;
  background-image:
    radial-gradient(circle at 25% 20%, #1a2440 0%, transparent 40%),
    radial-gradient(circle at 75% 80%, #08101f 0%, transparent 50%);
}
.mobile-frame {
  width: 390px;
  max-width: 95vw;
  background: var(--paper);
  border-radius: 36px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 0 8px #0b1220, 0 0 0 9px #2a3550;
  overflow: hidden;
  position: relative;
  height: 800px;
  display: flex;
  flex-direction: column;
}
.mobile-status {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 4px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-frame .scrollarea {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-tabbar {
  border-top: 1px solid var(--hairline-soft);
  background: var(--paper);
  padding: 10px 14px 22px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.mobile-tabbar button {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 4px 8px;
}
.mobile-tabbar button.active { color: var(--ink); }
.mobile-tabbar button.active .pill {
  width: 24px; height: 3px; background: var(--rojo); border-radius: var(--r-pill);
  margin-top: -2px;
}
.mobile-tabbar svg { width: 22px; height: 22px; }

/* ============================================================
   Misc
   ============================================================ */
.highlight-callout {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rojo);
  padding: 4px 10px;
  border: 1px solid var(--rojo);
  border-radius: var(--r-sm);
  background: var(--paper);
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
  font-weight: 600;
}

.fresh-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verde-deep);
  font-weight: 600;
}
.fresh-marker::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--verde);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--hairline); box-shadow: var(--shadow-sm); }

.card-image {
  background: var(--paper-3);
  background-image:
    linear-gradient(135deg, transparent 49%, rgba(11,18,32,0.06) 49%, rgba(11,18,32,0.06) 51%, transparent 51%);
  background-size: 14px 14px;
  position: relative;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.card-image .label {
  background: var(--paper);
  padding: 5px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--r-sm);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   Responsive — tablet + mobile
   Most of our grids are inline-styled, so we use attribute
   selectors with !important to collapse them at small viewports.
   ============================================================ */

/* Tablet — 1100px down */
@media (max-width: 1100px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .section-pad { padding: 48px 24px; }
  .section-pad-tight { padding: 32px 24px; }

  /* Grids — use minmax(0,1fr) so children can shrink below their intrinsic min */
  [style*="repeat(8,"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  [style*="repeat(7,"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  [style*="repeat(4,"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="repeat(3,"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* Sidebar layouts → stack */
  [style*="280px 1fr"], [style*="260px 1fr"], [style*="240px 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Two-col split layouts → stack */
  [style*="1.6fr 1fr"], [style*="1.4fr 1fr"], [style*="1.2fr 1fr"], [style*="1.1fr 1fr"], [style*="1.8fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* Topbar shrink */
  .topbar { padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .topbar .global-search { order: 10; flex-basis: 100%; max-width: none; margin: 0; }

  /* Public header — collapse to hamburger at tablet */
  .public-nav, .public-actions { display: none !important; }
  .hamburger-btn { display: flex !important; }
  .public-header-row { flex-wrap: nowrap !important; gap: 12px !important; }

  /* Boletín hero — tablet: hide slogan, center the secretary */
  .boletin-slogan-plaque { display: none !important; }
  .boletin-fig { justify-content: center !important; }
  .boletin-fig img { transform: none !important; margin: 0 auto !important; }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@media (max-width: 600px) {
  .org-switch { grid-template-columns: 1fr !important; }
}

/* Comité / Vigilancia member grid: 4 / 2 / 1 */
@media (max-width: 1000px) {
  .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 540px) {
  .member-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .dir-tabs { grid-template-columns: 1fr !important; }
  .dir-list-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .dir-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 640px) {
  .dir-list-grid { grid-template-columns: 1fr !important; }
  .dir-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  .dir-lead > div { width: 100% !important; }
}

/* Convocatorias carrusel */
.convoc-fade { animation: convocFade .4s ease; }
@keyframes convocFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .convoc-carousel .convoc-fade { padding: 28px 22px 70px 26px !important; }
}

/* Convocatorias — tablero oficial responsive */
@media (max-width: 720px) {
  .convoc-row { grid-template-columns: 6px 64px 1fr auto !important; gap: 12px !important; padding: 14px 16px 14px 0 !important; }
  .convoc-row > span:nth-child(2) { display: none !important; } /* hide number */
  .convoc-status { display: none !important; }
}
@media (max-width: 460px) {
  .convoc-row { grid-template-columns: 5px 1fr auto !important; }
  .convoc-row > div:nth-child(3) { display: none !important; } /* hide thumbnail */
}

/* Convocatorias: 4 grandes / 2 medianas / 1 chicas */
@media (max-width: 1100px) {
  .convoc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
  .convoc-grid { grid-template-columns: 1fr !important; }
}

/* Timeline — desktop: alternate sides */
.timeline-wrap .tl-left  .right-slot { visibility: hidden; }
.timeline-wrap .tl-right .left-slot  { visibility: hidden; }

/* Timeline — stack to single column on mobile/tablet */
@media (max-width: 760px) {
  .timeline-wrap .timeline-line { left: 16px !important; transform: none !important; }
  .timeline-wrap .timeline-row { grid-template-columns: 32px 1fr !important; gap: 12px !important; }
  .timeline-wrap .left-slot { display: none !important; }
  .timeline-wrap .right-slot { padding-left: 0 !important; visibility: visible !important; }
  /* Force left-align text in all timeline cards on mobile */
  .timeline-wrap .right-slot h3,
  .timeline-wrap .right-slot p { text-align: left !important; }
}

/* Desktop wide — secretary photo fills the hero section height */
@media (min-width: 1101px) {
  .leader-row { align-items: stretch !important; }
  .leader-portrait { aspect-ratio: auto !important; height: 100%; }
}

/* Mobile — 760px down */
@media (max-width: 760px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .section-pad { padding: 36px 16px; }
  .section-pad-tight { padding: 24px 16px; }

  /* App shell — stack sidebar above */
  .app-shell { grid-template-columns: 1fr !important; }
  .sidebar {
    position: relative !important;
    height: auto !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 12px 16px !important;
    gap: 10px !important;
    align-items: center;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.10) !important;
    white-space: nowrap;
  }
  .sidebar .brand { padding-bottom: 0 !important; border-bottom: none !important; padding-right: 14px; border-right: 1px solid rgba(255,255,255,0.10) !important; flex-shrink: 0; }
  .sidebar .footer-mini, .nav-section-label { display: none !important; }
  .nav-item { flex-shrink: 0; padding: 6px 10px !important; font-size: 12px !important; }
  .nav-item .badge, .nav-item .new-tag { display: none !important; }

  /* All numeric grids → 2 cols max, minmax(0,1fr) so they can shrink */
  [style*="repeat(8,"], [style*="repeat(7,"], [style*="repeat(6,"], [style*="repeat(5,"], [style*="repeat(4,"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* 3-col → 1 col */
  [style*="repeat(3,"] { grid-template-columns: minmax(0, 1fr) !important; }
  /* 2-col → 1 col */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }

  /* Display sizes */
  .display-xl { font-size: 38px !important; line-height: 1.05 !important; letter-spacing: -0.02em !important; }
  .display-lg { font-size: 28px !important; }
  .display-md { font-size: 22px !important; }
  .display-sm { font-size: 18px !important; }
  .lede { font-size: 15px !important; }

  /* Topbar shrink */
  .topbar { padding: 10px 14px; }
  .topbar .device-toggle, .topbar .auth-chip { font-size: 10px !important; }
  .topbar .meta { display: none; }

  /* Public nav — horizontal scroll */
  .public-nav, .public-actions { display: none !important; }
  .hamburger-btn { display: flex !important; }
  .public-header-row { flex-wrap: nowrap !important; gap: 12px !important; padding: 12px 16px !important; }
  .public-header-row .brand-imgs { gap: 10px !important; }
  .public-header-row .brand-imgs img:nth-child(1) { height: 52px !important; }
  .public-header-row .brand-imgs img:nth-child(2) { display: none !important; }

  /* Boletín hero */
  .boletin-hero { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .boletin-hero-text { padding: 32px 24px 8px !important; }
  .boletin-slogan-plaque { display: none !important; }
  .boletin-fig { min-height: 300px; padding: 0 24px; }
  .boletin-fig img { transform: none !important; height: auto !important; max-height: 340px !important; margin: 0 auto !important; }

  /* Footer */
  footer { padding: 40px 20px 24px !important; margin-top: 40px !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
  .footer-bottom { flex-direction: column; align-items: flex-start !important; }
  .backbar .container { padding: 10px 16px !important; }

  /* Buttons more compact */
  .btn.lg { padding: 10px 16px !important; font-size: 13px !important; }
}

/* Very small phones */
@media (max-width: 420px) {
  .display-xl { font-size: 32px !important; }

  /* Aviso button centers on its own line when wrapped */
  .aviso-strip .container { justify-content: center !important; text-align: center; }
  .aviso-cta { width: 100%; text-align: center; }

  /* Leader portrait stacks above info */
  .leader-row { grid-template-columns: 1fr !important; gap: 18px !important; text-align: center; }
  .leader-row > div:first-child { max-width: 200px; margin: 0 auto; }
}

/* Directorio selector — always 1 column below 900px (beats global repeat(4,) attr rules) */
@media (max-width: 900px) {
  .dir-tabs.dir-tabs { grid-template-columns: 1fr !important; }
  .dir-segmented { flex-direction: column !important; }
  .dir-segmented button { flex: none !important; text-align: left; }
}
