/* ==========================================================================
   Enfòmew — sistema visual editorial (rediseño 2026-09)
   Se carga después de screen.css y portal.css. Los componentes nuevos usan
   el prefijo .ef-*; las reglas sin prefijo normalizan plantillas existentes
   (artículo, páginas, archivos, guías) sin cambiar su marcado.
   ========================================================================== */

:root {
  --ef-navy: #081B3A;
  --ef-navy-900: #04142C;
  --ef-yellow: #FBBF24;
  --ef-red: #E11D2E;
  --ef-white: #FFFFFF;
  --ef-bg: #F8FAFC;
  --ef-text: #111827;
  --ef-muted: #6B7280;
  --ef-line: #E5E7EB;
  --ef-radius: 8px;
  --ef-radius-sm: 4px;
  --ef-shadow: 0 1px 2px rgba(8, 27, 58, .06), 0 4px 14px rgba(8, 27, 58, .06);
  --ef-container: 1280px;
  --ef-gutter: 16px;
  /* Respeta las fuentes elegidas en Ghost Admin (Design → Typography);
     sin selección, Ghost no define las variables y se usa Montserrat. */
  --ef-font: var(--gh-font-body, "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  --ef-font-heading: var(--gh-font-heading, var(--ef-font));
  --ef-header-h: 76px;

  /* Tokens heredados usados por plantillas existentes */
  --navy: var(--ef-navy);
  --ink: var(--ef-text);
  --muted: var(--ef-muted);
  --line: var(--ef-line);
  --orange: var(--ef-yellow);
  --coral: var(--ef-red);
  --blue: #1D4ED8;
  --category-lojman: #D66A1F;
}
[data-cat="lojman"] { --cat-color: var(--category-lojman); }
[data-cat="politik"] { --cat-color: var(--category-politik); }
[data-cat="diplomasi"] { --cat-color: var(--category-diplomasi); }
[data-cat="ijans"] { --cat-color: var(--category-ijans); }
[data-cat="sekirite"] { --cat-color: var(--category-sekirite); }
[data-cat="relijyon"] { --cat-color: var(--category-relijyon); }
[data-cat="sosyete"] { --cat-color: var(--category-sosyete); }

/* ── Base ─────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
html.ef-lock, html.ef-lock body { overflow: hidden; }
body {
  background: var(--ef-bg);
  color: var(--ef-text);
  font-family: var(--ef-font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--ef-yellow); outline-offset: 2px; }
.ef-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ef-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ef-yellow); color: var(--ef-navy); font-weight: 700;
  padding: 10px 14px; border-radius: var(--ef-radius-sm);
}
.ef-skip:focus { top: 12px; }
h1, h2, h3, .ef-hero-title, .ef-card-title, .ef-brand-text strong { font-family: var(--ef-font-heading); }
.ef-i { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }

.ef-wrap,
.wrap,
.wrap.wrap {
  width: 100%;
  max-width: var(--ef-container);
  margin-inline: auto;
  padding-inline: var(--ef-gutter);
}
@media (min-width: 768px) { :root { --ef-gutter: 24px; } }
@media (min-width: 1200px) { :root { --ef-gutter: 32px; } }
/* El layout antiguo reservaba espacio para rieles laterales fijos (≥1580px). */
@media (min-width: 1580px) { .wrap, .wrap.wrap { width: 100%; max-width: var(--ef-container); } }

/* ── Badges de categoría ──────────────────────────────────────────────── */
.ef-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--cat-color, var(--ef-navy));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ef-meta { margin: 0; color: var(--ef-muted); font-size: 13px; font-weight: 500; }

/* ── Barra DÈNYE MINIT ────────────────────────────────────────────────── */
.ef-breaking { background: var(--ef-red); color: #fff; font-size: 14px; }
.ef-breaking-inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.ef-breaking-label {
  flex: 0 0 auto;
  background: #fff; color: var(--ef-red);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
}
.ef-breaking-link { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 auto; color: #fff; font-weight: 600; }
.ef-breaking-link time { font-weight: 800; flex: 0 0 auto; }
.ef-breaking-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-breaking-link:hover span { text-decoration: underline; }
.ef-breaking-date { flex: 0 0 auto; font-size: 13px; font-weight: 500; opacity: .95; }
.ef-social { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ef-social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: inherit; }
.ef-social svg { width: 15px; height: 15px; }
.ef-social-mini { flex: 0 0 auto; gap: 0; }
.ef-social-mini a { width: 28px; height: 28px; }
.ef-social-mini a:hover { background: rgba(255, 255, 255, .16); }

/* ── Header principal ─────────────────────────────────────────────────── */
.ef-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--ef-navy); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ef-header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--ef-header-h); }
.ef-brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: 0 0 auto; }
.ef-brand .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; background: var(--ef-yellow); }
.ef-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.ef-brand-text strong { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.ef-brand-text small { font-size: 12px; font-weight: 500; color: #C7CFDD; margin-top: 3px; }

.ef-nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.ef-nav > ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ef-nav-item > a,
.ef-more-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 10px; color: #fff; font: 600 15px/1 var(--ef-font);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.ef-nav-item > a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: var(--ef-yellow); transform: scaleX(0); transition: transform .2s;
}
.ef-nav-item > a:hover { color: var(--ef-yellow); }
.ef-nav-item.is-current > a,
.ef-nav-item > a[aria-current="page"] { color: var(--ef-yellow); }
.ef-nav-item.is-current > a::after,
.ef-nav-item > a[aria-current="page"]::after { transform: scaleX(1); }
.ef-more { position: relative; }
.ef-more-btn .ef-i { width: 16px; height: 16px; transition: transform .2s; }
.ef-more-btn[aria-expanded="true"] { color: var(--ef-yellow); }
.ef-more-btn[aria-expanded="true"] .ef-i { transform: rotate(180deg); }
.ef-more-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50;
  min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: #fff; color: var(--ef-text); border: 1px solid var(--ef-line);
  border-radius: var(--ef-radius); box-shadow: 0 12px 32px rgba(8, 27, 58, .18);
}
.ef-more-menu a { display: block; padding: 9px 12px; border-radius: var(--ef-radius-sm); font-size: 14px; font-weight: 600; }
.ef-more-menu a:hover { background: var(--ef-bg); color: var(--ef-navy); }
.ef-more-sep { border-top: 1px solid var(--ef-line); margin-top: 6px; padding-top: 6px; }

.ef-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.ef-icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: transparent; color: inherit; border: 1px solid transparent; border-radius: 50%; cursor: pointer;
}
.ef-icon-btn:hover { background: rgba(255, 255, 255, .1); }
.ef-member {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: var(--ef-radius-sm);
  background: var(--ef-yellow); color: var(--ef-navy); border: 0;
  font: 700 14px/1 var(--ef-font); cursor: pointer; white-space: nowrap;
}
.ef-member:hover { background: #FCD34D; }
.ef-burger { display: none; }

/* Drawer móvil / tablet */
.ef-drawer { position: fixed; inset: 0; z-index: 90; }
.ef-drawer[hidden] { display: none; }
.ef-drawer-backdrop { position: absolute; inset: 0; background: rgba(4, 20, 44, .6); }
.ef-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px);
  display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
  background: var(--ef-navy-900); color: #fff; padding: 16px 20px 28px;
  transform: translateX(100%); transition: transform .22s ease-out;
}
.ef-drawer.is-open .ef-drawer-panel { transform: none; }
.ef-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.ef-drawer-title { font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ef-yellow); }
.ef-drawer-nav { margin: 0; padding: 0; list-style: none; }
.ef-drawer-nav a { display: block; padding: 12px 4px; font-size: 17px; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ef-drawer-nav .is-current > a, .ef-drawer-nav a[aria-current="page"] { color: var(--ef-yellow); }
.ef-drawer-more { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.ef-drawer-more a { font-size: 15px; font-weight: 500; }
.ef-drawer-more .ef-more-sep { border: 0; margin: 0; padding: 0; }
.ef-drawer-sub { margin: 8px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9FB0C8; }
.ef-member-block { width: 100%; height: 46px; }
.ef-social-drawer a { border: 1px solid rgba(255, 255, 255, .25); width: 40px; height: 40px; }

/* ── Hero + DÈNYE NOUVÈL ──────────────────────────────────────────────── */
.ef-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 24px; padding-top: 24px; align-items: stretch; }
/* El hero ocupa toda la altura de la fila: sin hueco bajo la imagen cuando
   el panel DÈNYE NOUVÈL es más alto que el 16:9. */
.ef-hero-track, .ef-slide, .ef-hero-link { height: 100%; }
.ef-hero { position: relative; min-width: 0; }
.ef-hero-track { position: relative; }
.ef-slide[hidden] { display: none; }
.ef-hero-link { position: relative; display: block; border-radius: var(--ef-radius); overflow: hidden; background: var(--ef-navy); color: #fff; }
.ef-hero-media { aspect-ratio: 16 / 9; height: 100%; background: var(--ef-navy); }
.ef-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.ef-hero-link::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 20, 44, 0) 30%, rgba(4, 20, 44, .55) 58%, rgba(4, 20, 44, .94) 100%);
}
.ef-hero-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 10px; padding: 32px 36px 56px;
}
.ef-hero-title {
  margin: 0; max-width: 820px;
  font-size: clamp(26px, 3.4vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -.015em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ef-hero-link:hover .ef-hero-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ef-hero-excerpt {
  margin: 0; max-width: 720px; color: #E5E9F0; font-size: 16px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ef-hero .ef-meta { color: #CBD3E1; }
.ef-hero-controls {
  position: absolute; right: 20px; bottom: 16px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
}
.ef-hero-controls[hidden] { display: none; }
.ef-hero-arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); cursor: pointer;
}
.ef-hero-arrow:hover { background: var(--ef-yellow); color: var(--ef-navy); border-color: var(--ef-yellow); }
.ef-hero-dots { display: flex; gap: 2px; }
.ef-dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.ef-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: width .2s; }
.ef-dot[aria-current="true"]::before { width: 20px; border-radius: 5px; background: var(--ef-yellow); }

.ef-fallback {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 100%;
  background: radial-gradient(circle at 50% 40%, #13325F, var(--ef-navy) 70%);
}
.ef-fallback .brand-mark { width: 44px; height: 44px; flex-basis: 44px; background: var(--ef-yellow); opacity: .9; }

.ef-latest { background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); padding: 0 16px 8px; min-width: 0; }
.ef-latest-head { border-bottom: 2px solid var(--ef-line); margin: 0 -16px; padding: 0 16px; }
.ef-latest-head h2 {
  display: inline-block; margin: 0 0 -2px; padding: 16px 0 12px;
  font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 2px solid var(--ef-red); color: var(--ef-navy);
}
.ef-latest-list { margin: 0; padding: 0; list-style: none; }
.ef-latest-list li + li { border-top: 1px solid var(--ef-line); }
.ef-latest-list a { display: grid; grid-template-columns: 44px 100px minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 0; }
.ef-hour { color: var(--ef-red); font-weight: 800; font-size: 13px; padding-top: 2px; }
.ef-thumb { display: block; width: 100px; aspect-ratio: 5 / 3; border-radius: var(--ef-radius-sm); overflow: hidden; background: var(--ef-bg); }
.ef-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ef-thumb .ef-fallback .brand-mark { width: 22px; height: 22px; flex-basis: 22px; }
.ef-latest-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ef-latest-copy strong {
  font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ef-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ef-latest-copy small { font-size: 12px; color: var(--ef-muted); font-weight: 500; }
.ef-latest-list a:hover strong { color: var(--ef-navy); text-decoration: underline; }

/* ── Banda de categorías ──────────────────────────────────────────────── */
.ef-catnav { margin-top: 24px; background: #fff; border-block: 1px solid var(--ef-line); }
.ef-catnav ul {
  display: flex; justify-content: space-between; gap: 4px; margin-block: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding-inline: var(--ef-gutter);
}
.ef-catnav ul::-webkit-scrollbar { display: none; }
.ef-catnav li { flex: 0 0 auto; scroll-snap-align: start; }
.ef-catnav a {
  --c: var(--cat-color, var(--ef-navy));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 88px; padding: 16px 8px 14px; font-size: 14px; font-weight: 600; color: var(--ef-text);
  border-bottom: 3px solid transparent;
}
.ef-catnav a .ef-i {
  width: 44px; height: 44px; padding: 11px; border-radius: 50%;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff);
}
.ef-catnav a:hover { border-bottom-color: var(--c); }

/* ── Secciones ────────────────────────────────────────────────────────── */
.ef-section { margin-top: 40px; }
.ef-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ef-section-head h2 {
  margin: 0; padding-left: 14px; border-left: 4px solid var(--ef-yellow);
  font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; line-height: 1.15; text-transform: uppercase; letter-spacing: .01em; color: var(--ef-navy);
}

/* ── Tarjetas ─────────────────────────────────────────────────────────── */
.ef-card {
  display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ef-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ef-bg); }
.ef-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ef-card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1 1 auto; }
.ef-card-title {
  margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ef-text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.ef-card-title a:hover { color: var(--ef-navy); text-decoration: underline; }
.ef-card-excerpt {
  margin: 0; color: #4B5563; font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ef-card .ef-meta { margin-top: auto; }
@media (hover: hover) {
  .ef-card:hover { border-color: #CBD5E1; box-shadow: var(--ef-shadow); }
  .ef-card:hover .ef-card-media img { transform: scale(1.03); }
}
.ef-card-lg .ef-card-title { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }
.ef-card-sm .ef-card-title { font-size: 16px; }

.ef-featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .95fr); gap: 20px; align-items: stretch; }
.ef-featured-stack { display: grid; gap: 20px; grid-auto-rows: 1fr; }
.ef-featured-stack .ef-card { flex-direction: row; }
.ef-featured-stack .ef-card-media { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; }
.ef-featured-stack .ef-card-body { padding: 14px; }
.ef-side { display: flex; flex-direction: column; gap: 20px; }

/* Clima */
.ef-weather {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 85% 0%, #1B3F74 0, var(--ef-navy) 55%, var(--ef-navy-900) 100%);
  color: #fff; border-radius: var(--ef-radius); padding: 20px;
}
.ef-widget-title { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ef-weather .ef-widget-title { color: var(--ef-yellow); }
.ef-weather-now { display: flex; align-items: center; gap: 14px; }
.ef-weather-icon { width: 52px; height: 52px; color: var(--ef-yellow); stroke-width: 1.6; }
.ef-weather-temp { display: block; font-size: 40px; font-weight: 800; line-height: 1; }
.ef-weather-note { display: block; margin-top: 4px; color: #D5DDEA; font-size: 14px; font-weight: 500; }
.ef-link-light, .ef-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 0;
  background: none; border: 0; cursor: pointer; font: 700 14px/1.2 var(--ef-font);
}
.ef-link-light { color: #fff; }
.ef-link { color: var(--ef-navy); }
.ef-link-light .ef-i, .ef-link .ef-i { width: 16px; height: 16px; transition: transform .2s; }
.ef-link-light:hover .ef-i, .ef-link:hover .ef-i { transform: translateX(3px); }
.ef-link-light:hover, .ef-link:hover { text-decoration: underline; }

/* Newsletter */
.ef-newsletter { background: #fff; border: 1px solid var(--ef-line); border-top: 4px solid var(--ef-yellow); border-radius: var(--ef-radius); padding: 20px; }
.ef-newsletter .ef-widget-title { color: var(--ef-navy); margin-bottom: 6px; }
.ef-newsletter > p { margin: 0 0 14px; color: var(--ef-muted); font-size: 15px; }
.ef-news-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ef-news-row input {
  flex: 1 1 180px; min-width: 0; height: 44px; padding: 0 12px;
  border: 1px solid #CBD5E1; border-radius: var(--ef-radius-sm); background: #fff;
  font: 500 15px var(--ef-font); color: var(--ef-text);
}
.ef-news-row input:focus { outline: none; border-color: var(--ef-navy); box-shadow: 0 0 0 3px rgba(251, 191, 36, .45); }
.ef-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--ef-radius-sm); cursor: pointer; font: 700 15px/1 var(--ef-font); white-space: nowrap;
}
.ef-btn-yellow { background: var(--ef-yellow); color: var(--ef-navy); }
.ef-btn-yellow:hover { background: #FCD34D; }
.ef-btn-loading, .ef-news-msg { display: none; }
.ef-news-form.loading .ef-btn-label { display: none; }
.ef-news-form.loading .ef-btn-loading { display: inline; }
.ef-news-form.loading button { opacity: .75; pointer-events: none; }
.ef-news-msg { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.ef-news-form.success .ef-news-success { display: block; color: #047857; }
.ef-news-form.success .ef-news-row { display: none; }
.ef-news-form.error .ef-news-error { display: block; color: #B91C1C; }

/* Nouvèl pa kategori */
.ef-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.ef-card-cat .ef-card-title { font-size: 17px; }

/* Recursos útiles (tasa de cambio + guías) */
.ef-resources { display: grid; grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)); gap: 16px; }
.ef-rate, .ef-resource {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--ef-line); border-radius: var(--ef-radius); padding: 18px;
}
.ef-rate .ef-i, .ef-resource .ef-i { width: 26px; height: 26px; color: var(--ef-navy); }
.ef-rate h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ef-muted); }
.ef-rate strong { display: block; font-size: 28px; font-weight: 800; color: var(--ef-navy); line-height: 1.2; margin-top: 4px; }
.ef-rate span { display: block; font-size: 13px; color: var(--ef-muted); }
.ef-rate .ef-link { margin-top: 10px; }
.ef-resource span { display: flex; flex-direction: column; gap: 4px; }
.ef-resource strong { font-size: 15px; font-weight: 700; color: var(--ef-text); }
.ef-resource small { font-size: 13px; color: var(--ef-muted); line-height: 1.4; }
.ef-resource:hover { border-color: #CBD5E1; box-shadow: var(--ef-shadow); }

/* "Yon jou tankou jodi a" (lógica existente en widgets.js) */
.on-this-day { background: var(--ef-navy); border-radius: var(--ef-radius); margin-top: 40px; grid-template-columns: 110px 80px 1fr; min-height: 0; }
.on-this-day .history-symbol svg { width: 40px; height: 40px; transform: rotate(12deg); }
.on-this-day .history-copy h2 { font-size: clamp(20px, 2.2vw, 28px); }
.on-this-day .history-copy a { color: #fff; }
.history-date small, .history-date span, .history-copy .eyebrow { color: var(--ef-yellow); }

/* Paneles de clima / tasas */
.data-panel { font-family: var(--ef-font); border-radius: var(--ef-radius); }
.data-panel-head button { width: 40px; height: 40px; border-radius: 50%; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.ef-footer { margin-top: 56px; background: var(--ef-navy-900); color: #D5DDEA; }
.ef-footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 40px;
  padding-block: 48px 40px;
}
.ef-footer-brand p { margin: 14px 0 16px; font-size: 14px; max-width: 320px; color: #B8C3D6; }
.ef-social-footer a { width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.ef-social-footer a:hover { background: var(--ef-yellow); border-color: var(--ef-yellow); color: var(--ef-navy); }
.ef-footer-col h2 { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ef-yellow); }
.ef-footer-col ul { margin: 0; padding: 0; list-style: none; }
.ef-footer-col li { margin: 0 0 9px; }
.ef-footer-col a { font-size: 14px; font-weight: 500; color: #D5DDEA; }
.ef-footer-col a:hover, .ef-footer-col .is-current a { color: #fff; text-decoration: underline; }
.ef-footer-col .ef-nav-item > a::after { display: none; }
.ef-footer-col .ef-nav-item > a { padding: 0; font-weight: 500; font-size: 14px; }
.ef-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: #9FB0C8; }
.ef-footer-bottom .ef-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 16px; }

/* ── Plantillas existentes: artículo, páginas y archivos ──────────────── */
.post-head h1, .archive > h1, .archive-head h1, .guide-hero h1 {
  font-family: var(--ef-font); font-weight: 800; letter-spacing: -.02em; color: var(--ef-navy);
}
.guide-hero h1 { color: #fff; }
.post-head h1 { font-size: clamp(28px, 4.2vw, 46px); line-height: 1.12; }
.archive > h1, .archive-head h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin-bottom: 24px; }
.post-head .eyebrow, .archive-head .eyebrow {
  display: inline-block; background: var(--cat-color, var(--ef-navy)); color: #fff;
  padding: 5px 8px; border-radius: 3px; font-size: 11px; letter-spacing: .06em;
}
.post-head > p { font-size: 18px; color: #4B5563; }
.post-image img { border-radius: var(--ef-radius); }
.post-content { font-size: 18px; line-height: 1.75; color: #1F2937; }
.post-content h2, .post-content h3, .post-comments h2, .related h2 { font-family: var(--ef-font); color: var(--ef-navy); }
.post-content a { color: #1D4ED8; }
.post-content blockquote { border-left-color: var(--ef-yellow); }
.related h2 { font-size: clamp(20px, 2.2vw, 26px); text-transform: uppercase; padding-left: 14px; border-left: 4px solid var(--ef-yellow); }
.related .top-grid, .archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related .top-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card.ef-card h3 { margin: 0; }
.card.ef-card .card-image { height: auto; }
.pagination { font-weight: 600; font-size: 14px; }
.pagination a { color: var(--ef-navy); text-decoration: underline; }

/* ── Responsive: tablet (768–1199px) ─────────────────────────────────── */
@media (max-width: 1199px) {
  :root { --ef-header-h: 68px; }
  .ef-nav { display: none; }
  .ef-burger { display: grid; }
  .ef-top { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ef-hero-copy { padding: 28px 28px 60px; }
  .ef-latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .ef-latest-list li { border-top: 1px solid var(--ef-line); }
  .ef-latest-list li:nth-child(-n+2) { border-top: 0; }
  .ef-latest-list a { grid-template-columns: 40px 84px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
  .ef-thumb { width: 84px; }
  /* Tablet: la fila completa cabe con menos aire; si no cabe, hace scroll. */
  .ef-catnav ul { justify-content: flex-start; }
  .ef-catnav li { flex: 1 0 auto; }
  .ef-catnav a { min-width: 0; padding-inline: 6px; }
  .ef-featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ef-side { grid-column: 1 / -1; flex-direction: row; }
  .ef-side > * { flex: 1 1 0; }
  .ef-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ef-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ef-rate { grid-column: 1 / -1; }
  .ef-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ef-footer-brand { grid-column: 1 / -1; }
  .archive-grid, .related .top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Responsive: mobile (<768px) ─────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --ef-header-h: 60px; }
  .ef-breaking { font-size: 13px; }
  .ef-breaking-inner { gap: 10px; min-height: 36px; }
  .ef-breaking-label { font-size: 11px; padding: 3px 7px; }
  .ef-breaking-date, .ef-social-mini { display: none; }
  .ef-brand .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .ef-brand-text strong { font-size: 20px; }
  .ef-brand-text small { display: none; }
  .ef-actions { gap: 2px; }
  .ef-actions > .ef-member { display: none; }
  .ef-top { padding-top: 0; gap: 16px; }
  .ef-top.ef-wrap { padding-inline: 0; }
  .ef-hero-link { border-radius: 0; }
  .ef-hero-media { aspect-ratio: 4 / 3; }
  .ef-hero-copy { padding: 20px 16px 56px; gap: 8px; }
  .ef-hero-title { font-size: clamp(24px, 7vw, 30px); -webkit-line-clamp: 4; }
  .ef-hero-excerpt { display: none; }
  .ef-hero-controls { right: 12px; bottom: 12px; }
  .ef-latest { margin-inline: var(--ef-gutter); }
  .ef-latest-list { display: block; }
  .ef-latest-list li:nth-child(2) { border-top: 1px solid var(--ef-line); }
  .ef-latest-list a { grid-template-columns: 40px 88px minmax(0, 1fr); }
  .ef-thumb { width: 88px; }
  .ef-catnav a { min-width: 76px; padding: 12px 6px; font-size: 13px; }
  .ef-catnav a .ef-i { width: 40px; height: 40px; padding: 10px; }
  .ef-section { margin-top: 32px; }
  .ef-featured { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ef-featured-stack { gap: 16px; grid-auto-rows: auto; }
  .ef-featured-stack .ef-card-media { flex-basis: 38%; }
  .ef-side { flex-direction: column; gap: 16px; }
  .ef-side > * { flex: none; }
  .ef-cat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* Tarjetas compactas en móvil: miniatura a la izquierda. */
  .ef-card-cat { flex-direction: row; }
  .ef-card-cat .ef-card-media { flex: 0 0 38%; aspect-ratio: 4 / 3; align-self: stretch; }
  .ef-card-cat .ef-card-body { padding: 12px; gap: 8px; }
  .ef-card-cat .ef-card-title { font-size: 15px; }
  .ef-card-cat .ef-card-excerpt { display: none; }
  .ef-resources { grid-template-columns: minmax(0, 1fr); }
  .ef-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; padding-block: 36px 28px; }
  .ef-footer-bottom .ef-wrap { flex-direction: column; }
  .archive-grid, .related .top-grid { grid-template-columns: minmax(0, 1fr); }
  .on-this-day { grid-template-columns: 80px 1fr; padding: 24px 20px; }
}
@media (max-width: 380px) {
  .ef-featured-stack .ef-card { flex-direction: column; }
  .ef-featured-stack .ef-card-media { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* El logo de respaldo del hero se ubica arriba para no quedar bajo el titular. */
.ef-hero-media .ef-fallback { place-items: start center; padding-top: 12%; }
.ef-drawer-panel > * { flex-shrink: 0; }
.ef-drawer-nav .ef-nav-item > a::after { display: none; }
