/**
 * Blog ICASA — listado y detalle de artículo
 * Paleta: verde ICASA #006837 / oscuro #042818 / ink #0f2d4a
 */

/* ─── Tokens ─────────────────────────────────────────────────── */
.blog-page {
    --b-green:        #006837;
    --b-green-mid:    #0a4d2e;
    --b-green-dark:   #042818;
    --b-green-soft:   #e8f4ee;
    --b-green-line:   rgba(0,104,55,.14);
    --b-ink:          #0f2d4a;
    --b-muted:        #5c6b7a;
    --b-surface:      #f6faf8;
    --b-card:         #ffffff;
    --b-radius:       1.1rem;
    --b-shadow:       0 6px 24px rgba(15,45,74,.07), 0 1px 4px rgba(15,45,74,.04);
    --b-shadow-hover: 0 14px 40px rgba(0,104,55,.13), 0 2px 8px rgba(0,104,55,.06);
    font-family: "Inter", system-ui, sans-serif;
    color: var(--b-ink);
    background: var(--b-surface);
}

/* Hero portada — mismas medidas que /contacto/ (contacto-page.css + empleo-page desktop) */
.page-blog {
    --empleo-hero-h: clamp(16rem, 42vw, 22rem);
}

.page-blog .blog-hero-banner {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 16px 44px rgba(15, 23, 42, 0.1);
}

.page-blog .blog-hero-banner .empleo-hero-slide {
    width: 100%;
    height: var(--empleo-hero-h);
    min-height: var(--empleo-hero-h);
}

@media (min-width: 769px) {
    .page-blog .blog-hero-banner .empleo-hero-slide {
        min-height: 0;
        height: auto;
    }
}

.page-blog .blog-hero-banner .empleo-hero-slide__caption {
    padding: 1rem 1.15rem 1.15rem;
    padding-right: 1.15rem;
}

@media (min-width: 576px) {
    .page-blog .blog-hero-banner .empleo-hero-slide__caption {
        padding: 1.15rem 1.35rem 1.35rem;
        max-width: 85%;
    }
}

.page-blog #blog-contenido {
    scroll-margin-top: var(--nav-bar-stack, 5.75rem);
}

/* ─── Filtros / categorías ────────────────────────────────────── */
.blog-filters {
    padding: 1.25rem 0;
    background: #fff;
    border-bottom: 1px solid var(--b-green-line);
    position: sticky;
    top: 65px;   /* altura aprox navbar sticky */
    z-index: 50;
}

.blog-filters__inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.blog-filters__inner::-webkit-scrollbar { display: none; }

.blog-filter-btn {
    flex-shrink: 0;
    font-size: .8rem;
    font-weight: 600;
    border: 1.5px solid var(--b-green-line);
    background: transparent;
    color: var(--b-muted);
    padding: .38rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
}

.blog-filter-btn:hover {
    border-color: var(--b-green);
    color: var(--b-green);
    background: var(--b-green-soft);
}

.blog-filter-btn.is-active {
    background: var(--b-green);
    border-color: var(--b-green);
    color: #fff;
}

/* ─── Sección listado ─────────────────────────────────────────── */
.blog-list-section {
    padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5.5rem);
}

/* ─── Card destacada (primer artículo destacado) ──────────────── */
.blog-featured {
    margin-bottom: clamp(2rem, 5vw, 3rem);
}

.blog-featured__card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--b-card);
    border-radius: calc(var(--b-radius) * 1.35);
    overflow: hidden;
    border: 1px solid var(--b-green-line);
    box-shadow: var(--b-shadow);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .22s ease, transform .22s ease;
}

.blog-featured__card:hover {
    box-shadow: var(--b-shadow-hover);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.blog-featured__media {
    position: relative;
    aspect-ratio: 16 / 8;
    overflow: hidden;
    background: var(--b-green-soft);
}

.blog-featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.blog-featured__card:hover .blog-featured__media img {
    transform: scale(1.03);
}

.blog-featured__media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(0,104,55,.25);
    background: linear-gradient(135deg, var(--b-green-soft) 0%, #d4ead9 100%);
}

.blog-featured__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--b-green);
    color: #fff;
    padding: .3rem .7rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.blog-featured__body {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured__meta {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.blog-featured__cat {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--b-green);
    background: var(--b-green-soft);
    padding: .22rem .65rem;
    border-radius: 999px;
}

.blog-featured__date {
    font-size: .78rem;
    color: var(--b-muted);
    font-weight: 500;
}

.blog-featured__title {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    line-height: 1.22;
    letter-spacing: -.015em;
    margin: 0 0 .9rem;
    color: var(--b-ink);
}

.blog-featured__excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--b-muted);
    margin: 0 0 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured__cta {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--b-green);
    margin-top: auto;
}

.blog-featured__cta i {
    transition: transform .18s ease;
}

.blog-featured__card:hover .blog-featured__cta i {
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .blog-featured__card {
        grid-template-columns: 1fr 1fr;
    }
    .blog-featured__media {
        aspect-ratio: auto;
        min-height: 22rem;
    }
}

/* ─── Grid de tarjetas normales ───────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
    .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
}

.blog-card {
    background: var(--b-card);
    border-radius: var(--b-radius);
    border: 1px solid var(--b-green-line);
    box-shadow: var(--b-shadow);
    overflow: hidden;
    height: 100%;
    transition: transform .22s ease, box-shadow .22s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--b-shadow-hover);
}

.blog-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--b-green-soft);
}

.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.blog-card:hover .blog-card__media img {
    transform: scale(1.05);
}

.blog-card__media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: rgba(0,104,55,.3);
    background: linear-gradient(135deg, var(--b-green-soft) 0%, #d4ead9 100%);
}

.blog-card__cat {
    position: absolute;
    bottom: .65rem;
    left: .65rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    background: rgba(4,40,24,.82);
    color: #fff;
    padding: .22rem .6rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.blog-card__body {
    padding: 1.1rem 1.2rem 1.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__date {
    font-size: .75rem;
    font-weight: 600;
    color: var(--b-green);
    letter-spacing: .05em;
    margin-bottom: .45rem;
}

.blog-card__title {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--b-ink);
    margin: 0 0 .55rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: .93rem;
    line-height: 1.6;
    color: var(--b-muted);
    margin: 0 0 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
}

.blog-card__reading {
    font-size: .75rem;
    color: var(--b-muted);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.blog-card__cta {
    font-size: .82rem;
    font-weight: 700;
    color: var(--b-green);
    display: flex;
    align-items: center;
    gap: .25rem;
    transition: gap .18s ease;
}

.blog-card:hover .blog-card__cta {
    gap: .45rem;
}

/* ─── Estado vacío ────────────────────────────────────────────── */
.blog-empty {
    text-align: center;
    padding: clamp(3rem, 8vw, 5rem) 1rem;
    background: #fff;
    border-radius: calc(var(--b-radius) * 1.2);
    border: 1.5px dashed var(--b-green-line);
}

.blog-empty__icon {
    font-size: 3rem;
    color: var(--b-green);
    opacity: .4;
    margin-bottom: 1rem;
}

.blog-empty__title {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--b-ink);
    margin-bottom: .5rem;
}

.blog-empty__text {
    color: var(--b-muted);
    max-width: 30rem;
    margin: 0 auto 1.5rem;
    line-height: 1.65;
}

/* ─── Detalle de artículo ─────────────────────────────────────── */
.blog-article-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(2.5rem, 6vw, 3.5rem);
    background: linear-gradient(148deg, var(--b-green-dark) 0%, var(--b-green-mid) 50%, var(--b-green) 100%);
    color: #fff;
}

.blog-article-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.blog-article-hero--has-bg {
    background: #071a10;
    min-height: clamp(18rem, 48vw, 26rem);
    display: flex;
    align-items: flex-end;
}

.blog-article-hero--has-bg .blog-article-hero__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .38;
}

.blog-article-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(4,40,24,.94) 0%, rgba(4,40,24,.4) 55%, rgba(4,40,24,.18) 100%);
    z-index: 1;
}

.blog-article-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 52rem;
    width: 100%;
}

.blog-article-hero__back {
    margin-bottom: 1.25rem;
}

.blog-article-hero__back a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .87rem;
    font-weight: 600;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    transition: color .15s ease;
}

.blog-article-hero__back a:hover { color: #fff; }

.blog-article-hero__meta {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.blog-article-hero__cat {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--b-green);
    color: #fff;
    padding: .25rem .7rem;
    border-radius: 999px;
}

.blog-article-hero__date {
    font-size: .8rem;
    color: rgba(255,255,255,.78);
    font-weight: 500;
}

.blog-article-hero__reading {
    font-size: .8rem;
    color: rgba(255,255,255,.68);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.blog-article-hero__title {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1.75rem, 4.5vw, 2.65rem);
    line-height: 1.18;
    letter-spacing: -.025em;
    margin: 0 0 .85rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.22);
}

.blog-article-hero__byline {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: .9rem;
}

.blog-article-hero__author-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--b-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ─── Layout de 3 columnas: TOC | Artículo | Sidebar ─────────── */
.blog-tri-col-container {
    padding-top: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: clamp(3.5rem, 8vw, 6rem);
    max-width: min(100% - 2rem, 1360px);
}

.blog-tri-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch; /* columnas laterales = misma altura que el artículo */
}

/* Tablet: artículo + sidebar derecho */
@media (min-width: 900px) {
    .blog-tri-col {
        grid-template-columns: minmax(0, 1fr) 18.5rem;
        grid-template-areas: "center right";
    }
    .blog-tri-col__left   { display: none; }
    .blog-tri-col__center { grid-area: center; }
    .blog-tri-col__right  { grid-area: right; }
}

/* Desktop: 3 columnas completas */
@media (min-width: 1200px) {
    .blog-tri-col {
        grid-template-columns: 240px minmax(0, 1fr) 280px;
        grid-template-areas: "left center right";
        gap: clamp(1.5rem, 2.4vw, 2.25rem);
    }
    .blog-tri-col__left   { grid-area: left;  display: block; }
    .blog-tri-col__center { grid-area: center; }
    .blog-tri-col__right  { grid-area: right; }
}

@media (min-width: 1500px) {
    .blog-tri-col-container {
        max-width: min(100% - 3rem, 1440px);
    }

    .blog-tri-col {
        grid-template-columns: 260px minmax(0, 1fr) 310px;
        gap: 2.5rem;
    }
}

/*
 * Columnas laterales: altura = artículo (grid stretch).
 * Sticky nativo: acompaña la lectura y se detiene antes del footer.
 */
.blog-tri-col__left,
.blog-tri-col__right {
    align-self: stretch;
    position: relative;
    min-height: 100%;
}

.blog-tri-col__sticky-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 0.5rem;
    width: 100%;
}

@media (min-width: 1200px) {
    /*
     * Los paneles laterales quedan controlados por JS:
     * fixed durante el artículo, absolute al final.
     */
    .blog-tri-col__sticky-wrap {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 104, 55, 0.35) transparent;
    }

    .blog-tri-col__sticky-wrap.is-panel-fixed {
        position: fixed;
        top: 100px;
        z-index: 8;
    }

    .blog-tri-col__sticky-wrap.is-panel-at-end {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }

    .blog-toc {
        max-height: none;
        overflow: visible;
    }

    .blog-tri-col__sticky-wrap::-webkit-scrollbar {
        width: 4px;
    }

    .blog-tri-col__sticky-wrap::-webkit-scrollbar-thumb {
        background: rgba(0, 104, 55, 0.35);
        border-radius: 4px;
    }
}

/* ── Redes sociales ──────────────────────────────────────────── */
.blog-social-panel {
    background: var(--blog-surface, #fff);
    border: 1px solid var(--b-green-line);
    border-radius: 14px;
    padding: 1rem 1.15rem;
}
.blog-social-panel__label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--b-muted);
    margin-bottom: .6rem;
}
.blog-social-panel__btns {
    display: flex;
    flex-direction: row;        /* ← HORIZONTAL */
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    justify-content: flex-start;
}

.blog-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    font-size: .95rem;
    flex-shrink: 0;
}
.blog-social-btn:hover {
    transform: scale(1.14);
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
    color: #fff;
    opacity: .9;
}
.blog-social-btn--linkedin  { background: #0a66c2; }
.blog-social-btn--facebook  { background: #1877f2; }
.blog-social-btn--twitter   { background: #000; }
.blog-social-btn--whatsapp  { background: #25d366; }
.blog-social-btn--email     { background: #475569; }

/* ── Tabla de contenido ──────────────────────────────────────── */
.blog-toc {
    background: var(--blog-surface, #fff);
    border: 1px solid var(--b-green-line);
    border-radius: 14px;
    padding: 1.1rem 1.2rem 1.2rem;
}
.blog-toc__title {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--b-muted);
    margin-bottom: .85rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--b-green-line);
    display: flex;
    align-items: center;
}
.blog-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: .1rem;
}
.blog-toc__item {
    counter-increment: toc-counter;
}
.blog-toc__item--sub .blog-toc__link {
    padding-left: 1.1rem;
    font-size: .78rem;
    font-weight: 500;
}
.blog-toc__link {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--b-ink);
    text-decoration: none;
    padding: .35rem .5rem;
    border-radius: 7px;
    line-height: 1.4;
    transition: background .12s, color .12s, border-color .12s;
    border-left: 2px solid transparent;
}
.blog-toc__link:hover {
    color: var(--b-green);
    background: rgba(0, 104, 55, .035);
}
.blog-toc__link.is-active {
    color: var(--b-green);
    background: rgba(0, 104, 55, .09);
    border-left-color: var(--b-green);
    font-weight: 700;
}

/* Mensaje sidebar vacío */
.blog-sidebar__empty-msg {
    font-size: .88rem;
    color: var(--b-muted);
    font-style: italic;
    margin: 0;
}

/* Contenido principal */
.blog-article__body-wrap {}

.blog-article__lead {
    font-size: 1.18rem;
    line-height: 1.78;
    color: var(--b-muted);
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--b-green-line);
}

.blog-article__body {
    font-size: 1.05rem;
    line-height: 1.88;
    color: var(--b-ink);
}

.blog-article__body > * + * { margin-top: 1.15rem; }

.blog-article__body h2 {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    color: var(--b-ink);
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    padding-left: .85rem;
    border-left: 3.5px solid var(--b-green);
}

.blog-article__body h3 {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--b-ink);
    margin-top: 2rem;
    margin-bottom: .6rem;
}

.blog-article__body h4 {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--b-green-mid);
    margin-top: 1.5rem;
    margin-bottom: .5rem;
}

.blog-article__body p { margin-bottom: 1.15rem; }

.blog-article__body ul,
.blog-article__body ol {
    padding-left: 1.4rem;
    margin-bottom: 1.15rem;
}

.blog-article__body li { margin-bottom: .4rem; }

.blog-article__body a {
    color: var(--b-green);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .15em;
}

.blog-article__body a:hover { color: var(--b-green-mid); }

.blog-article__body strong { color: var(--b-ink); font-weight: 700; }

.blog-article__body blockquote {
    margin: 1.75rem 0;
    padding: 1.1rem 1.4rem;
    background: var(--b-green-soft);
    border-left: 4px solid var(--b-green);
    border-radius: 0 .65rem .65rem 0;
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--b-green-mid);
}

.blog-article__body blockquote p { margin-bottom: 0; }

.blog-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: .85rem;
    margin: 1.25rem 0;
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    display: block;
}

.blog-article__body pre,
.blog-article__body code {
    font-family: "Fira Code", "Consolas", monospace;
    font-size: .9rem;
}

.blog-article__body pre {
    background: #0f2d4a;
    color: #e2f4ec;
    padding: 1.1rem 1.3rem;
    border-radius: .65rem;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.blog-article__body code {
    background: var(--b-green-soft);
    color: var(--b-green-mid);
    padding: .1em .35em;
    border-radius: .3em;
}

.blog-article__body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-article__body hr {
    border: none;
    border-top: 1.5px solid var(--b-green-line);
    margin: 2rem 0;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-sidebar__block {
    background: #fff;
    border-radius: var(--b-radius);
    border: 1px solid var(--b-green-line);
    padding: 1.5rem 1.4rem;
}

.blog-sidebar__block-title {
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--b-green);
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 1.5px solid var(--b-green-line);
}

/* Mini tarjeta de artículo en sidebar */
.blog-related-item {
    display: flex;
    gap: .9rem;
    padding: .75rem 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--b-green-line);
    transition: opacity .15s;
}

.blog-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.blog-related-item:hover { opacity: .8; }

.blog-related-item__thumb {
    width: 4rem;
    height: 4rem;
    border-radius: .45rem;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--b-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0,104,55,.35);
    font-size: 1.1rem;
}

.blog-related-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .45rem;
    display: block;
}

.blog-related-item__body { flex: 1; min-width: 0; }

.blog-related-item__title {
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--b-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .2rem;
}

.blog-related-item__date {
    font-size: .72rem;
    color: var(--b-muted);
}

/* Categorías en sidebar */
.blog-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.blog-cat-list__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .88rem;
    font-weight: 600;
    color: var(--b-ink);
    text-decoration: none;
    padding: .42rem .6rem;
    border-radius: .45rem;
    transition: background .15s, color .15s;
}

.blog-cat-list__item a:hover {
    background: var(--b-green-soft);
    color: var(--b-green);
}

.blog-cat-list__item a span {
    font-size: .72rem;
    font-weight: 700;
    color: var(--b-green);
    background: var(--b-green-soft);
    padding: .12rem .45rem;
    border-radius: 999px;
}

/* Bloque CTA sidebar */
.blog-sidebar__cta {
    background: linear-gradient(148deg, var(--b-green-dark) 0%, var(--b-green) 100%);
    border-color: transparent;
    color: #fff;
}

.blog-sidebar__cta .blog-sidebar__block-title { color: rgba(255,255,255,.78); border-color: rgba(255,255,255,.2); }

.blog-sidebar__cta p {
    font-size: .9rem;
    line-height: 1.65;
    color: rgba(255,255,255,.88);
    margin-bottom: 1rem;
}

.blog-sidebar__cta .btn {
    background: #fff;
    color: var(--b-green);
    font-weight: 700;
    font-size: .88rem;
    border: none;
    border-radius: 999px;
    padding: .5rem 1.25rem;
    width: 100%;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: opacity .15s;
}

.blog-sidebar__cta .btn:hover { opacity: .9; }

/* ─── Barra de navegación entre artículos ─────────────────────── */
.blog-article__nav {
    border-top: 1px solid var(--b-green-line);
    padding-top: 2rem;
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.blog-article__nav-link {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--b-green-line);
    border-radius: .75rem;
    padding: .9rem 1rem;
    transition: border-color .18s, box-shadow .18s;
}

.blog-article__nav-link:hover {
    border-color: var(--b-green);
    box-shadow: 0 4px 16px rgba(0,104,55,.1);
    color: inherit;
    text-decoration: none;
}

.blog-article__nav-link--prev { text-align: left; }
.blog-article__nav-link--next { text-align: right; }

.blog-article__nav-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--b-green);
}

.blog-article__nav-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--b-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Staff preview banner ────────────────────────────────────── */
.blog-staff-banner {
    background: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: .65rem 0;
    font-size: .88rem;
    font-weight: 600;
    color: #664d03;
    text-align: center;
}

.blog-staff-banner i { margin-right: .35rem; }

/* ─── Dark mode ───────────────────────────────────────────────── */
html[data-theme="dark"] .blog-page {
    --b-surface: #0c1014;
    --b-card:    #131c22;
    --b-ink:     #e8edf2;
    --b-muted:   #8fa3b1;
    --b-green-soft: rgba(0,104,55,.18);
    --b-green-line: rgba(0,104,55,.22);
    --b-shadow: 0 6px 24px rgba(0,0,0,.22);
    --b-shadow-hover: 0 14px 40px rgba(0,104,55,.18);
}

html[data-theme="dark"] .blog-filters {
    background: #131c22;
    border-bottom-color: rgba(0,104,55,.22);
}

html[data-theme="dark"] .blog-sidebar__block,
html[data-theme="dark"] .blog-article__nav-link,
html[data-theme="dark"] .blog-social-panel,
html[data-theme="dark"] .blog-toc {
    background: #131c22;
    border-color: rgba(0,104,55,.22);
}

html[data-theme="dark"] .blog-toc__link {
    color: #cbd5e1;
}
html[data-theme="dark"] .blog-toc__link:hover,
html[data-theme="dark"] .blog-toc__link.is-active {
    color: #4ade80;
    background: rgba(0,104,55,.15);
}
html[data-theme="dark"] .blog-toc__link.is-active {
    border-left-color: #4ade80;
}

/* ── Galería final del artículo ──────────────────────────────────────── */
.blog-article__galeria-final {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(0, 104, 55, 0.12);
}
.blog-article__galeria-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blog-ink);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}
.blog-article__galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.blog-article__galeria-item {
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--blog-surface);
    border: 1px solid rgba(0, 104, 55, 0.12);
    transition: box-shadow 0.2s, transform 0.2s;
}
.blog-article__galeria-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 104, 55, 0.15);
}
.blog-article__galeria-link {
    display: block;
}
.blog-article__galeria-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.blog-article__galeria-item:hover .blog-article__galeria-img {
    transform: scale(1.04);
}
.blog-article__galeria-caption {
    font-size: 0.78rem;
    color: #64748b;
    padding: 0.5rem 0.75rem;
    line-height: 1.4;
    font-style: italic;
    border-top: 1px solid rgba(0,0,0,.06);
}

/* ── Secciones del artículo con fotos inline ─────────────────────────── */
.blog-article__seccion {
    margin-bottom: 0;
}

/*
 * Bloque de fotos inline: aparece DEBAJO del texto de la sección,
 * centrado, con cards grandes y elegantes.
 */
.blog-article__fotos-inline-wrap {
    margin: 2rem 0 2.5rem;
    display: grid;
    gap: 1.25rem;
    /* 1 foto → 1 columna centrada;  2+ fotos → 2 columnas */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
}

/* Card de cada foto */
.blog-article__foto-inline {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--blog-surface);
    border: 1px solid rgba(0, 104, 55, 0.12);
    box-shadow:
        0 2px 6px rgba(0,0,0,.06),
        0 10px 32px rgba(0, 104, 55, 0.10);
    transition: box-shadow 0.25s, transform 0.25s;
    position: relative;
}
.blog-article__foto-inline:hover {
    box-shadow:
        0 4px 12px rgba(0,0,0,.08),
        0 18px 48px rgba(0, 104, 55, 0.18);
    transform: translateY(-3px);
}

/* Enlace que envuelve la imagen */
.blog-article__foto-inline > a,
.blog-article__foto-inline > a:focus {
    display: block;
    outline: none;
}

/* Imagen principal */
.blog-article__foto-inline img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.blog-article__foto-inline:hover img {
    transform: scale(1.04);
}

/* Overlay sutil al hacer hover */
.blog-article__foto-inline > a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 60%,
        rgba(0, 104, 55, 0.06) 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    border-radius: 14px 14px 0 0;
}
.blog-article__foto-inline:hover > a::after {
    opacity: 1;
}

/* Pie de foto */
.blog-article__foto-inline figcaption {
    font-size: 0.82rem;
    color: #64748b;
    padding: 0.65rem 1rem;
    font-style: italic;
    line-height: 1.5;
    border-top: 1px solid rgba(0, 104, 55, 0.08);
    background: linear-gradient(to bottom, rgba(0,104,55,.02), transparent);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.blog-article__foto-inline figcaption::before {
    content: "📷";
    font-size: 0.85em;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Cuando hay 1 sola foto → centrar y limitar ancho */
.blog-article__fotos-inline-wrap:has(> :only-child) {
    grid-template-columns: minmax(0, 680px);
    justify-content: center;
}

/* Móvil */
@media (max-width: 639px) {
    .blog-article__fotos-inline-wrap {
        grid-template-columns: 1fr;
        margin: 1.5rem 0 2rem;
    }
}

/* ── Dark mode galería ───────────────────────────────────────────────── */
html[data-theme="dark"] .blog-article__galeria-final {
    border-top-color: rgba(0,104,55,.22);
}
html[data-theme="dark"] .blog-article__galeria-item,
html[data-theme="dark"] .blog-article__foto-inline {
    background: #131c22;
    border-color: rgba(0,104,55,.22);
    box-shadow: 0 4px 18px rgba(0,0,0,.45), 0 12px 36px rgba(0,104,55,.12);
}
html[data-theme="dark"] .blog-article__galeria-caption,
html[data-theme="dark"] .blog-article__foto-inline figcaption {
    color: #94a3b8;
    border-top-color: rgba(255,255,255,.06);
    background: linear-gradient(to bottom, rgba(0,104,55,.04), transparent);
}
