/* =========================================================
   Hoja de estilos del SITIO PUBLICO — blogcms
   (el panel de administracion tiene la suya: assets/css/admin.css; los temas de
   Panel > Apariencia solo afectan a esta hoja)
   Sistema de diseño — blogcms
   Paleta: tinta verdosa + papel cálido + acento bosque/ocre
   Tipografia: Fraunces (display) + Inter (texto) + IBM Plex Mono (meta)
   Firma visual: "lomo" de color por categoria + franja de metadatos en mono
   ========================================================= */

/* ---------- Fuentes propias (latin; incluye ñ, tildes, ¿ ¡) — sin depender de Google Fonts ---------- */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/fraunces-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fraunces-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/playfair-display-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/lora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/source-sans-3-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/source-sans-3-latin-600-normal.woff2') format('woff2'); }

:root {
    --ink: #16211c;
    --ink-soft: #3d473f;
    --paper: #faf9f5;
    --card: #ffffff;
    --line: #e4e1d8;
    --forest: #2f6e5e;
    --forest-dark: #204a3f;
    --ochre: #c98a2c;
    --clay: #a8492f;
    --slate: #45607a;

    /* Valores derivados (los recalcula Panel > Apariencia con control de contraste; ver Theme.php) */
    --ink-rgb: 22, 33, 28;
    --forest-rgb: 47, 110, 94;
    --forest-focus: #7fa89c;
    --forest-text: #204a3f;
    --ochre-rgb: 201, 138, 44;
    --ochre-text: #7a5717;
    --clay-rgb: 168, 73, 47;
    --clay-text: #a8492f;
    --slate-rgb: 69, 96, 122;
    --slate-text: #45607a;
    --on-primary: #ffffff;
    --on-primary-filter: invert(1);
    --link: #204a3f;
    --link-rgb: 32, 74, 63;
    --link-hover: #2f6e5e;
    --link-hover-rgb: 47, 110, 94;

    --font-heading: var(--font-heading);
    --font-body: 'Inter', system-ui, sans-serif;
    --heading-weight: 600;
    --heading-tracking: -0.01em;
    --body-scale: 1;

    --r-card: 0;
    --r-ctl: 0.25rem;
    --r-ctl-lg: 0.35rem;
    --r-tag: 2px;
    --r-img: 0.25rem;
    --container-max: 1140px;

    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-body-font-family: var(--font-body);
    --bs-link-color: var(--link);
    --bs-link-color-rgb: var(--link-rgb);
    --bs-link-hover-color: var(--link-hover);
    --bs-link-hover-color-rgb: var(--link-hover-rgb);
    --bs-primary: var(--forest);
    --bs-primary-rgb: var(--forest-rgb);
    --bs-border-radius: var(--r-ctl);
    --bs-border-radius-lg: var(--r-ctl-lg);
    --bs-border-color: var(--line);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--paper);
    font-size: calc(1rem * var(--body-scale));
}

.font-display {
    font-family: var(--font-heading);
    font-optical-sizing: auto;
}

.font-mono {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

h1, h2, h3, .display-headline {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    letter-spacing: var(--heading-tracking);
    color: var(--ink);
}

/* ---------- Meta strip (firma visual) ---------- */
.meta-strip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.meta-strip .dot::before {
    content: "·";
    margin-right: 0.6rem;
    color: var(--line);
}

/* ---------- Category spine + tag ---------- */
.cat-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: var(--r-tag);
    display: inline-block;
}

.spine {
    border-left: 4px solid var(--forest);
    padding-left: 1rem;
}

/* Rotacion de color segun categoria (clases asignadas via PHP con un hash) */
.spine-0, .cat-0 { border-color: var(--forest); }
.cat-0 { background: rgba(var(--forest-rgb), .1); color: var(--forest-text); }
.spine-1, .cat-1 { border-color: var(--ochre); }
.cat-1 { background: rgba(var(--ochre-rgb), .14); color: var(--ochre-text); }
.spine-2, .cat-2 { border-color: var(--clay); }
.cat-2 { background: rgba(var(--clay-rgb), .12); color: var(--clay-text); }
.spine-3, .cat-3 { border-color: var(--slate); }
.cat-3 { background: rgba(var(--slate-rgb), .12); color: var(--slate-text); }

/* ---------- Navbar ---------- */
.site-navbar {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.site-navbar .brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--ink);
}

.site-navbar .nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.site-navbar .nav-link:hover { color: var(--forest-dark); }

/* ---------- Hero / featured ---------- */
.hero-featured {
    background: var(--card);
    border: 1px solid var(--line);
    overflow: hidden;
}

.hero-featured img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.hero-featured .hero-title {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.1;
}

/* ---------- Post cards ---------- */
.post-card {
    background: var(--card);
    border: 1px solid var(--line);
    transition: transform .15s ease, box-shadow .15s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(var(--ink-rgb), 0.08);
}

.post-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card .card-title a {
    color: var(--ink);
    text-decoration: none;
}

.post-card .card-title a:hover { color: var(--forest-dark); }

/* ---------- Sidebar ---------- */
.sidebar-block {
    background: var(--card);
    border: 1px solid var(--line);
}

.sidebar-block .block-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.category-pill-list a {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px dashed var(--line);
}

.category-pill-list a:hover { color: var(--forest-dark); }

.category-pill-list .count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--ink-soft);
}

/* ---------- Single post ---------- */
.post-content {
    max-width: 720px;
    font-size: 1.08rem;
    line-height: 1.75;
}

.post-content img,
.post-content iframe {
    max-width: 100%;
    border-radius: var(--r-img);
    margin: 1.25rem 0;
}

.post-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.post-content blockquote {
    border-left: 3px solid var(--forest);
    padding-left: 1rem;
    color: var(--ink-soft);
    font-style: italic;
}

.post-content h2, .post-content h3 {
    margin-top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--ink);
    color: #d9d9d3;
    border-top: 1px solid var(--line);
}

.site-footer a { color: #f1efe8; }

/* ---------- Lightbox (con boton de cierre siempre visible) ---------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 33, 28, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay .lightbox-image {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.lightbox-overlay .lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-overlay .lightbox-close:hover {
    background: rgba(255,255,255,.2);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .post-card, html { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Portada: titulo H1 fijo (SEO) ---------- */
.home-intro { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.home-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.15;
    margin: 0 0 .35rem;
}
.home-title .home-page { font-weight: 500; color: var(--ink-soft); font-size: .6em; }
.home-sub { color: var(--ink-soft); max-width: 62ch; }

/* ---------- Accesibilidad: saltar al contenido ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--forest-dark);
    color: #fff;
    padding: .5rem .9rem;
    z-index: 2000;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ---------- Buscador en la barra ---------- */
.nav-search .form-control { min-width: 9rem; }
@media (max-width: 991.98px) { .nav-search { margin-top: .5rem; } }

/* ---------- Sidebar: mas leidos ---------- */
.popular-list li { display: flex; gap: .65rem; align-items: baseline; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.popular-list li:last-child { border-bottom: 0; }
.popular-list .rank { font-family: 'IBM Plex Mono', monospace; font-size: .8rem; color: var(--ochre); font-weight: 500; }
.popular-list a { color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.3; }
.popular-list a:hover { color: var(--forest-dark); }

/* Imagenes del contenido: con width/height en el HTML (anti-CLS) deben conservar la proporcion */
.post-content img { height: auto; }

/* ---------- Galeria de fotos (post, paginas y editor) ---------- */
.gallery { margin: 1.5rem 0; }
.gallery .gallery-item { margin: 0; }
.gallery .gallery-item a { display: block; line-height: 0; border-radius: var(--r-img); overflow: hidden; cursor: zoom-in; }
.gallery .gallery-item img { display: block; width: 100%; height: auto; transition: transform .25s ease, opacity .15s; }
.gallery .gallery-item a:hover img, .gallery .gallery-item a:focus-visible img { transform: scale(1.03); }
.gallery .gallery-item a:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.gallery figcaption { font-size: .82rem; line-height: 1.35; color: var(--ink-soft); padding: .35rem .15rem 0; }

/* Cuadricula: fotos recortadas del mismo tamano */
.gallery-grid { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
.gallery-grid .gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 768px) {
    .gallery-grid.gallery-cols-3, .gallery-grid.gallery-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .gallery-grid.gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Mosaico: proporcion original de cada foto */
.gallery-masonry { column-gap: .6rem; column-count: 2; }
.gallery-masonry .gallery-item { break-inside: avoid; margin-bottom: .6rem; }
@media (min-width: 768px) {
    .gallery-masonry.gallery-cols-3, .gallery-masonry.gallery-cols-4 { column-count: 3; }
}
@media (min-width: 992px) {
    .gallery-masonry.gallery-cols-4 { column-count: 4; }
}
/* Cuadricula de 2 columnas: siempre 2, tambien en escritorio */
.gallery-cols-2.gallery-grid { grid-template-columns: repeat(2, 1fr); }
.gallery-cols-2.gallery-masonry { column-count: 2; }

/* Visor (lightbox) con navegacion */
.lightbox-overlay .lightbox-figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-overlay .lightbox-image { max-width: 92vw; max-height: 80vh; object-fit: contain; }
.lightbox-overlay .lightbox-caption { color: #f3f1ea; font-size: .95rem; line-height: 1.4; margin-top: .75rem; text-align: center; max-width: 80ch; }
.lightbox-overlay .lightbox-caption:empty { display: none; }
.lightbox-overlay .lightbox-counter { position: absolute; top: 1.1rem; left: 1.25rem; color: #f3f1ea; font: 500 .85rem 'IBM Plex Mono', monospace; }
.lightbox-overlay .lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 3rem; height: 3rem; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-overlay .lightbox-nav:hover, .lightbox-overlay .lightbox-nav:focus-visible { background: rgba(255, 255, 255, .3); }
.lightbox-overlay .lightbox-prev { left: .75rem; }
.lightbox-overlay .lightbox-next { right: .75rem; }
.lightbox-overlay .lightbox-nav[hidden], .lightbox-overlay .lightbox-counter[hidden] { display: none; }
@media (max-width: 575.98px) {
    .lightbox-overlay .lightbox-nav { width: 2.5rem; height: 2.5rem; font-size: 1.6rem; }
}

/* =====================================================================
   TEMA — todo lo siguiente lo gobierna Panel > Apariencia (variables
   en :root + atributos data-* de <html>). Ver app/Helpers/Theme.php
   ===================================================================== */

/* Componentes de Bootstrap con la paleta del sitio (antes usaban el azul por defecto) */
.btn-primary {
    --bs-btn-color: var(--on-primary); --bs-btn-bg: var(--forest); --bs-btn-border-color: var(--forest);
    --bs-btn-hover-color: var(--on-primary); --bs-btn-hover-bg: var(--forest-dark); --bs-btn-hover-border-color: var(--forest-dark);
    --bs-btn-active-color: var(--on-primary); --bs-btn-active-bg: var(--forest-dark); --bs-btn-active-border-color: var(--forest-dark);
    --bs-btn-disabled-color: var(--on-primary); --bs-btn-disabled-bg: var(--forest); --bs-btn-disabled-border-color: var(--forest);
    --bs-btn-focus-shadow-rgb: var(--forest-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--link); --bs-btn-border-color: var(--forest);
    --bs-btn-hover-color: var(--on-primary); --bs-btn-hover-bg: var(--forest); --bs-btn-hover-border-color: var(--forest);
    --bs-btn-active-color: var(--on-primary); --bs-btn-active-bg: var(--forest); --bs-btn-active-border-color: var(--forest);
    --bs-btn-disabled-color: var(--forest); --bs-btn-disabled-border-color: var(--forest);
    --bs-btn-focus-shadow-rgb: var(--forest-rgb);
}
.pagination {
    --bs-pagination-color: var(--link); --bs-pagination-hover-color: var(--forest-dark); --bs-pagination-focus-color: var(--forest-dark);
    --bs-pagination-active-bg: var(--forest); --bs-pagination-active-border-color: var(--forest); --bs-pagination-active-color: var(--on-primary);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(var(--forest-rgb), .25);
    --bs-pagination-border-radius: var(--r-ctl);
}
.form-check-input:checked, .form-check-input[type="checkbox"]:indeterminate { background-color: var(--forest); border-color: var(--forest); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--forest-focus); box-shadow: 0 0 0 .25rem rgba(var(--forest-rgb), .22); }
.text-bg-primary { background-color: var(--forest) !important; color: var(--on-primary) !important; }

/* Formas: tarjetas con el radio elegido */
.post-card, .hero-featured, .sidebar-block { border-radius: var(--r-card); }
.post-card { overflow: hidden; }

/* Ancho del contenido */
@media (min-width: 1200px) { .container { max-width: var(--container-max); } }

/* Marca: logo y/o nombre */
.site-navbar .brand { display: inline-flex; align-items: center; gap: .6rem; }
.site-navbar .brand-logo { display: block; width: auto; max-width: 220px; object-fit: contain; }

/* Estilo de tarjetas */
[data-cards="shadow"] .post-card, [data-cards="shadow"] .hero-featured, [data-cards="shadow"] .sidebar-block {
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(var(--ink-rgb), .06), 0 8px 24px rgba(var(--ink-rgb), .07);
}
[data-cards="shadow"] .post-card:hover { box-shadow: 0 2px 4px rgba(var(--ink-rgb), .08), 0 14px 32px rgba(var(--ink-rgb), .12); }
[data-cards="flat"] .post-card, [data-cards="flat"] .hero-featured, [data-cards="flat"] .sidebar-block {
    border-color: transparent;
    background: rgba(var(--ink-rgb), .04);
}
[data-cards="flat"] .post-card:hover { box-shadow: none; transform: none; background: rgba(var(--ink-rgb), .07); }

/* Encabezado */
[data-header="primary"] .site-navbar { background: var(--forest); border-bottom-color: var(--forest-dark); }
[data-header="primary"] .site-navbar .brand, [data-header="primary"] .site-navbar .nav-link { color: var(--on-primary); }
[data-header="primary"] .site-navbar .nav-link:hover { color: var(--on-primary); opacity: .78; }
[data-header="primary"] .navbar-toggler { --bs-navbar-toggler-border-color: rgba(var(--ink-rgb), .25); }
[data-header="primary"] .navbar-toggler-icon { filter: var(--on-primary-filter); }
[data-header="dark"] .site-navbar { background: var(--ink); border-bottom-color: var(--ink); }
[data-header="dark"] .site-navbar .brand, [data-header="dark"] .site-navbar .nav-link { color: #f3f1ea; }
[data-header="dark"] .site-navbar .nav-link:hover { color: #fff; opacity: .8; }
[data-header="dark"] .navbar-toggler { --bs-navbar-toggler-border-color: rgba(255, 255, 255, .35); }
[data-header="dark"] .navbar-toggler-icon { filter: invert(1); }

/* Barra lateral (portada, categorias y buscador) */
[data-sidebar="none"] .layout-side { display: none; }
[data-sidebar="none"] .layout-main { flex: 0 0 auto; width: 100%; }
@media (min-width: 992px) {
    [data-sidebar="none"] .layout-main .col-sm-6 { width: 33.3333%; }
    [data-sidebar="left"] .layout-row { flex-direction: row-reverse; }
}

/* ---------- Publicidad (AdSense) ---------- */
.ad-slot { margin: 1.5rem 0; text-align: center; clear: both; overflow: hidden; max-width: 100%; }
.ad-slot .ad-label { display: block; font: 500 .62rem 'IBM Plex Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); opacity: .75; margin-bottom: .3rem; }
.ad-slot ins.adsbygoogle { min-width: 1px; }
/* Espacio reservado (evita saltos de diseno mientras carga el anuncio) */
.ad-fmt-auto, .ad-fmt-rectangle, .ad-fmt-in_article, .ad-fmt-in_feed { min-height: 250px; }
.ad-fmt-horizontal { min-height: 100px; }
.ad-fmt-vertical { min-height: 600px; }
/* Si AdSense no tiene anuncio para ese espacio, se colapsa (sin huecos vacios) */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.ad-slot-sidebar_top, .ad-slot-sidebar_bottom { margin-top: 0; }
.col-12 > .ad-slot { margin: .25rem 0 .75rem; }
@media (max-width: 767.98px) { .ad-dev-desktop { display: none !important; } }
@media (min-width: 768px) { .ad-dev-mobile { display: none !important; } }
/* Vista previa para administradores (no son anuncios reales) */
.ad-slot-preview { min-height: 0; }
.ad-slot-preview .ad-preview { border: 2px dashed var(--ochre); background: rgba(var(--ochre-rgb), .1); color: var(--ink); border-radius: var(--r-card); padding: 1.1rem 1rem; font-size: .85rem; }
.ad-slot-preview .ad-preview small { color: var(--ink-soft); }

/* =====================================================================
   Estilos de presentacion de los articulos (post/styles/*.php)
   ===================================================================== */
.post-breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--link); text-decoration: underline; }
.post-breadcrumb { color: var(--ink-soft); }
.post-lead { color: var(--ink-soft); font-size: 1.15rem; line-height: 1.55; max-width: 62ch; }

/* --- Banner a todo el ancho --- */
.post-hero-banner { position: relative; display: flex; align-items: flex-end; min-height: clamp(300px, 46vw, 540px); background: var(--ink); color: #fff; overflow: hidden; }
.post-hero-banner .post-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-hero-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(var(--ink-rgb), .92) 0%, rgba(var(--ink-rgb), .55) 42%, rgba(var(--ink-rgb), .12) 100%); }
.post-hero-banner .post-hero-inner { position: relative; z-index: 1; padding-top: 5rem; padding-bottom: 2.25rem; }
.post-hero-banner h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; max-width: 900px; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.post-hero-banner .cat-tag { background: rgba(255, 255, 255, .2); color: #fff; }
.post-hero-banner .meta-strip, .post-hero-banner .meta-strip * { color: rgba(255, 255, 255, .88); }
.post-hero-banner .post-breadcrumb, .post-hero-banner .post-breadcrumb a { color: rgba(255, 255, 255, .85); }
.post-hero-banner .post-breadcrumb a:hover { color: #fff; }
/* Sin imagen: banner con el color principal del sitio */
.post-hero-solid { background: linear-gradient(135deg, var(--forest), var(--forest-dark)); color: var(--on-primary); min-height: clamp(220px, 28vw, 340px); }
.post-hero-solid::after { display: none; }
.post-hero-solid h1, .post-hero-solid .meta-strip, .post-hero-solid .meta-strip *, .post-hero-solid .post-breadcrumb, .post-hero-solid .post-breadcrumb a { color: var(--on-primary); text-shadow: none; }
.post-hero-solid .cat-tag { background: rgba(255, 255, 255, .2); color: var(--on-primary); }
.post-style-banner > .container { padding-top: 2.25rem !important; }

/* --- Centrado editorial --- */
.post-head-centered { text-align: center; max-width: 860px; margin: .5rem auto 1.75rem; }
.post-head-centered h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.12; }
.post-head-centered .post-lead { margin: .25rem auto 1rem; }
.post-head-centered .meta-strip { justify-content: center; }
.post-head-centered::after { content: ''; display: block; width: 3.2rem; height: 3px; background: var(--forest); margin: 1.5rem auto 0; }
.post-figure { max-width: 980px; margin: 0 auto 2.25rem; }
.post-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-img); display: block; }

/* --- Dos columnas --- */
.post-split { margin: .25rem 0 2.25rem; }
.post-split h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.12; }
.post-split .post-split-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); display: block; }

/* --- Solo texto --- */
.post-head-minimal h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.08; }

/* ---- Selector de idioma (navbar) ---- */
.lang-switch { display: flex; align-items: center; gap: .15rem; }
.lang-switch-item {
    padding: .15rem .5rem;
    border-radius: .35rem;
    font-family: var(--bs-font-monospace, monospace);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-decoration: none;
    color: var(--ink-soft);
}
a.lang-switch-item:hover { color: var(--ink); background: rgba(var(--ink-rgb), .07); }
.lang-switch-item.active { color: var(--ink); background: rgba(var(--ink-rgb), .1); }
@media (max-width: 991.98px) { .lang-switch { margin-top: .5rem; } }
