/* RV Daily: articles */

/* Article header */
.rvd-post-hero {
    --rvd-hero-bg: #F4F3EF;
    --rvd-hero-ink: var(--theme-palette-color-4, #1D3B41);
}

.rvd-post-hero.wp-block-kadence-rowlayout,
.rvd-post-hero.kb-row-layout-wrap {
    background-color: var(--rvd-hero-bg);
}

.rvd-post-hero .kt-inside-inner-col {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.rvd-post-hero p {
    margin: 0;
}

.rvd-post-hero p:empty,
.rvd-post-hero-media p:empty {
    display: none;
}

.rvd-post-hero .rvd-crumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--rvd-muted);
}

.rvd-post-hero .rvd-crumbs a {
    color: rgba(29, 59, 65, 0.8);
    font-weight: 500;
    text-decoration: none;
}

.rvd-post-hero .rvd-crumbs a:hover,
.rvd-post-hero .rvd-crumbs a:focus-visible {
    color: var(--rvd-hero-ink);
    text-decoration: underline;
}

.rvd-post-hero .rvd-crumbs__sep {
    opacity: 0.6;
}

.rvd-post-hero .rvd-crumbs .rvd-post-kicker {
    display: inline-block;
    padding: 4px 10px;
    background: var(--theme-palette-color-1);
    color: var(--rvd-hero-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
    text-decoration: none;
}

.rvd-post-hero .rvd-crumbs .rvd-post-kicker:hover,
.rvd-post-hero .rvd-crumbs .rvd-post-kicker:focus-visible {
    background: var(--rvd-hero-ink);
    color: #fff;
    text-decoration: none;
}

.rvd-post-hero h1 {
    margin: 0;
    color: var(--rvd-hero-ink);
    font-size: clamp(28px, 1.2rem + 2.6vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.rvd-post-hero .rvd-standfirst {
    display: block;
    max-width: 65ch;
    margin: 16px auto 0;
    font-size: clamp(17px, 1rem + 0.35vw, 20px);
    line-height: 1.5;
    color: rgba(29, 59, 65, 0.8);
    text-wrap: pretty;
}

.rvd-post-hero .rvd-post-meta {
    justify-content: center;
    align-items: center;
    gap: 12px 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(29, 59, 65, 0.15);
    font-size: 14px;
    color: var(--rvd-muted);
}

.rvd-post-hero .rvd-post-meta .pp-multiple-authors-boxes-wrapper,
.rvd-post-hero .rvd-post-meta .pp-multiple-authors-boxes-ul,
.rvd-post-hero .rvd-post-meta .pp-multiple-authors-boxes-li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.rvd-post-hero .rvd-post-meta .custom-author-image,
.rvd-post-hero .rvd-post-meta .pp-author-boxes-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rvd-post-hero .rvd-post-meta .pp-author-boxes-name,
.rvd-post-hero .rvd-post-meta .pp-author-boxes-name a {
    color: var(--rvd-hero-ink) !important;
    font-weight: 700;
    text-decoration: none;
}

.rvd-post-hero .rvd-post-meta-line {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 4px;
}

.rvd-post-hero .rvd-post-meta-line > span + span::before {
    content: "·";
    margin: 0 8px;
    opacity: 0.6;
}

.rvd-post-hero .rvd-post-sponsor {
    width: fit-content;
    margin: 20px auto 0;
    padding: 8px 14px;
    border: 1px solid rgba(29, 59, 65, 0.12);
    border-radius: 4px;
    background: #fff;
}

.rvd-post-hero .rvd-post-sponsor .madv-cat-sponsor__label {
    color: var(--rvd-hero-ink);
}

.rvd-post-hero .rvd-post-sponsor a {
    display: inline-flex;
    line-height: 0;
}

.rvd-post-hero-media {
    position: relative;
    z-index: 1;
}

.rvd-post-hero-media .kt-inside-inner-col {
    max-width: 1100px;
    margin: 0 auto;
}

.rvd-post-hero-media .rvd-post-image {
    position: relative;
    display: block;
    width: 100% !important;
    max-width: 1100px !important;
    height: auto !important;
    aspect-ratio: 2 / 1;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 6px;
    background: #e9e7e1;
    box-shadow: 0 24px 48px -24px rgba(16, 24, 40, 0.45);
}

.rvd-post-hero-media .rvd-post-image a,
.rvd-post-hero-media .rvd-post-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.rvd-post-hero-media .rvd-post-image img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
}

.rvd-post-hero-media .rvd-post-caption {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--rvd-muted);
    text-align: center;
}

.rvd-post-billboard .madv-ad {
    margin: 2rem auto 1rem;
}

@media (max-width: 767px) {
    .rvd-post-hero .rvd-crumbs {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .rvd-post-hero .rvd-post-meta {
        gap: 10px 16px;
        margin-top: 20px;
        padding-top: 16px;
        font-size: 13px;
    }

    .rvd-post-hero .rvd-post-sponsor {
        margin-top: 16px;
    }

    .rvd-post-hero-media .rvd-post-image {
        border-radius: 4px;
    }

    .rvd-post-billboard .madv-ad {
        margin: 1.75rem auto 0.5rem;
    }
}

/* Related articles */
.rvd-readnext {
    margin: 1.25rem 0 2.5rem;
}

.rvd-readnext__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.rvd-readnext__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--theme-palette-color-4);
    text-decoration: none;
}

.rvd-readnext__media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 6px;
    background: #e9e7e1;
    box-shadow: 0 12px 24px -16px rgba(16, 24, 40, 0.45);
}

.rvd-readnext__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rvd-readnext__pill {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1;
    display: inline-block;
    max-width: calc(100% - 20px);
    padding: 3px 8px;
    background: var(--theme-palette-color-1);
    color: var(--theme-palette-color-4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rvd-readnext__title {
    display: block;
    color: var(--theme-palette-color-4);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.2s ease;
}

.rvd-readnext__card:hover .rvd-readnext__title {
    text-decoration-color: var(--theme-palette-color-1);
}

.rvd-readnext__card:hover .rvd-readnext__media img {
    transform: scale(1.05);
}

.rvd-readnext__card:focus-visible {
    outline: 2px solid var(--theme-palette-color-4);
    outline-offset: 4px;
    border-radius: 6px;
}

.rvd-readnext__list {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.rvd-readnext__list li {
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid rgba(29, 59, 65, 0.1);
}

.rvd-readnext__link {
    color: var(--theme-palette-color-4);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--theme-palette-color-1);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.rvd-readnext__link::before {
    content: "\2192\00a0";
    color: var(--theme-palette-color-1);
    text-decoration: none;
    display: inline-block;
}

@media (max-width: 767px) {
    .rvd-readnext__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rvd-readnext__card {
        display: grid;
        grid-template-columns: 112px 1fr;
        align-items: center;
        gap: 14px;
        padding: 14px 0;
        border-top: 1px solid rgba(29, 59, 65, 0.1);
    }

    .rvd-readnext__card:first-child {
        border-top: 0;
        padding-top: 0;
    }

    .rvd-readnext__media {
        aspect-ratio: 4 / 3;
        border-radius: 4px;
        box-shadow: none;
    }

    .rvd-readnext__pill {
        display: none;
    }

    .rvd-readnext__title {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rvd-readnext__media img {
        transition: none;
    }
}

/* Tables */
body.single-post article.type-post > .entry-content .wp-block-table {
    margin: 2rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(29, 59, 65, 0.12);
    border-radius: 6px;
    background: #fff;
}

body.single-post article.type-post > .entry-content .wp-block-table table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--theme-palette-color-4);
}

body.single-post article.type-post > .entry-content .wp-block-table th,
body.single-post article.type-post > .entry-content .wp-block-table td {
    border: 0;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

body.single-post article.type-post > .entry-content .wp-block-table thead th,
body.single-post article.type-post > .entry-content .wp-block-table table:not(:has(thead)) tr:first-child th {
    background: var(--theme-palette-color-4);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 3px solid var(--theme-palette-color-1);
}

body.single-post article.type-post > .entry-content .wp-block-table tbody td {
    border-top: 1px solid rgba(29, 59, 65, 0.08);
}

body.single-post article.type-post > .entry-content .wp-block-table tbody tr:first-child td {
    border-top: 0;
}

body.single-post article.type-post > .entry-content .wp-block-table tbody tr,
body.single-post article.type-post > .entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background: transparent;
}

body.single-post article.type-post > .entry-content .wp-block-table tbody tr:nth-child(even) td {
    background: #F4F3EF;
}

body.single-post article.type-post > .entry-content .wp-block-table tbody td:first-child {
    font-weight: 700;
    white-space: nowrap;
}

body.single-post article.type-post > .entry-content .wp-block-table figcaption,
body.single-post article.type-post > .entry-content .wp-block-table .wp-element-caption {
    margin: 0;
    padding: 10px 16px;
    border-top: 1px solid rgba(29, 59, 65, 0.08);
    font-size: 13px;
    color: var(--rvd-muted);
    text-align: left;
}

@media (max-width: 767px) {
    body.single-post article.type-post > .entry-content .wp-block-table table {
        font-size: 14px;
    }

    body.single-post article.type-post > .entry-content .wp-block-table th,
    body.single-post article.type-post > .entry-content .wp-block-table td {
        padding: 10px 12px;
    }

    body.single-post article.type-post > .entry-content .wp-block-table tbody td:first-child {
        white-space: normal;
        min-width: 90px;
    }
}

/* Media */
body.single-post article.type-post > .entry-content .wp-block-image:not(.is-style-rounded) img,
body.single-post article.type-post > .entry-content .wp-block-gallery .wp-block-image:not(.is-style-rounded) img,
body.single-post article.type-post > .entry-content .wp-block-media-text__media img,
body.single-post article.type-post > .entry-content .wp-block-kadence-image:not(.is-style-rounded) img {
    border-radius: 6px;
}

body.single-post article.type-post > .entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper,
body.single-post article.type-post > .entry-content .wp-block-video video {
    overflow: hidden;
    border-radius: 6px;
}

@media (max-width: 767px) {
    body.single-post article.type-post > .entry-content .wp-block-image:not(.is-style-rounded) img,
    body.single-post article.type-post > .entry-content .wp-block-gallery .wp-block-image:not(.is-style-rounded) img,
    body.single-post article.type-post > .entry-content .wp-block-media-text__media img,
    body.single-post article.type-post > .entry-content .wp-block-kadence-image:not(.is-style-rounded) img,
    body.single-post article.type-post > .entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper,
    body.single-post article.type-post > .entry-content .wp-block-video video {
        border-radius: 4px;
    }
}

body.single-post article.type-post > .entry-content > .wp-block-image.size-thumbnail img { max-width: 150px; height: auto; }
body.single-post article.type-post > .entry-content > .wp-block-image.size-medium img { max-width: 300px; height: auto; }

/* Author */
body.single-post p:has(> .rvd-authors) { margin: 40px 0 0; }

body.single-post .rvd-authors {
    display: block;
    border-top: 1px solid rgba(29, 59, 65, 0.15);
    border-bottom: 1px solid rgba(29, 59, 65, 0.15);
}

body.single-post .rvd-author {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 0;
}

body.single-post .rvd-author + .rvd-author { border-top: 1px solid rgba(29, 59, 65, 0.1); }

body.single-post .rvd-author__photo { flex: 0 0 72px; display: block; line-height: 0; }

body.single-post .rvd-author__img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--theme-palette-color-1, #DEAC65);
}

body.single-post .rvd-author__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid var(--theme-palette-color-1, #DEAC65);
    background: var(--theme-palette-color-4, #1D3B41);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    box-sizing: border-box;
}

body.single-post .rvd-author__body { display: block; flex: 1 1 auto; min-width: 0; text-align: left; }

body.single-post .rvd-author__label {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rvd-muted);
}

body.single-post .rvd-author__name {
    display: block;
    width: fit-content;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--theme-palette-color-4, #1D3B41);
    text-decoration: none;
}

body.single-post .rvd-author__bio {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--rvd-muted);
}

body.single-post .rvd-author__more {
    display: block;
    width: fit-content;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-palette-color-4, #1D3B41);
    text-decoration: underline;
    text-decoration-color: var(--theme-palette-color-1, #DEAC65);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

body.single-post .rvd-author__name:hover,
body.single-post .rvd-author__more:hover { color: var(--theme-palette-color-1, #DEAC65); }
body.single-post .rvd-author__name:focus-visible,
body.single-post .rvd-author__more:focus-visible { outline: 2px solid var(--theme-palette-color-1, #DEAC65); outline-offset: 2px; }

@media (max-width: 767px) {
    body.single-post .rvd-author { gap: 14px; padding: 18px 0; }
    body.single-post .rvd-author__photo { flex-basis: 56px; }
    body.single-post .rvd-author__img,
    body.single-post .rvd-author__initials { width: 56px; height: 56px; }
    body.single-post .rvd-author__initials { font-size: 19px; }
    body.single-post .rvd-author__name { font-size: 17px; }
}

/* Follow card */
body.single-post .rvd-pref-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 32px 0 40px;
    padding: 20px 24px;
    background: #F4F3EF;
    border-left: 4px solid var(--theme-palette-color-4, #1D3B41);
    border-radius: 6px;
    text-align: left;
}

body.single-post .rvd-pref-source__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--theme-palette-color-4, #1D3B41);
}

body.single-post .rvd-pref-source__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--rvd-muted);
}

body.single-post .rvd-pref-source__btn { flex: 0 0 auto; min-width: 220px; min-height: 48px; }

@media (max-width: 767px) {
    body.single-post .rvd-pref-source { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
    body.single-post .rvd-pref-source__btn { min-width: 0; }
}
