/* IEICII Hub v269.0.1 · Presentación pública
 * Consolidado respetando el orden de carga histórico.
 * No editar cadenas -vXXX; este archivo es la fuente activa estable.
 */

/* ===== origen: assets/css/public-presentation-v236.css ===== */
/* IEICII Hub v236 · presentación pública uniforme
   Consolida contraste de banners/tags y tratamiento inteligente de medios en todo el portal.
   Se carga al final de los estilos públicos y reemplaza el motor smart-media anterior. */

/* ---------- Variables editoriales ---------- */
body.public-body{
  --pm236-line:var(--line,#dfe6ef);
  --pm236-ink:var(--text,#0f172a);
  --pm236-muted:var(--muted,#64748b);
  --pm236-brand:var(--brand,#2563eb);
  --pm236-soft:#f4f7fb;
  --pm236-chip-bg:#eff6ff;
  --pm236-chip-fg:#1d4ed8;
  --pm236-chip-line:#bfdbfe;
}

/* ---------- Chips, badges y etiquetas: una sola gramática visual ---------- */
body.public-body .tag-chip,
body.public-body .badge,
body.public-body .status-pill,
body.public-body .category-chip,
body.public-body .eyebrow,
body.public-body .scic74-chip,
body.public-body .scic74-kicker{
  max-width:100%!important;
  min-height:27px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  padding:5px 10px!important;
  border-radius:999px!important;
  border:1px solid var(--pm236-chip-line)!important;
  background:var(--pm236-chip-bg)!important;
  color:var(--pm236-chip-fg)!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1.2!important;
  letter-spacing:.015em!important;
  text-shadow:none!important;
  text-decoration:none!important;
  vertical-align:middle!important;
  overflow-wrap:anywhere!important;
}
body.public-body .eyebrow,
body.public-body .scic74-kicker{
  text-transform:uppercase!important;
  letter-spacing:.055em!important;
}
/* Semántica de estado conservada pero con contraste suficiente. */
body.public-body .badge.ok,
body.public-body .status-pill.active,
body.public-body .status-pill.published,
body.public-body .status-pill.valid{
  background:#ecfdf3!important;color:#067647!important;border-color:#abefc6!important;
}
body.public-body .badge.warn,
body.public-body .badge.warning,
body.public-body .status-pill.pending,
body.public-body .status-pill.draft{
  background:#fffaeb!important;color:#93370d!important;border-color:#fedf89!important;
}
body.public-body .badge.bad,
body.public-body .badge.danger,
body.public-body .status-pill.cancelled,
body.public-body .status-pill.canceled,
body.public-body .status-pill.expired{
  background:#fef3f2!important;color:#b42318!important;border-color:#fecdca!important;
}

/* Etiquetas sobre fondos oscuros o fotográficos: nunca desaparecen. */
body.public-body .hero .eyebrow,
body.public-body .visual-hero .eyebrow,
body.public-body .scic74-hero .scic74-kicker,
body.public-body .event-hero-detail-v148 .eyebrow,
body.public-body .home-stage-v142 .eyebrow,
body.public-body .home-stage-v143 .eyebrow,
body.public-body .home-stage-v142 .stage-kicker-v142,
body.public-body .home-stage-v143 .stage-kicker-v142{
  background:rgba(255,255,255,.96)!important;
  color:#172033!important;
  border-color:rgba(255,255,255,.98)!important;
  box-shadow:0 7px 22px rgba(0,0,0,.14)!important;
  backdrop-filter:blur(8px)!important;
}
body.public-body .scic74-hero h1,
body.public-body .scic74-hero h2,
body.public-body .scic74-hero p,
body.public-body .hero h1,
body.public-body .hero h2,
body.public-body .hero p{
  color:#fff!important;
}
body.public-body .scic74-hero h1,
body.public-body .hero h1,
body.public-body .hero h2{
  text-shadow:0 2px 22px rgba(0,0,0,.18)!important;
}
body.public-body .scic74-hero p,
body.public-body .hero p{color:rgba(255,255,255,.9)!important}
body.public-body .scic74-hero-stat{
  color:#fff!important;
  background:rgba(7,20,48,.34)!important;
  border-color:rgba(255,255,255,.28)!important;
}
body.public-body .scic74-hero-stat b{color:#fff!important}
body.public-body .scic74-hero-stat span{color:rgba(255,255,255,.88)!important}

/* Tags del hero de evento: cristal oscuro estable sobre cualquier foto. */
body.public-body .event-hero-detail-v148 .event-meta span{
  background:rgba(10,18,34,.82)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.42)!important;
  box-shadow:0 7px 22px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(10px)!important;
  text-shadow:none!important;
}
body.public-body .event-hero-detail-v148 .event-back-link-v140{
  background:rgba(10,18,34,.72)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.34)!important;
  backdrop-filter:blur(10px)!important;
}

/* ---------- Motor de medios v236 ---------- */
.pm-v236-frame{
  position:relative!important;
  overflow:hidden!important;
  isolation:isolate!important;
  background:linear-gradient(135deg,#f8fbff,#edf3f9)!important;
}
.pm-v236-frame::before{
  content:"";
  position:absolute;
  inset:-22px;
  z-index:0;
  background-image:var(--pm236-bg);
  background-size:cover;
  background-position:center;
  filter:blur(24px) saturate(.82);
  transform:scale(1.10);
  opacity:0;
  pointer-events:none;
}
.pm-v236-frame::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:linear-gradient(135deg,rgba(248,251,255,.84),rgba(238,244,255,.62));
  opacity:0;
  pointer-events:none;
}
.pm-v236-frame.pm-v236-contain::before{opacity:.22}
.pm-v236-frame.pm-v236-contain::after{opacity:.74}
.pm-v236-frame>img,
.pm-v236-frame>a>img,
.pm-v236-frame .pm-v236-image{
  position:relative!important;
  z-index:1!important;
  display:block!important;
  max-width:100%!important;
  margin:0!important;
  transition:transform .22s ease,filter .22s ease!important;
}
.pm-v236-frame.pm-v236-contain>img,
.pm-v236-frame.pm-v236-contain>a>img,
.pm-v236-frame.pm-v236-contain .pm-v236-image{
  object-fit:contain!important;
  background:transparent!important;
  filter:drop-shadow(0 10px 18px rgba(15,23,42,.12));
}
.pm-v236-frame.pm-v236-cover>img,
.pm-v236-frame.pm-v236-cover>a>img,
.pm-v236-frame.pm-v236-cover .pm-v236-image{
  object-fit:cover!important;
  background:transparent!important;
}
.pm-v236-frame.pm-v236-lowres>img{image-rendering:auto!important;transform:none!important}

/* Publicaciones / noticias: detalle siempre completo y limpio. */
body.public-body .post-article-media-v70.pm-v236-frame,
body.public-body .post-article-media-v39.pm-v236-frame{
  height:clamp(320px,35vw,480px)!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  padding:14px!important;
}
body.public-body .post-article-media-v70.pm-v236-frame>img,
body.public-body .post-article-media-v39.pm-v236-frame>img{
  width:calc(100% - 6px)!important;
  height:calc(100% - 6px)!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:15px!important;
}
body.public-body .post-article-hero-v70.pm-v236-root.pm-v236-portrait,
body.public-body .post-article-hero-v70.pm-v236-root.pm-v236-tall{
  grid-template-columns:minmax(260px,.66fr) minmax(0,1.34fr)!important;
}
body.public-body .post-article-hero-v70.pm-v236-root.pm-v236-panorama,
body.public-body .post-article-hero-v70.pm-v236-root.pm-v236-wide{
  grid-template-columns:minmax(390px,.95fr) minmax(0,1.05fr)!important;
}

/* Cards de publicaciones: horizontal llena; afiche/cuadrada/panorama se ve completo. */
body.public-body .post-card-thumb-v70.pm-v236-frame{
  height:210px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
}
body.public-body .post-card-thumb-v70.pm-v236-frame>img{width:100%!important;height:100%!important}
body.public-body .post-card-thumb-v70.pm-v236-contain>img{width:calc(100% - 14px)!important;height:calc(100% - 14px)!important;border-radius:12px!important}
body.public-body .post-card-v70.pm-v236-root.pm-v236-portrait .post-card-thumb-v70,
body.public-body .post-card-v70.pm-v236-root.pm-v236-tall .post-card-thumb-v70{height:230px!important}

/* Inicio: publicación destacada y novedades. */
body.public-body .content-lead-img-v71.pm-v236-frame{
  height:clamp(225px,23vw,300px)!important;
  display:grid!important;place-items:center!important;padding:0!important;
}
body.public-body .content-lead-img-v71.pm-v236-frame>img{width:100%!important;height:100%!important}
body.public-body .content-lead-img-v71.pm-v236-contain>img{width:calc(100% - 16px)!important;height:calc(100% - 16px)!important;border-radius:12px!important}
body.public-body .content-row-v71>.pm-v236-row-frame{
  width:96px!important;height:76px!important;min-width:96px!important;border-radius:12px!important;display:grid!important;place-items:center!important;align-self:center!important;
}
body.public-body .content-row-v71>.pm-v236-row-frame>img{width:100%!important;height:100%!important;border-radius:10px!important}
body.public-body .content-row-v71.pm-v236-root.pm-v236-portrait,
body.public-body .content-row-v71.pm-v236-root.pm-v236-tall{grid-template-columns:84px minmax(0,1fr)!important;min-height:116px!important}
body.public-body .content-row-v71.pm-v236-root.pm-v236-portrait>.pm-v236-row-frame,
body.public-body .content-row-v71.pm-v236-root.pm-v236-tall>.pm-v236-row-frame{width:84px!important;min-width:84px!important;height:104px!important}

/* Eventos: tratamiento según proporción real. */
body.public-body .event-feature-media-v91.pm-v236-frame,
body.public-body .event-list-media-v91.pm-v236-frame,
body.public-body .agenda-feature-media-v71.pm-v236-frame{
  background:#f5f8fc!important;
}
body.public-body .event-feature-media-v91.pm-v236-frame>img,
body.public-body .event-list-media-v91.pm-v236-frame>img,
body.public-body .agenda-feature-media-v71.pm-v236-frame>img{
  width:100%!important;height:100%!important;padding:0!important;
}
body.public-body .event-feature-media-v91.pm-v236-contain>img,
body.public-body .event-list-media-v91.pm-v236-contain>img,
body.public-body .agenda-feature-media-v71.pm-v236-contain>img{
  width:calc(100% - 16px)!important;height:calc(100% - 16px)!important;border-radius:14px!important;
}
body.public-body .event-list-media-v91.pm-v236-frame{height:235px!important}
body.public-body .event-list-card-v91.is-past .event-list-media-v91.pm-v236-frame{height:205px!important}
body.public-body .event-feature-media-v91.pm-v236-frame{min-height:360px!important}
/* Un poster vertical merece más área que una miniatura horizontal. */
body.public-body .event-list-card-v91.pm-v236-root.pm-v236-portrait .event-list-media-v91,
body.public-body .event-list-card-v91.pm-v236-root.pm-v236-tall .event-list-media-v91{height:280px!important}

/* Comité: evita recortes extremos en imágenes académicas sin convertir fotos normales en miniaturas. */
body.public-body .scic74-media.pm-v236-frame>img{width:100%!important;height:100%!important;padding:0!important}
body.public-body .scic74-media.pm-v236-frame.pm-v236-panorama>img,
body.public-body .scic74-media.pm-v236-frame.pm-v236-tall>img{width:calc(100% - 12px)!important;height:calc(100% - 12px)!important;border-radius:12px!important;object-fit:contain!important}
body.public-body .scic74-media.pm-v236-frame.pm-v236-portrait>img{object-position:center 24%!important}

/* Sedes, membresías y servicios: cards con criterio común. */
body.public-body .image-card.pm-v236-root,
body.public-body .public-image-card.pm-v236-root,
body.public-body .partner-public-card.pm-v236-root{overflow:hidden!important}
body.public-body .image-card>.pm-v236-card-media,
body.public-body .public-image-card>.pm-v236-card-media{
  width:100%!important;height:190px!important;display:grid!important;place-items:center!important;border-bottom:1px solid var(--pm236-line)!important;
}
body.public-body .image-card>.pm-v236-card-media>img,
body.public-body .public-image-card>.pm-v236-card-media>img{width:100%!important;height:100%!important}
/* Logos de socios: nunca se recortan. */
body.public-body .partner-public-card>.pm-v236-card-media{height:150px!important;display:grid!important;place-items:center!important;background:#fff!important}
body.public-body .partner-public-card>.pm-v236-card-media>img{width:calc(100% - 22px)!important;height:calc(100% - 22px)!important;object-fit:contain!important}

/* Imágenes dentro de subpáginas/eventos: el contenido editorial se preserva completo. */
body.public-body img.event-subpage-hero.pm-v236-direct,
body.public-body img.event-block-image.pm-v236-direct{
  width:100%!important;max-height:min(640px,72vh)!important;object-fit:contain!important;object-position:center!important;background:#f5f8fc!important;border:1px solid var(--pm236-line)!important;border-radius:18px!important;padding:8px!important;
}

/* Hero de evento con imagen: panorama/horizontal cubre; poster o cuadrada no se destruye. */
body.public-body .event-hero-detail-v148.pm-v236-bg{
  background-color:#0b1730!important;
  background-image:var(--event-hero-image)!important;
  background-repeat:no-repeat!important;
}
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-wide,
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-landscape,
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-panorama{
  background-size:cover!important;background-position:center!important;
}
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-square,
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-portrait,
body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-tall{
  background-size:auto 94%!important;background-position:82% center!important;
}
/* Overlay: garantiza legibilidad aunque la imagen sea muy clara. */
body.public-body .event-hero-detail-v148::after{
  background:linear-gradient(90deg,rgba(10,15,28,.94) 0%,rgba(10,15,28,.82) 43%,rgba(10,15,28,.42) 72%,rgba(10,15,28,.16) 100%)!important;
}

/* Home stage / banners fotográficos: texto y métricas siempre por encima. */
body.public-body .home-stage-v142,
body.public-body .home-stage-v143{isolation:isolate!important}
body.public-body .home-stage-v142 .stage-copy-v142,
body.public-body .home-stage-v143 .stage-copy-v142,
body.public-body .home-stage-v143 .stage-copy-v143{position:relative!important;z-index:3!important}
body.public-body .home-stage-v142 .stage-meta-v142 span,
body.public-body .home-stage-v143 .stage-meta-v143 span,
body.public-body .home-stage-v142 .event-meta-light span,
body.public-body .home-stage-v143 .event-meta-light span{
  background:rgba(10,18,34,.76)!important;color:#fff!important;border:1px solid rgba(255,255,255,.34)!important;box-shadow:0 6px 20px rgba(0,0,0,.13)!important;backdrop-filter:blur(9px)!important;
}

/* Dark theme: el fondo contextual no se convierte en una caja blanca. */
html[data-theme="dark"] body.public-body .pm-v236-frame{background:#172033!important}
html[data-theme="dark"] body.public-body .pm-v236-frame::after{background:linear-gradient(135deg,rgba(15,23,42,.68),rgba(30,41,59,.52))}

@media(max-width:1040px){
  body.public-body .post-article-hero-v70.pm-v236-root{grid-template-columns:1fr!important}
  body.public-body .post-article-media-v70.pm-v236-frame,body.public-body .post-article-media-v39.pm-v236-frame{height:clamp(280px,62vw,450px)!important}
  body.public-body .event-feature-media-v91.pm-v236-frame{min-height:300px!important}
}
@media(max-width:720px){
  body.public-body .post-article-media-v70.pm-v236-frame,body.public-body .post-article-media-v39.pm-v236-frame{height:300px!important;padding:10px!important}
  body.public-body .post-article-media-v70.pm-v236-frame.pm-v236-portrait,body.public-body .post-article-media-v70.pm-v236-frame.pm-v236-tall{height:390px!important}
  body.public-body .post-card-thumb-v70.pm-v236-frame{height:190px!important}
  body.public-body .content-lead-img-v71.pm-v236-frame{height:220px!important}
  body.public-body .content-row-v71,body.public-body .content-row-v71.pm-v236-root.pm-v236-portrait,body.public-body .content-row-v71.pm-v236-root.pm-v236-tall{grid-template-columns:76px minmax(0,1fr)!important;min-height:88px!important}
  body.public-body .content-row-v71>.pm-v236-row-frame,body.public-body .content-row-v71.pm-v236-root.pm-v236-portrait>.pm-v236-row-frame,body.public-body .content-row-v71.pm-v236-root.pm-v236-tall>.pm-v236-row-frame{width:76px!important;min-width:76px!important;height:76px!important}
  body.public-body .event-feature-media-v91.pm-v236-frame{min-height:240px!important}
  body.public-body .event-list-card-v91.pm-v236-root.pm-v236-portrait .event-list-media-v91,body.public-body .event-list-card-v91.pm-v236-root.pm-v236-tall .event-list-media-v91{height:240px!important}
  body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-square,body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-portrait,body.public-body .event-hero-detail-v148.pm-v236-bg.pm-v236-tall{background-size:cover!important;background-position:center!important}
  body.public-body .event-hero-detail-v148::after{background:linear-gradient(180deg,rgba(10,15,28,.48) 0%,rgba(10,15,28,.72) 42%,rgba(10,15,28,.94) 100%)!important}
}
@media(prefers-reduced-motion:reduce){.pm-v236-frame>img,.pm-v236-frame>a>img{transition:none!important}}


/* ===== origen: assets/css/public-presentation-v237.css ===== */
/* IEICII Hub v237 · contraste semántico, cabecera limpia y superficies públicas coherentes.
   Regla principal: el tema define la página; cada superficie define el color de su contenido. */

body.public-body{
  --ui-page:var(--bg,#f6f8fb);
  --ui-surface:var(--surface,#fff);
  --ui-surface-2:var(--surface-2,#f8fbff);
  --ui-ink:var(--text,#172033);
  --ui-muted:var(--muted,#657286);
  --ui-line:var(--line,#dfe6ef);
  --ui-brand:var(--brand,#2563eb);
  --ui-brand-2:var(--brand-2,#1747bd);
  --ui-on-brand:var(--brand-contrast,#fff);
  --ui-radius:var(--public-radius,24px);
  --ui-shadow:0 18px 48px rgba(15,23,42,.075);
  --ui-shadow-strong:0 24px 68px rgba(15,23,42,.14);
  --ui-dark-bg:#10244d;
  --ui-dark-fg:#fff;
  --ui-dark-muted:rgba(255,255,255,.86);
  --ui-dark-soft:rgba(255,255,255,.13);
  color:var(--ui-ink);
}

/* =========================
   CABECERA PÚBLICA V237
   ========================= */
body.public-body .modern-public-topbar-v116{
  min-height:76px!important;
  padding:0 clamp(18px,3vw,48px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
}
body.public-body .modern-public-topbar-v116 .public-left{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important}
body.public-body .modern-public-topbar-v116 .public-brand-v116{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
body.public-body .modern-public-topbar-v116 .public-brand-v116>span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:210px!important}
body.public-body .modern-public-topbar-v116 .public-actions{margin-left:auto!important;min-width:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important}
/* Red de seguridad por si una vista/cache antigua conserva el nav horizontal. */
body.public-body .modern-public-topbar-v116 .public-desktop-nav-v116{display:none!important}

@media(max-width:1180px){
  body.public-body .modern-public-topbar-v116{padding-inline:20px!important}
  body.public-body .modern-public-actions-v116 .btn{padding-inline:12px!important}
}
@media(max-width:880px){
  body.public-body .modern-public-topbar-v116{min-height:68px!important;padding-inline:14px!important;gap:10px!important}
  body.public-body .modern-public-topbar-v116 .public-brand-v116>span{max-width:140px!important}
  body.public-body .modern-public-actions-v116 .public-request-button-v152,
  body.public-body .modern-public-actions-v116 .public-verify-link-v116{display:none!important}
}
@media(max-width:620px){
  body.public-body .modern-public-topbar-v116 .public-brand-v116>span{display:none!important}
  body.public-body .modern-public-topbar-v116 .public-actions{gap:7px!important}
  body.public-body .modern-public-topbar-v116 .language-switcher-v198>summary{padding-inline:9px!important}
  body.public-body .modern-public-topbar-v116 .public-start-button-v152{padding-inline:10px!important;font-size:.82rem!important}
}

/* =========================
   CONTRATO DE SUPERFICIES
   ========================= */
body.public-body [data-tone="dark"],
body.public-body .public-tone-dark-v237{
  --local-bg:var(--ui-dark-bg);
  --local-fg:var(--ui-dark-fg);
  --local-muted:var(--ui-dark-muted);
  background:var(--local-bg);
  color:var(--local-fg);
}
body.public-body [data-tone="light"],
body.public-body .public-tone-light-v237{
  --local-bg:var(--ui-surface);
  --local-fg:var(--ui-ink);
  --local-muted:var(--ui-muted);
  background:var(--local-bg);
  color:var(--local-fg);
}
body.public-body [data-tone] :is(h1,h2,h3,h4,h5,h6,strong,b){color:var(--local-fg)!important}
body.public-body [data-tone] :is(p,small,.muted){color:var(--local-muted)!important}

/* =========================
   HEROES / BANNERS PÚBLICOS
   ========================= */
body.public-body .hero.slim,
body.public-body .posts-hero-v21,
body.public-body .posts-hero-v70,
body.public-body .events-hero-v91,
body.public-body .scic74-hero{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.12)!important;
  background:
    radial-gradient(circle at 89% 13%,rgba(255,255,255,.18),transparent 27%),
    linear-gradient(132deg,color-mix(in srgb,var(--ui-brand-2) 76%,#081a3d) 0%,var(--ui-brand) 72%,color-mix(in srgb,var(--ui-brand) 78%,#62a7ff) 100%)!important;
  color:#fff!important;
  box-shadow:var(--ui-shadow-strong)!important;
}
body.public-body .hero.slim::after,
body.public-body .posts-hero-v21::after,
body.public-body .events-hero-v91::after{
  content:""!important;
  position:absolute!important;
  width:300px!important;height:300px!important;
  right:-72px!important;top:-110px!important;
  border-radius:50%!important;
  border:42px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.035)!important;
  pointer-events:none!important;
  z-index:0!important;
}
body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero)>*{position:relative!important;z-index:1!important}
body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero) :is(h1,h2,h3,strong,b){color:#fff!important;text-shadow:0 2px 24px rgba(0,0,0,.16)!important}
body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero) p{color:rgba(255,255,255,.90)!important}

/* Tags en banners: cápsula clara, legible en cualquier paleta. */
body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero,.home-stage-v142,.home-stage-v143) :is(.eyebrow,.scic74-kicker,.stage-kicker-v142){
  background:rgba(255,255,255,.96)!important;
  color:#172033!important;
  border:1px solid rgba(255,255,255,.98)!important;
  box-shadow:0 7px 22px rgba(0,0,0,.12)!important;
  text-shadow:none!important;
}

/* Eventos: CTA blanco y composición coherente con el resto de secciones. */
body.public-body .events-hero-v91{padding:clamp(28px,4vw,48px)!important;border-radius:clamp(22px,2vw,30px)!important;min-height:280px!important;align-items:center!important}
body.public-body .events-hero-v91 h1{color:#fff!important}
body.public-body .events-hero-v91 p{color:rgba(255,255,255,.9)!important}
body.public-body .events-hero-v91>.btn{background:#fff!important;color:#172033!important;border-color:#fff!important;box-shadow:0 8px 24px rgba(0,0,0,.14)!important}

/* Publicaciones: corrige específicamente el título oscuro sobre azul. */
body.public-body .posts-hero-v21 h1,
body.public-body .posts-hero-v70 h1{color:#fff!important}
body.public-body .posts-hero-v21 p,
body.public-body .posts-hero-v70 p{color:rgba(255,255,255,.9)!important}
body.public-body .posts-hero-v21 .eyebrow.light,
body.public-body .posts-hero-v70 .eyebrow.light{background:#fff!important;color:var(--ui-brand-2)!important;border-color:#fff!important}

/* Comité: preserva identidad pero asegura contraste de estadísticas. */
body.public-body .scic74-hero-stat,
body.public-body .scic74-hero-stat *{color:#fff!important}
body.public-body .scic74-hero-stat span{color:rgba(255,255,255,.86)!important}

/* =========================
   PORTADA / EVENTO DESTACADO
   ========================= */
body.public-body .home-stage-v142,
body.public-body .home-stage-v143{isolation:isolate!important}
body.public-body .home-stage-v142 .stage-copy-v142,
body.public-body .home-stage-v143 .stage-copy-v142{position:relative!important;z-index:4!important}

/* FECHA / SEDE / MODALIDAD: el cuadro oscuro nunca hereda texto oscuro. */
body.public-body .home-stage-v142 .stage-meta-v142>span,
body.public-body .home-stage-v143 .stage-meta-v143>span{
  background:rgba(15,24,42,.80)!important;
  border:1px solid rgba(255,255,255,.22)!important;
  color:#fff!important;
  box-shadow:0 10px 26px rgba(15,23,42,.13)!important;
  backdrop-filter:blur(10px)!important;
}
body.public-body .home-stage-v142 .stage-meta-v142>span :is(small,strong,b,em),
body.public-body .home-stage-v143 .stage-meta-v143>span :is(small,strong,b,em){color:#fff!important;text-shadow:none!important}
body.public-body .home-stage-v142 .stage-meta-v142>span small,
body.public-body .home-stage-v143 .stage-meta-v143>span small{color:rgba(255,255,255,.66)!important;font-weight:900!important;letter-spacing:.06em!important;text-transform:uppercase!important}
body.public-body .home-stage-v142 .stage-meta-v142>span strong,
body.public-body .home-stage-v143 .stage-meta-v143>span strong{color:#fff!important;font-weight:900!important}

body.public-body .stage-deadline-v143{
  background:color-mix(in srgb,var(--accent,#14b8a6) 10%,#fff)!important;
  border-color:color-mix(in srgb,var(--accent,#14b8a6) 38%,#dce6ef)!important;
  color:#172033!important;
}
body.public-body .stage-deadline-v143 :is(span,strong){color:#172033!important}
body.public-body .stage-announcement-v142{color:var(--ui-ink)!important}
body.public-body .stage-announcement-v142 :is(strong,span,a){color:inherit!important}

/* Estado sobre el afiche. */
body.public-body .stage-image-v143 figcaption{background:rgba(255,255,255,.94)!important;color:#172033!important;border:1px solid rgba(255,255,255,.88)!important;box-shadow:0 8px 22px rgba(15,23,42,.13)!important;backdrop-filter:blur(10px)!important}
body.public-body .stage-image-v143 figcaption :is(span,strong){color:#172033!important}

/* =========================
   CHIPS / BADGES / ESTADOS
   ========================= */
body.public-body :is(.tag-chip,.badge,.status-pill,.category-chip){text-shadow:none!important}
body.public-body .category-chip.active{background:color-mix(in srgb,var(--ui-brand) 10%,#fff)!important;color:var(--ui-brand-2)!important;border-color:color-mix(in srgb,var(--ui-brand) 32%,#dbe7ff)!important}
body.public-body .event-date-chip-v91,
body.public-body .event-date-large-v91{background:var(--public-date-bg,var(--ui-brand))!important;color:var(--public-date-text,#fff)!important}
body.public-body :is(.event-date-chip-v91,.event-date-large-v91) :is(strong,small){color:inherit!important}

/* =========================
   BUSCADORES Y FILTROS
   ========================= */
body.public-body :is(.search-bar,.events-search-v91,.posts-search-v21,.posts-search-v70,.scic74-tools){
  background:var(--ui-surface)!important;
  border-color:var(--ui-line)!important;
  color:var(--ui-ink)!important;
  box-shadow:0 12px 32px rgba(15,23,42,.055)!important;
}
body.public-body :is(.search-bar,.events-search-v91,.posts-search-v21,.posts-search-v70,.scic74-search) :is(input,select,textarea){
  background:var(--ui-surface)!important;
  border-color:var(--ui-line)!important;
  color:var(--ui-ink)!important;
}
body.public-body :is(.search-bar,.events-search-v91,.posts-search-v21,.posts-search-v70,.scic74-search) :is(input,select,textarea)::placeholder{color:color-mix(in srgb,var(--ui-muted) 74%,transparent)!important}
body.public-body :is(.search-bar,.events-search-v91,.posts-search-v21,.posts-search-v70,.scic74-search) :is(input,select,textarea):focus{outline:none!important;border-color:color-mix(in srgb,var(--ui-brand) 58%,var(--ui-line))!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--ui-brand) 12%,transparent)!important}

/* Servicios: en desktop una barra compacta y uniforme. */
body.public-body .hero.slim + .search-bar{display:grid!important;grid-template-columns:minmax(280px,1fr) minmax(150px,190px) auto auto!important;gap:10px!important;padding:14px!important;border-radius:22px!important;margin-top:16px!important}
body.public-body .hero.slim + .search-bar>*{min-width:0!important}

/* =========================
   CARDS / SUPERFICIES CLARAS
   ========================= */
body.public-body :is(.card,.image-card,.event-list-card-v91,.event-feature-panel-v91,.post-card-v21,.post-card-v70,.membership-comparison-v120){
  background:var(--ui-surface)!important;
  border-color:var(--ui-line)!important;
  color:var(--ui-ink)!important;
}
body.public-body :is(.card,.image-card,.event-list-card-v91,.event-feature-panel-v91,.post-card-v21,.post-card-v70) :is(h1,h2,h3,h4,strong,b){color:var(--ui-ink)!important}
body.public-body :is(.card,.image-card,.event-list-card-v91,.event-feature-panel-v91,.post-card-v21,.post-card-v70) :is(p,small,.muted){color:var(--ui-muted)!important}
body.public-body .public-membership-cards-v120,
body.public-body .grid.three{align-items:stretch!important}
body.public-body .public-membership-cards-v120>.card,
body.public-body .section.grid.three>.card{height:100%!important}

/* Tabla de membresías también debe responder al tema. */
body.public-body .membership-comparison-v120 .table,
body.public-body .membership-comparison-v120 .table :is(th,td){background:var(--ui-surface)!important;color:var(--ui-ink)!important;border-color:var(--ui-line)!important}
body.public-body .membership-comparison-v120 .table th{background:var(--ui-surface-2)!important;color:var(--ui-muted)!important}
body.public-body .membership-comparison-v120 .table td small{color:var(--ui-muted)!important}

/* =========================
   BOTONES
   ========================= */
body.public-body .btn.primary,
body.public-body button.btn.primary{background:var(--ui-brand)!important;border-color:var(--ui-brand)!important;color:var(--ui-on-brand)!important}
body.public-body .btn.soft,
body.public-body .btn:not(.primary):not(.danger):not(.light):not(.ghost){background:var(--ui-surface)!important;border-color:var(--ui-line)!important;color:var(--ui-ink)!important}
body.public-body :is(.hero,.posts-hero-v21,.events-hero-v91,.scic74-hero) .btn:not(.primary){background:#fff!important;color:#172033!important;border-color:#fff!important}

/* =========================
   DARK THEME
   ========================= */
html[data-theme="dark"] body.public-body{
  --ui-shadow:0 18px 48px rgba(0,0,0,.18);
  --ui-shadow-strong:0 24px 68px rgba(0,0,0,.28);
}
html[data-theme="dark"] body.public-body :is(.search-bar,.events-search-v91,.posts-search-v21,.posts-search-v70,.scic74-tools,.card,.image-card,.event-list-card-v91,.event-feature-panel-v91,.post-card-v21,.post-card-v70,.membership-comparison-v120){background:var(--ui-surface)!important;border-color:var(--ui-line)!important}
html[data-theme="dark"] body.public-body .stage-deadline-v143{background:color-mix(in srgb,var(--accent,#14b8a6) 18%,var(--ui-surface))!important;color:var(--ui-ink)!important}
html[data-theme="dark"] body.public-body .stage-deadline-v143 :is(span,strong){color:var(--ui-ink)!important}
html[data-theme="dark"] body.public-body .stage-image-v143 figcaption{background:rgba(15,24,42,.92)!important;color:#fff!important;border-color:rgba(255,255,255,.16)!important}
html[data-theme="dark"] body.public-body .stage-image-v143 figcaption :is(span,strong){color:#fff!important}
html[data-theme="dark"] body.public-body .category-chip.active{background:color-mix(in srgb,var(--ui-brand) 24%,var(--ui-surface))!important;color:#fff!important}

/* =========================
   RESPONSIVE
   ========================= */
@media(max-width:900px){
  body.public-body .events-hero-v91{min-height:0!important;display:grid!important;align-items:start!important}
  body.public-body .events-hero-v91>.btn{width:max-content!important}
  body.public-body .hero.slim + .search-bar{grid-template-columns:1fr 1fr!important}
  body.public-body .hero.slim + .search-bar input{grid-column:1/-1!important}
}
@media(max-width:640px){
  body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero){border-radius:22px!important;padding:24px!important}
  body.public-body :is(.hero.slim,.posts-hero-v21,.posts-hero-v70,.events-hero-v91,.scic74-hero) :is(h1,h2){font-size:clamp(2rem,11vw,3rem)!important;line-height:1!important}
  body.public-body .hero.slim + .search-bar{grid-template-columns:1fr!important}
  body.public-body .hero.slim + .search-bar input{grid-column:auto!important}
  body.public-body .home-stage-v142 .stage-meta-v142,
  body.public-body .home-stage-v143 .stage-meta-v143{grid-template-columns:1fr!important}
}

/* Accesibilidad: sin animaciones forzadas para quien las reduce. */
@media(prefers-reduced-motion:reduce){
  body.public-body *,body.public-body *::before,body.public-body *::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

