:root {
  /* Tema oscuro de alto contraste para el contenido general */
  --bg: #0f172a;
  --bg-band: #141f35;
  --surface: #1b2842;
  --surface-soft: #243454;
  --ink: #ffffff;
  --ink-body: #e2e8f0;
  --ink-muted: #94a3b8;
  --border: #2c3e5e;
  --border-strong: #3b5178;
  --accent: #2dd4bf;
  --accent-solid: #0d9488;
  --accent-hover: #5eead4;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-border: rgba(45, 212, 191, 0.38);
  --stone: #fbbf24;
  --stone-soft: rgba(251, 191, 36, 0.15);
  --shadow-sm: 0 4px 12px rgba(2, 6, 23, 0.28);
  --shadow-md: 0 12px 30px -6px rgba(2, 6, 23, 0.48);
  --shadow-lg: 0 22px 44px -10px rgba(2, 6, 23, 0.65);
  --radius: 14px;
  --radius-sm: 9px;
  --max-w: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink-body); line-height: 1.65; -webkit-font-smoothing: antialiased; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.022em; line-height: 1.22; }
a { color: var(--accent); text-decoration: none; transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease, filter .16s ease; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
svg { flex-shrink: 0; }

.container { width: min(100% - 2.2rem, var(--max-w)); margin-inline: auto; }

/* Barra superior de progreso de lectura */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--accent), var(--stone)); z-index: 150; transition: width .08s linear; }

/* 1. MENU SUPERIOR OSCURO CON BOTONES BIEN VISIBLES */
.portal-strip { background: #070d19; border-bottom: 1px solid #1e293b; padding: .55rem 0; font-size: .84rem; }
.portal-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.portal-tagline { color: #cbd5e1; font-weight: 600; display: inline-flex; align-items: center; gap: .48rem; }
.portal-tagline svg { color: var(--accent); }
.portal-links { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.portal-pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .9rem;
  border-radius: 999px; color: #ffffff !important; font-weight: 700; font-size: .81rem;
  letter-spacing: .01em; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.portal-pill svg { color: #ffffff; }
.portal-pill.pill-agenda { background: #0d9488; border-color: #2dd4bf; }
.portal-pill.pill-renfe { background: #0284c7; border-color: #38bdf8; }
.portal-pill.pill-monumentos { background: #d97706; border-color: #fbbf24; }
.portal-pill:hover { filter: brightness(1.12); transform: translateY(-1px); color: #ffffff !important; }

/* 2. CABECERA PRINCIPAL EN BLANCO PURO CON LOGO */
.site-header {
  position: sticky; top: 0; z-index: 120; background: #ffffff;
  border-bottom: 1px solid #cbd5e1; box-shadow: 0 6px 20px rgba(2, 6, 23, 0.24);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: #0b1324; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-weight: 800; font-size: 1.24rem; letter-spacing: -0.03em; color: #0b1324; }
.brand-sub { font-size: .72rem; font-weight: 700; color: #475569; letter-spacing: .05em; text-transform: uppercase; margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: .35rem; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .32rem; padding: .55rem .98rem;
  border-radius: var(--radius-sm); font-size: .96rem; font-weight: 700; color: #0b1324;
}
.nav-link:hover, .nav-item:hover > .nav-link, .nav-link.active { background: #f1f5f9; color: #0b6e66; }
.nav-caret { transition: transform .18s ease; color: #475569; }
.nav-item:hover .nav-caret { transform: rotate(180deg); color: #0b6e66; }

.nav-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 285px; background: #ffffff;
  border: 1px solid #cbd5e1; border-radius: 12px; padding: .55rem;
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.22); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 130;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.drop-link { display: flex; align-items: flex-start; gap: .65rem; padding: .58rem .7rem; border-radius: 8px; color: #0b1324; }
.drop-link svg { color: #0b6e66; margin-top: 2px; }
.drop-link:hover { background: #f1f5f9; color: #0b6e66; }
.drop-title { display: block; font-size: .88rem; font-weight: 700; line-height: 1.25; color: #0b1324; }
.drop-sub { display: block; font-size: .76rem; color: #475569; font-weight: 500; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: .55rem; }
.search-trigger {
  display: inline-flex; align-items: center; gap: .55rem; background: #f1f5f9;
  color: #0b1324; border: 1px solid #cbd5e1; border-radius: 999px;
  padding: .48rem .95rem; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.search-trigger:hover { border-color: #0b6e66; color: #0b6e66; background: #ffffff; }
.search-trigger kbd { font-size: .73rem; padding: .12rem .4rem; border-radius: 5px; background: #ffffff; border: 1px solid #cbd5e1; color: #475569; font-family: inherit; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid #cbd5e1; background: #f1f5f9; color: #0b1324; cursor: pointer;
}
.menu-toggle { display: none; }

/* 3. IMAGEN PANORAMICA SUPERIOR DE 400PX A TODA PANTALLA CON DESENFOQUE GAUSSIANO LUMINOSO */
.hero-panoramic {
  position: relative;
  width: 100%;
  min-width: 100%;
  height: 400px;
  max-height: 400px;
  overflow: hidden;
  background: #1e293b;
  border-bottom: 1px solid var(--border);
}
.hero-panoramic picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-panoramic img {
  width: 100% !important;
  height: 400px !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center 48%;
  /* Desenfoque gaussiano suave + extra de luz y color vivo, escalando 1.04 para no mostrar bordes difuminados */
  filter: blur(3.5px) brightness(1.08) saturate(1.08);
  transform: scale(1.04);
}
.hero-panoramic-overlay {
  position: absolute;
  inset: 0;
  /* Velo muy ligero y cristalino en lugar de sombra oscura, solo apoyando el texto abajo */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(15, 23, 42, 0.18) 52%,
    rgba(15, 23, 42, 0.72) 100%
  );
  display: flex;
  align-items: flex-end;
  padding-bottom: 2rem;
}
.hero-panoramic-caption {
  max-width: 820px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 1.15rem 1.45rem;
}
.hero-panoramic-caption h1 {
  color: #ffffff;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  margin: .45rem 0 .35rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.hero-panoramic-caption p {
  color: #f8fafc;
  font-size: clamp(.94rem, 1.3vw, 1.05rem);
  margin: 0;
  max-width: 64ch;
}

/* 4. COMPONENTES SOBRE EL CONTENIDO OSCURO CON ALTO CONTRASTE */
.kicker {
  display: inline-flex; align-items: center; gap: .38rem; font-size: .74rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; padding: .26rem .7rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border);
}
.kicker-stone { background: var(--stone-soft); color: var(--stone); border-color: rgba(251, 191, 36, 0.4); }
.badge { display: inline-block; font-size: .73rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .22rem .6rem; border-radius: 6px; background: var(--surface-soft); color: var(--accent); border: 1px solid var(--border); }
.badge-amber { background: var(--stone-soft); color: var(--stone); }

.btn-primary {
  display: inline-flex; align-items: center; gap: .48rem; background: var(--accent-solid); color: #ffffff !important;
  padding: .64rem 1.18rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .9rem;
  border: 1px solid var(--accent);
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); color: var(--ink) !important;
  border: 1px solid var(--border-strong); padding: .6rem 1.1rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .88rem;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; background: var(--surface-soft); }

/* Bandas de Portada */
.home-band { padding: 2.8rem 0; background: var(--bg); }
.home-band-alt { background: var(--bg-band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 3.1rem 0; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-header-main h2 { font-size: clamp(1.5rem, 2.5vw, 2.05rem); margin: .45rem 0 .3rem; color: var(--ink); }
.section-header-main p { margin: 0; color: var(--ink-body); opacity: .9; font-size: .98rem; max-width: 66ch; }

/* Misteri d'Elx y La Dama de Elche */
.heritage-bento { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; align-items: stretch; }
.heritage-card {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-md);
}
.heritage-card:hover { border-color: var(--accent); }
.heritage-media { position: relative; aspect-ratio: 16 / 9.5; overflow: hidden; background: #090f1d; border-bottom: 1px solid var(--border); }
.heritage-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.heritage-card:hover .heritage-media img { transform: scale(1.03); }
.heritage-body { padding: 1.55rem 1.7rem 1.65rem; display: flex; flex-direction: column; flex: 1; }
.heritage-body h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin: .65rem 0 .6rem; }
.heritage-body h2 a { color: var(--ink); }
.heritage-body h2 a:hover { color: var(--accent); }
.heritage-desc { color: var(--ink-body); font-size: .98rem; line-height: 1.68; margin: 0 0 1.2rem; }
.heritage-sublinks { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .45rem; }
.sublink-item { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; color: var(--ink-body); }
.sublink-item svg { color: var(--accent); }
.sublink-item:hover { color: var(--accent); }

/* Dock de Portales Conectados */
.ecosystem-dock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.6rem; }
.eco-card {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.35rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-top: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink);
}
.eco-card.eco-amber { border-top-color: var(--stone); }
.eco-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-2px); background: var(--surface-soft); }
.eco-icon { width: 46px; height: 46px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.eco-card.eco-amber .eco-icon { background: var(--stone-soft); color: var(--stone); }
.eco-card h3 { margin: 0 0 .25rem; font-size: 1.04rem; display: flex; align-items: center; gap: .35rem; color: var(--ink); }
.eco-card p { margin: 0; font-size: .87rem; color: var(--ink-body); opacity: .88; line-height: 1.5; }

/* Ruta Monumental */
.monuments-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.monument-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.monument-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.monument-photo-wrap { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #090f1d; border-bottom: 1px solid var(--border); }
.monument-photo-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.monument-card:hover .monument-photo-wrap img { transform: scale(1.045); }
.monument-num {
  position: absolute; top: .75rem; left: .75rem; background: rgba(7, 13, 25, 0.86); color: #ffffff;
  font-size: .75rem; font-weight: 800; padding: .22rem .58rem; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22); letter-spacing: .04em;
}
.monument-body { padding: 1.2rem 1.3rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.monument-kicker { font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--stone); }
.monument-body h3 { font-size: 1.16rem; margin: .3rem 0 .45rem; }
.monument-body h3 a { color: var(--ink); }
.monument-body h3 a:hover { color: var(--accent); }
.monument-body p { font-size: .91rem; color: var(--ink-body); opacity: .9; margin: 0 0 1rem; flex: 1; line-height: 1.58; }
.monument-cta { font-size: .85rem; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: .35rem; }

/* Parques Naturales */
.parks-lead {
  display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); margin-bottom: 1.35rem;
}
.parks-lead-media { aspect-ratio: 16 / 10; background: #090f1d; overflow: hidden; }
.parks-lead-media img { width: 100%; height: 100%; object-fit: cover; }
.parks-lead-body { padding: 1.75rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.parks-lead-body h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); margin: .55rem 0 .6rem; }
.parks-lead-body h3 a { color: var(--ink); }
.parks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.park-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.park-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.park-thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: #090f1d; border-bottom: 1px solid var(--border); }
.park-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.park-body h4 { font-size: 1.02rem; margin: .35rem 0 .4rem; }
.park-body h4 a { color: var(--ink); }
.park-body h4 a:hover { color: var(--accent); }
.park-body p { font-size: .87rem; color: var(--ink-body); opacity: .88; margin: 0; line-height: 1.52; }

/* Pestañas y Rejillas de Articulos */
.tabs-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.tab-btn {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-body);
  padding: .48rem 1rem; border-radius: 999px; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.tab-btn:hover { border-color: var(--accent); color: var(--ink); }
.tab-btn.active { background: var(--accent-solid); border-color: var(--accent); color: #ffffff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.8rem 0 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: .65rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.3rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.card-thumb { aspect-ratio: 16 / 9.5; width: 100%; object-fit: cover; background: #090f1d; border-bottom: 1px solid var(--border); }
.card-body { padding: 1.15rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.08rem; line-height: 1.35; margin: .45rem 0 .5rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: .91rem; color: var(--ink-body); opacity: .88; margin: 0 0 1rem; flex: 1; line-height: 1.56; }
.card-meta { font-size: .8rem; color: var(--ink-muted); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: .7rem; font-weight: 600; }

/* Vista de Articulo Individual */
.breadcrumbs { font-size: .84rem; color: var(--ink-muted); margin: 1.3rem 0 .9rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.4rem; align-items: start; margin-bottom: 3.5rem; }
.article-main { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: clamp(1.35rem, 3.2vw, 2.6rem); box-shadow: var(--shadow-md); }
.article-header h1 { font-size: clamp(1.75rem, 3.3vw, 2.5rem); line-height: 1.18; margin: .65rem 0 .9rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .86rem; color: var(--ink-muted); padding-bottom: 1.15rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.meta-item { display: inline-flex; align-items: center; gap: .38rem; }
.article-hero-img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 10px; margin-bottom: 1.6rem; border: 1px solid var(--border); }

.prose { max-width: 72ch; font-size: 1.07rem; line-height: 1.8; color: var(--ink-body); }
.prose h2 { font-size: 1.48rem; margin: 2.1rem 0 .75rem; scroll-margin-top: 92px; color: var(--ink); }
.prose h3 { font-size: 1.22rem; margin: 1.6rem 0 .6rem; scroll-margin-top: 92px; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose strong { color: #ffffff; }
.prose img { cursor: zoom-in; margin: 1rem 0; border-radius: 10px; }
.prose blockquote { margin: 1.5rem 0; padding: .95rem 1.3rem; border-left: 4px solid var(--accent); background: var(--bg-band); border-radius: 0 10px 10px 0; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 1.4rem 0; border: 1px solid var(--border); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.prose th, .prose td { padding: .68rem .9rem; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { background: var(--bg-band); font-weight: 700; color: var(--ink); }

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; }
.prose img.img-w-75, .prose figure.img-w-75 { max-width: 75%; }
.prose img.img-w-50, .prose figure.img-w-50 { max-width: 50%; }
.prose img.img-center, .prose figure.img-center { margin-inline: auto; }
.prose img.img-left, .prose figure.img-left { float: left; margin: .3rem 1.25rem .8rem 0; max-width: min(50%, 380px); }
.prose img.img-right, .prose figure.img-right { float: right; margin: .3rem 0 .8rem 1.25rem; max-width: min(50%, 380px); }

.article-sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 1.2rem; }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.side-box h3 { margin: 0 0 .8rem; font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; color: var(--stone); }
.toc-list { list-style: none; padding: 0; margin: 0; font-size: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.toc-list a { color: var(--ink-body); font-weight: 500; display: inline-flex; align-items: center; gap: .45rem; }
.toc-list a:hover { color: var(--accent); }
.toc-list li.toc-h3 { padding-left: .85rem; font-size: .84rem; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-chip { font-size: .8rem; padding: .28rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-body); font-weight: 600; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface-soft); }

/* Glosarios A-Z y Paginacion */
.az-bar { position: sticky; top: 75px; z-index: 80; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .7rem .9rem; margin: 1.2rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: .35rem; box-shadow: var(--shadow-md); }
.az-bar a { padding: .24rem .55rem; border-radius: 6px; font-weight: 700; font-size: .83rem; color: var(--ink); background: var(--bg-band); }
.az-bar a:hover { background: var(--accent-solid); color: #ffffff; }
.inline-filter { width: 100%; max-width: 360px; padding: .58rem .95rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-size: .92rem; }
.glossary-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.35rem; margin-bottom: .9rem; scroll-margin-top: 145px; }
.glossary-item h3 { margin: 0 0 .4rem; color: var(--accent); }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: .45rem; margin: 2.4rem 0; }
.page-link { padding: .48rem .88rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); font-weight: 700; }
.page-link.current { background: var(--accent-solid); border-color: var(--accent); color: #ffffff; }

/* Buscador Instantaneo Modal */
.search-modal { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(5px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem; }
.search-modal.open { display: flex; }
.search-dialog { width: min(100%, 690px); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 82vh; }
.search-input-wrap { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.15rem; border-bottom: 1px solid var(--border); color: var(--accent); }
.search-input { flex: 1; border: 0; background: transparent; color: var(--ink); font-size: 1.05rem; outline: none; }
.search-filters { display: flex; gap: .4rem; padding: .55rem 1.15rem; background: var(--bg-band); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.s-filter { border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-body); border-radius: 999px; font-size: .78rem; font-weight: 700; padding: .22rem .7rem; cursor: pointer; }
.s-filter.active { background: var(--accent-solid); border-color: var(--accent); color: #ffffff; }
.search-results { overflow-y: auto; padding: .6rem; display: flex; flex-direction: column; gap: .3rem; }
.s-item { display: block; padding: .72rem .9rem; border-radius: 10px; color: var(--ink); border: 1px solid transparent; }
.s-item:hover, .s-item.focused { background: var(--surface-soft); border-color: var(--accent); }
.s-item-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .74rem; color: var(--accent); font-weight: 800; text-transform: uppercase; }
.s-item-title { font-weight: 700; font-size: .98rem; margin: .15rem 0; color: var(--ink); }
.s-item-exc { font-size: .84rem; color: var(--ink-body); opacity: .85; margin: 0; }

/* Lightbox y Pie de Pagina */
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.92); z-index: 250; display: none; align-items: center; justify-content: center; padding: 1.5rem; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; max-width: 94vw; object-fit: contain; border-radius: 8px; }

.site-footer { margin-top: auto; background: #070d19; border-top: 1px solid var(--border); padding: 3rem 0 2rem; font-size: .91rem; color: var(--ink-muted); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.2fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { color: #ffffff; margin: 0 0 .8rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .48rem; }
.footer-links a { color: #cbd5e1; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; font-size: .84rem; }

@media (max-width: 1024px) {
  .monuments-grid { grid-template-columns: repeat(2, 1fr); }
  .parks-grid { grid-template-columns: repeat(2, 1fr); }
  .ecosystem-dock { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-panoramic { height: 320px; }
  .heritage-bento, .parks-lead, .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .portal-tagline { display: none; }
  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0; background: #ffffff;
    border-bottom: 1px solid #cbd5e1; flex-direction: column; align-items: stretch;
    padding: .9rem 1.2rem 1.2rem; box-shadow: 0 18px 34px rgba(0, 0, 0, 0.25); gap: .25rem;
  }
  .main-nav.open { display: flex; }
  .nav-dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid #cbd5e1; border-radius: 0; padding: .25rem 0 .4rem .8rem; margin-left: .8rem; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { padding: .55rem; }
}
@media (max-width: 620px) {
  .monuments-grid, .parks-grid, .footer-grid { grid-template-columns: 1fr; }
  .prose img.img-left, .prose img.img-right, .prose figure.img-left, .prose figure.img-right,
  .prose img.img-w-75, .prose img.img-w-50 { float: none; max-width: 100%; margin-inline: auto; }
}

/* === MOTOR VISUAL DEL SITE BUILDER DE PORTADA === */
.hero-panoramic {
  height: var(--hero-h, 400px) !important;
  max-height: var(--hero-h, 400px) !important;
  background: #e2e8f0 !important;
}
.hero-panoramic img {
  height: var(--hero-h, 400px) !important;
  object-position: center var(--hero-pos-y, 48%) !important;
  filter: blur(var(--hero-blur, 1.5px)) brightness(var(--hero-bright, 1.18)) saturate(var(--hero-sat, 1.05)) !important;
  transform: scale(1.02) !important;
}
.hero-panoramic-overlay {
  /* Difuminado luminoso superior + transicion suave inferior controlada desde el Panel */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, var(--hero-veil, 0.28)) 0%,
    rgba(255, 255, 255, calc(var(--hero-veil, 0.28) * 0.65)) 52%,
    rgba(15, 23, 42, var(--hero-fade, 0.34)) 100%
  ) !important;
}
.hero-panoramic-caption.box-glass-light {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.hero-panoramic-caption.box-glass-light h1 { color: #0b1324; text-shadow: none; }
.hero-panoramic-caption.box-glass-light p { color: #1e293b; text-shadow: none; }
.hero-panoramic-caption.box-glass-light .kicker { background: #0d9488; color: #ffffff; border-color: #0d9488; }

.hero-panoramic-caption.box-glass-dark {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.hero-panoramic-caption.box-none {
  background: transparent; border: 0; backdrop-filter: none; padding: 0;
}

/* Bandas de color elegibles por seccion en el Site Builder */
.sb-band { padding: 3rem 0; position: relative; }
.sb-pad-compact { padding: 1.8rem 0; }
.sb-pad-wide { padding: 4.4rem 0; }

.sb-theme-dark { background: #0f172a; color: #e2e8f0; }
.sb-theme-slate { background: #141f35; border-top: 1px solid #2c3e5e; border-bottom: 1px solid #2c3e5e; color: #e2e8f0; }
.sb-theme-emerald { background: linear-gradient(135deg, #0b2928 0%, #0f172a 100%); border-top: 1px solid rgba(45,212,191,.28); border-bottom: 1px solid rgba(45,212,191,.28); }
.sb-theme-white {
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0b1324;
  --ink-body: #1e293b;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #0b6e66;
  --stone: #b45309;
  background: #ffffff;
  color: #1e293b;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.sb-theme-white .section-header-main h2 { color: #0b1324; }
.sb-theme-white .section-header-main p { color: #475569; }

/* Efectos de tarjeta elegibles en el Site Builder */
.sb-fx-lift .heritage-card:hover, .sb-fx-lift .monument-card:hover, .sb-fx-lift .park-card:hover, .sb-fx-lift .card:hover {
  transform: translateY(-6px); box-shadow: 0 20px 38px -10px rgba(2, 6, 23, 0.55);
}
.sb-fx-glow .heritage-card:hover, .sb-fx-glow .monument-card:hover, .sb-fx-glow .park-card:hover, .sb-fx-glow .card:hover {
  border-color: #2dd4bf; box-shadow: 0 0 0 1px #2dd4bf, 0 14px 32px -6px rgba(45, 212, 191, 0.25);
}
.sb-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.sb-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; }
.sb-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .sb-cols-3, .sb-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .sb-cols-2, .sb-cols-3, .sb-cols-4 { grid-template-columns: 1fr; } }

/* Banner promocional personalizado del Site Builder */
.sb-cta-banner {
  position: relative; border-radius: 18px; overflow: hidden; padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.sb-cta-banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: blur(2px); }
.sb-cta-banner-content { position: relative; z-index: 2; max-width: 68ch; }

/* Animacion suave de entrada al hacer scroll */
.sb-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.sb-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .sb-reveal { opacity: 1; transform: none; } }

/* === CONFIGURACION GENERAL DE ARTICULOS: VISITAS, TAGS Y RELACIONADOS === */
.article-layout.single-col { grid-template-columns: minmax(0, 920px); justify-content: center; }
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .85rem; }
.card-tag-mini {
  font-size: .72rem; font-weight: 600; padding: .15rem .52rem; border-radius: 999px;
  background: var(--surface-soft); border: 1px solid var(--border); color: var(--ink-body);
}
.card-tag-mini:hover { border-color: var(--accent); color: var(--accent); }
.meta-inline-group { display: inline-flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.hits-pill { display: inline-flex; align-items: center; gap: .32rem; color: var(--ink-muted); font-size: .8rem; }

.related-bottom-section { margin-top: 2.6rem; padding-top: 1.8rem; border-top: 1px solid var(--border); }
.related-bottom-head { display: flex; align-items: center; gap: .55rem; margin: 0 0 1.2rem; font-size: 1.28rem; color: var(--ink); }
.related-bottom-head svg { color: var(--accent); }
.related-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.15rem; }
.rel-card {
  background: var(--bg-band); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; transition: transform .16s ease, border-color .16s ease;
}
.rel-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.rel-card-thumb { aspect-ratio: 16 / 9.5; width: 100%; object-fit: cover; background: #090f1d; border-bottom: 1px solid var(--border); }
.rel-card-body { padding: .95rem 1.05rem 1.05rem; display: flex; flex-direction: column; flex: 1; }
.rel-card-title { font-size: .98rem; line-height: 1.35; margin: .35rem 0 .55rem; flex: 1; }
.rel-card-title a { color: var(--ink); }
.rel-card-title a:hover { color: var(--accent); }

/* === MAPA DE SITUACION INTERACTIVO (LEAFLET LAZY) === */
.article-map-card {
  margin-top: 2.2rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-band);
  box-shadow: var(--shadow-sm);
}
.article-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-map-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink);
}
.article-map-title svg { color: var(--accent); }
.article-map-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.map-btn {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .4rem .82rem; border-radius: 8px; font-size: .81rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-body);
}
.map-btn.primary { background: var(--accent-solid); border-color: var(--accent); color: #ffffff !important; }
.map-btn:hover { border-color: var(--accent); color: var(--accent); }
.esm-map-canvas {
  width: 100%;
  height: 350px;
  background: #0b1324;
  z-index: 1;
}
.esm-map-hint {
  padding: .45rem 1.25rem;
  font-size: .76rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* === BOTON FLOTANTE UP TO TOP === */
.esm-back-to-top {
  position: fixed;
  right: 1.45rem;
  bottom: 1.45rem;
  z-index: 95;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #0d9488;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.94);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease, background-color .18s ease;
}
.esm-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.esm-back-to-top:hover {
  background: #0f766e;
  transform: translateY(-3px) scale(1.03);
}
.esm-back-to-top:focus-visible {
  outline: 3px solid #2dd4bf;
  outline-offset: 2px;
}
@media (max-width: 640px) {
  .esm-back-to-top { right: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}

/* === TEMA DE LECTURA POR ARTICULO (BLANCO CON TEXTO NEGRO / PERSONALIZABLE) === */
.esm-article-canvas {
  color: var(--art-ink-body);
}
.esm-article-canvas .breadcrumbs {
  color: var(--art-ink-muted);
}
.esm-article-canvas .breadcrumbs a {
  color: var(--art-ink-muted);
}
.esm-article-canvas .breadcrumbs a:hover {
  color: var(--art-accent);
}
.esm-article-canvas .breadcrumbs span {
  color: var(--art-ink-head);
  font-weight: 600;
}
.esm-article-canvas.is-carded .article-main {
  background: var(--art-card-bg);
  padding: 2rem 2.2rem;
  border-radius: 16px;
  border: 1px solid var(--art-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
@media (max-width: 720px) {
  .esm-article-canvas.is-carded .article-main { padding: 1.25rem 1.1rem; }
}
.esm-article-canvas .article-header h1,
.esm-article-canvas .prose h1,
.esm-article-canvas .prose h2,
.esm-article-canvas .prose h3,
.esm-article-canvas .prose h4,
.esm-article-canvas .prose strong,
.esm-article-canvas .prose b,
.esm-article-canvas .related-bottom-head,
.esm-article-canvas .side-box h3,
.esm-article-canvas .rel-card-title a,
.esm-article-canvas .article-map-title {
  color: var(--art-ink-head);
}
.esm-article-canvas .prose,
.esm-article-canvas .prose p,
.esm-article-canvas .prose li,
.esm-article-canvas .prose td,
.esm-article-canvas .prose th {
  color: var(--art-ink-body);
}
.esm-article-canvas .prose a:not(.btn):not(.map-btn) {
  color: var(--art-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.esm-article-canvas .prose blockquote {
  background: var(--art-box-bg);
  border-left: 4px solid var(--art-accent);
  color: var(--art-ink-body);
  padding: 1rem 1.25rem;
  border-radius: 0 10px 10px 0;
}
.esm-article-canvas .prose table th {
  background: var(--art-box-bg);
}
.esm-article-canvas .prose table th,
.esm-article-canvas .prose table td {
  border-color: var(--art-border);
}
.esm-article-canvas .article-meta,
.esm-article-canvas .hits-pill,
.esm-article-canvas .card-meta,
.esm-article-canvas .esm-map-hint {
  color: var(--art-ink-muted);
  border-color: var(--art-border);
}
.esm-article-canvas .article-meta a {
  color: var(--art-accent);
}
.esm-article-canvas .badge {
  background: var(--art-badge-bg);
  color: var(--art-accent);
  border: 1px solid var(--art-border);
}
.esm-article-canvas .tag-chip {
  background: var(--art-box-bg);
  color: var(--art-ink-body);
  border: 1px solid var(--art-border-strong);
}
.esm-article-canvas .tag-chip:hover {
  border-color: var(--art-accent);
  color: var(--art-accent);
}
.esm-article-canvas .side-box,
.esm-article-canvas .rel-card,
.esm-article-canvas .article-map-card {
  background: var(--art-box-bg);
  border-color: var(--art-border);
}
.esm-article-canvas .side-box a {
  color: var(--art-ink-body);
}
.esm-article-canvas .side-box a:hover,
.esm-article-canvas .rel-card-title a:hover,
.esm-article-canvas .card-meta a {
  color: var(--art-accent);
}
.esm-article-canvas .article-map-head,
.esm-article-canvas .related-bottom-section,
.esm-article-canvas .rel-card-thumb {
  border-color: var(--art-border);
}
.esm-article-canvas .map-btn:not(.primary) {
  background: var(--art-page-bg);
  color: var(--art-ink-head);
  border-color: var(--art-border-strong);
}

/* === NAVEGACION DINAMICA MULTINIVEL (GESTOR DE MENUS) === */
.esm-dyn-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.esm-nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.esm-dyn-nav .esm-nav-item {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .5rem .85rem;
  border-radius: 9px;
  font-weight: 700;
  font-size: .93rem;
  color: #0f172a;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.esm-dyn-nav .esm-nav-item:hover {
  background: #f0fdfa;
  color: #0f766e;
}
.esm-dyn-nav .esm-nav-item svg {
  color: #0d9488;
  flex-shrink: 0;
}
.esm-dyn-nav .esm-caret {
  opacity: .7;
  transition: transform .18s ease;
}
.esm-nav-group:hover .esm-caret,
.esm-nav-group:focus-within .esm-caret {
  transform: rotate(180deg);
}
.esm-subnav {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: .42rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  z-index: 220;
}
.esm-nav-group::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}
.esm-nav-group:hover .esm-subnav,
.esm-nav-group:focus-within .esm-subnav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.esm-subnav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .52rem .78rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  color: #1e293b !important;
  text-decoration: none;
  white-space: nowrap;
}
.esm-subnav-link:hover {
  background: #f0fdfa;
  color: #0f766e !important;
}
@media (max-width: 760px) {
  .esm-subnav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid #99f6e4;
    border-radius: 0;
    padding: .15rem 0 .25rem .65rem;
    min-width: 0;
  }
  .esm-nav-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* === ICONOS SVG EN SUBMENUS Y PIE DE PAGINA DINAMICO === */
.esm-subnav-main {
  display: inline-flex;
  align-items: center;
  gap: .48rem;
}
.esm-subnav-main svg,
.esm-menu-svg {
  color: #0d9488;
  flex-shrink: 0;
}
.esm-dyn-footer {
  background: #070d19;
  color: #cbd5e1;
  border-top: 1px solid #1e293b;
  padding: 2.8rem 0 1.6rem;
  margin-top: 3rem;
}
.esm-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(185px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.esm-footer-title {
  display: block;
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: .55rem;
}
.esm-footer-desc {
  margin: 0;
  font-size: .88rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 340px;
}
.esm-footer-col h4 {
  margin: 0 0 .75rem;
  font-size: .83rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #f8fafc;
}
.esm-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .48rem;
}
.esm-footer-col a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #94a3b8;
  font-size: .88rem;
  text-decoration: none;
  transition: color .15s ease;
}
.esm-footer-col a:hover {
  color: #2dd4bf;
}
.esm-footer-bottom {
  padding-top: 1.2rem;
  font-size: .81rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

/* === FIRMA DEL AUTOR Y FICHA DE CURRICULUM EDITORIAL === */
.esm-byline-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .62rem;
  border-radius: 999px;
  background: var(--art-box-bg, #f8fafc);
  border: 1px solid var(--art-border, #e2e8f0);
  color: var(--art-ink-body, #111827) !important;
  text-decoration: none !important;
  font-size: .84rem;
}
.esm-byline-pill:hover {
  border-color: var(--art-accent, #0f766e);
  color: var(--art-accent, #0f766e) !important;
}
.esm-byline-pill svg { color: var(--art-accent, #0f766e); }

.esm-author-box {
  margin: 2.4rem 0 1.6rem;
  padding: 1.45rem 1.6rem;
  border-radius: 16px;
  background: var(--art-box-bg, #f8fafc);
  border: 1px solid var(--art-border-strong, #cbd5e1);
  border-left: 4px solid var(--art-accent, #0f766e);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.esm-author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--art-accent, #0f766e);
  display: block;
}
.esm-author-monogram {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--art-badge-bg, #f0fdfa);
  border: 2px solid var(--art-accent, #0f766e);
  color: var(--art-accent, #0f766e);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .03em;
}
.esm-author-kicker {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--art-accent, #0f766e);
  margin-bottom: .2rem;
}
.esm-author-name {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--art-ink-head, #090d16) !important;
}
.esm-author-role {
  font-size: .86rem;
  font-weight: 600;
  color: var(--art-ink-muted, #4b5563);
  margin-top: .15rem;
}
.esm-author-bio {
  margin-top: .65rem;
  font-size: .92rem;
  line-height: 1.62;
  color: var(--art-ink-body, #111827);
}
.esm-author-bio p { margin: 0 0 .5rem; color: var(--art-ink-body, #111827); }
.esm-author-bio p:last-child { margin-bottom: 0; }
.esm-author-bio a, .esm-author-link {
  color: var(--art-accent, #0f766e);
  font-weight: 700;
  text-decoration: underline;
}
.esm-author-link {
  display: inline-block;
  margin-top: .55rem;
  font-size: .84rem;
  text-decoration: none;
}
@media (max-width: 600px) {
  .esm-author-box { grid-template-columns: 1fr; padding: 1.15rem; gap: .85rem; }
}

/* === PIE DE PAGINA MULTICOLUMNA (3 A 6 COLUMNAS GARANTIZADAS) === */
footer.esm-dyn-footer {
  display: block !important;
  background: #070d19;
  color: #cbd5e1;
  border-top: 1px solid #1e293b;
  padding: 3rem 0 1.6rem;
  margin-top: 3.2rem;
}
footer.esm-dyn-footer .esm-footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: block !important;
}
footer.esm-dyn-footer .esm-footer-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--esm-ft-cols, 3), minmax(0, 1fr)) !important;
  gap: 2.25rem !important;
  align-items: start !important;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
footer.esm-dyn-footer .esm-footer-col h4 {
  margin: 0 0 .75rem;
  font-size: .88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #ffffff;
}
footer.esm-dyn-footer .esm-footer-prose {
  font-size: .89rem;
  line-height: 1.62;
  color: #94a3b8;
  margin-bottom: .85rem;
}
footer.esm-dyn-footer .esm-footer-prose p { margin: 0 0 .5rem; }
footer.esm-dyn-footer .esm-footer-prose p:last-child { margin-bottom: 0; }
footer.esm-dyn-footer .esm-footer-prose strong { color: #f1f5f9; }
footer.esm-dyn-footer .esm-footer-prose a { color: #2dd4bf; text-decoration: underline; }
footer.esm-dyn-footer .esm-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .48rem;
}
footer.esm-dyn-footer .esm-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #cbd5e1;
  font-size: .88rem;
  text-decoration: none;
}
footer.esm-dyn-footer .esm-footer-links a:hover { color: #2dd4bf; }
footer.esm-dyn-footer .esm-footer-bottom {
  padding-top: 1.2rem;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .81rem;
  color: #64748b;
}
@media (max-width: 920px) {
  footer.esm-dyn-footer .esm-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 600px) {
  footer.esm-dyn-footer .esm-footer-grid {
    grid-template-columns: 1fr !important;
  }
}
