/* ==========================================================================
   RUSPOST — EDITORIAL (Blog)
   ========================================================================== */

:root {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --color-yellow-original: #fffb18;
    --color-yellow-200: oklch(94.5% 0.129 101.54);
    --color-gray-100: oklch(96.7% 0.003 264.542);

    --rp-accent: var(--color-yellow-200);
    --rp-bg: #0a0a0a;
    --rp-ink: var(--rp-bg);
    /* fallback para header */
    --rp-surface: #171717;
    --rp-border: #262626;
    --rp-text: #ffffff;
    --rp-muted: color-mix(in oklch, var(--color-gray-100) 65%, black);
}

/* =========================
   HERO (idéntico a Programas)
   Usa tu markup: .rp-prog-hero...
========================= */
.rp-prog-hero {
    position: relative;
    height: 60vh;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--rp-ink);
}

.rp-prog-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rp-prog-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .60;
    filter: grayscale(100%) contrast(1.25);
}

.rp-prog-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(10, 10, 10, .45), rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 1)),
        linear-gradient(to top, rgba(10, 10, 10, 1), rgba(10, 10, 10, .25), rgba(10, 10, 10, 0));
    z-index: 1;
}

.rp-prog-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 72px;
}

.rp-prog-hero-inner {
    max-width: 68ch;
}

.rp-prog-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--color-yellow-original);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .2em;
}

.rp-prog-title {
    margin: 0 0 18px 0;
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1;
    font-size: clamp(3rem, 6vw, 5.4rem);
    font-family: var(--font-sans);
    color: var(--rp-text);
}

.rp-prog-title .dot {
    color: var(--color-yellow-original);
}

.rp-prog-desc {
    margin: 10px 0 0 0;
    max-width: 62ch;
    color: rgba(255, 255, 255, .72);
    font-weight: 450;
    line-height: 1.6;
}

/* =========================================================
   RESTO DEL CSS: IGUAL QUE TENÍAS
   ======================================================= */

.rp-editorial-page {
    min-height: 100vh;
    background: #fff;
    color: #0a0a0a;
    font-family: var(--font-sans);
}

.rp-editorial-page .rp-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width:540px) {
    .rp-editorial-page .rp-container {
        padding: 0 18px;
    }
}

.rp-editorial-page svg.rp-ico {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.rp-editorial-hero {
    position: relative;
    padding: 72px 0 34px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.rp-editorial-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rp-editorial-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    opacity: .10;
}

.rp-editorial-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(0, 0, 0, .14), rgba(255, 255, 255, 0) 55%),
        linear-gradient(to bottom, rgba(255, 255, 255, .95), rgba(255, 255, 255, 1));
}

.rp-editorial-hero-inner {
    position: relative;
    z-index: 1;
}

.rp-editorial-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--rp-bg);
    color: var(--rp-accent);
    margin-bottom: 14px;
}

.rp-editorial-title {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.04em;
    font-size: clamp(2.6rem, 4.6vw, 4rem);
    line-height: 1.02;
}

.rp-editorial-subtitle {
    margin: 10px 0 0 0;
    max-width: 78ch;
    color: rgba(0, 0, 0, .58);
    font-weight: 450;
    line-height: 1.6;
}

.rp-editorial-body {
    padding: 34px 0 90px;
}

.rp-editorial-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

@media (min-width:1024px) {
    .rp-editorial-split {
        grid-template-columns: 460px 1fr;
        gap: 34px;
    }
}

/* LEFT PANEL */
.rp-article-shell {
    position: relative;
    overflow: hidden;
    background: var(--rp-bg);
    color: var(--rp-text);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .12);
}

@media (min-width:1024px) {
    .rp-article-shell {
        position: sticky;
        top: 92px;
    }
}

.rp-article-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(to right, transparent, color-mix(in oklch, var(--rp-accent) 70%, white), transparent);
    opacity: .6;
    pointer-events: none;
}

.rp-article-empty {
    padding: 26px 24px;
}

.rp-article-empty-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: 10px;
}

.rp-article-empty-title {
    font-weight: 900;
    font-size: 22px;
    letter-spacing: -.02em;
    margin: 0 0 10px 0;
    color: #fff;
}

.rp-article-empty-sub {
    margin: 0;
    color: rgba(255, 255, 255, .70);
    line-height: 1.6;
}

/* Article view */
.rp-article-view {
    padding: 26px 24px 22px;
}

.rp-article-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(10, 10, 10, .65);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 22px;
    line-height: 1;
    backdrop-filter: blur(8px);
    transition: background .15s ease, border-color .15s ease;
}

.rp-article-close:hover {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .24);
}

.rp-article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.rp-article-cat {
    color: var(--rp-accent);
    font-weight: 900;
}

.rp-article-dot {
    width: 4px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .28);
}

.rp-article-title {
    margin: 0 0 10px 0;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.12;
    font-size: 28px;
    color: #fff;
}

.rp-article-byline {
    color: rgba(255, 255, 255, .70);
    font-size: 13px;
    margin: 0 0 14px 0;
}

.rp-article-figure {
    margin: 0 0 16px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
}

.rp-article-figure img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    opacity: .92;
}

.rp-article-content {
    color: rgba(255, 255, 255, .82);
    line-height: 1.75;
    font-weight: 430;
    font-size: 15px;
}

.rp-article-content p:first-of-type::first-letter {
    font-size: 54px;
    font-weight: 900;
    line-height: 1;
    float: left;
    margin: 6px 10px 0 0;
    color: var(--rp-accent);
}

.rp-article-content h2,
.rp-article-content h3 {
    color: #fff;
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 22px 0 10px;
}

.rp-article-content a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: color-mix(in oklch, var(--rp-accent) 75%, white);
    text-underline-offset: 3px;
}

.rp-article-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .10);
}

.rp-article-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 11px;
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, .55);
    padding-bottom: 2px;
    text-decoration: none;
}

.rp-article-open:hover {
    color: var(--rp-accent);
    border-bottom-color: var(--rp-accent);
}

/* RIGHT PANEL */
.rp-editorial-right {
    min-width: 0;
}

.rp-editorial-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, .10);
    padding-bottom: 14px;
    margin-bottom: 26px;
    gap: 12px;
}

.rp-editorial-topbar-left {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .40);
}

.rp-editorial-topbar-right {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .35);
}

.rp-editorial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width:760px) {
    .rp-editorial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px;
    }
}

.rp-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.rp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .10);
    border-color: rgba(0, 0, 0, .18);
}

.rp-card-hit {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.rp-card.is-selected {
    opacity: .45;
    pointer-events: none;
    filter: grayscale(15%);
}

.rp-card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, .05);
}

.rp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    opacity: .95;
}

.rp-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 55%);
    opacity: .65;
    pointer-events: none;
}

.rp-card-cat {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(10, 10, 10, .92);
    color: var(--rp-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.rp-card-body {
    padding: 16px 16px 18px;
}

.rp-card-date {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .40);
    margin-bottom: 10px;
}

.rp-card-title {
    margin: 0 0 10px 0;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.18;
    font-size: 18px;
    color: #0a0a0a;
    transition: color .15s ease;
}

.rp-card:hover .rp-card-title {
    color: rgba(0, 0, 0, .78);
}

.rp-card-excerpt {
    margin: 0 0 14px 0;
    color: rgba(0, 0, 0, .58);
    line-height: 1.6;
    font-weight: 430;
}

.rp-card-more {
    display: inline-block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(0, 0, 0, .80);
    padding-bottom: 2px;
    transition: border-color .15s ease, color .15s ease;
}

.rp-card:hover .rp-card-more {
    color: #0a0a0a;
    border-bottom-color: var(--rp-accent);
}

.rp-editorial-more {
    display: flex;
    justify-content: center;
    padding-top: 32px;
}

.rp-editorial-load {
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(0, 0, 0, .85);
    color: #0a0a0a;
    padding-bottom: 2px;
    transition: border-color .15s ease, color .15s ease;
}

.rp-editorial-load:hover {
    border-bottom-color: var(--rp-accent);
    color: rgba(0, 0, 0, .78);
}

.rp-card-hit:focus-visible,
.rp-article-close:focus-visible,
.rp-editorial-load:focus-visible,
.rp-article-open:focus-visible {
    outline: 2px solid var(--rp-accent);
    outline-offset: 3px;
}

@media (max-width:1023px) {
    .rp-article-shell {
        box-shadow: none;
    }
}

/* FULL BLEED */
.rp-editorial-body .rp-container {
    max-width: none;
    padding: 0;
    margin: 0;
}

.rp-editorial-split {
    display: grid;
    grid-template-columns: minmax(360px, 38vw) 1fr;
    min-height: 100vh;
}

.rp-article-shell {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--rp-bg);
    border-right: 1px solid color-mix(in oklch, var(--color-gray-100) 18%, black);
}

.rp-article-view,
.rp-article-empty {
    height: 100%;
    overflow: auto;
    padding: 56px 52px;
}

.rp-editorial-right {
    min-height: 100vh;
    padding: 56px 64px;
}

@media (max-width: 1100px) {
    .rp-editorial-split {
        grid-template-columns: minmax(320px, 44vw) 1fr;
    }

    .rp-editorial-right {
        padding: 44px 40px;
    }

    .rp-article-view,
    .rp-article-empty {
        padding: 44px 36px;
    }
}

@media (max-width: 860px) {
    .rp-editorial-split {
        grid-template-columns: 1fr;
    }

    .rp-article-shell {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid color-mix(in oklch, var(--color-gray-100) 18%, black);
    }

    .rp-editorial-right {
        padding: 36px 18px;
    }

    .rp-article-view,
    .rp-article-empty {
        padding: 36px 18px;
    }
}

.rp-editorial-page.is-reading .rp-article-view {
    animation: rpSlideIn .35s ease both;
}

@keyframes rpSlideIn {
    from {
        transform: translateX(-18px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   SIDE HERO (panel izquierdo)
   ========================================================================== */
.rp-side-hero {
    position: relative;
    height: 100%;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.rp-side-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rp-side-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .60;
    filter: grayscale(100%) contrast(1.25);
}

.rp-side-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(10, 10, 10, .45), rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 1)),
        linear-gradient(to top, rgba(10, 10, 10, 1), rgba(10, 10, 10, .25), rgba(10, 10, 10, 0));
}

.rp-side-hero-inner {
    position: relative;
    z-index: 1;
    padding: 56px 52px;
    width: 100%;
    max-width: 520px;
}

@media (max-width: 1100px) {
    .rp-side-hero-inner {
        padding: 44px 36px;
    }
}

@media (max-width: 860px) {
    .rp-side-hero-inner {
        padding: 36px 18px;
        max-width: none;
    }
}

.rp-side-hero-inner .rp-editorial-title {
    color: #fff;
}

.rp-side-hero-inner .rp-editorial-subtitle {
    color: rgba(255, 255, 255, .70);
    max-width: 46ch;
}

.rp-side-hero-inner .rp-editorial-badge {
    background: rgba(10, 10, 10, .85);
    border: 1px solid rgba(255, 255, 255, .12);
}


/* =========================
   HERO TOP (full width)
========================= */
.rp-editorial-hero {
    position: relative;
    height: 60vh;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--rp-bg);
}

.rp-editorial-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.rp-editorial-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .60;
    filter: grayscale(100%) contrast(1.25);
}

.rp-editorial-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(10, 10, 10, .45), rgba(10, 10, 10, 0) 55%, rgba(10, 10, 10, 1)),
        linear-gradient(to top, rgba(10, 10, 10, 1), rgba(10, 10, 10, .25), rgba(10, 10, 10, 0));
}

.rp-editorial-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 72px;
}

.rp-editorial-hero .rp-editorial-title {
    color: #fff;
}

.rp-editorial-hero .rp-editorial-subtitle {
    color: rgba(255, 255, 255, .72);
    max-width: 62ch;
}

.rp-editorial-hero .rp-editorial-badge {
    background: rgba(10, 10, 10, .85);
    border: 1px solid rgba(255, 255, 255, .12);
}

.rp-editorial-body {
    padding: 0 0 90px;
}


.rp-editorial-right {
    padding: 44px 52px;
}

@media (max-width: 1100px) {
    .rp-editorial-right {
        padding: 40px 36px;
    }
}

@media (max-width: 860px) {
    .rp-editorial-right {
        padding: 36px 18px;
    }
}

.rp-editorial-grid {
    gap: 18px;
}

@media (min-width: 980px) {
    .rp-editorial-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
}

.rp-card-media {
    aspect-ratio: 4 / 3;
}

.rp-card-body {
    padding: 14px 14px 16px;
}

.rp-card-title {
    font-size: 16px;
    line-height: 1.2;
}

.rp-card-excerpt {
    font-size: 13px;
    margin-bottom: 12px;
}


.rp-blog-read .rp-container {
    max-width: 900px;
}

.rp-blog-back {
    display: inline-block;
    margin: 18px 0 22px;
    text-decoration: none;
    opacity: .8;
}

.rp-blog-back:hover {
    opacity: 1;
}

.rp-read-title {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.1;
    margin: 0 0 10px;
}

.rp-read-meta {
    opacity: .7;
    font-size: 13px;
    margin-bottom: 18px;
}

.rp-read-hero img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    display: block;
    margin: 10px 0 22px;
}

.rp-read-content {
    font-size: 16px;
    line-height: 1.75;
}

.rp-article-view::after,
.rp-article-empty::after {
    content: "";
    display: block;
    height: 140px;
}