/*
 * Baztab newsroom v2.2 — balanced editorial surface system
 * White base, subtle structural borders/shadows, full-bleed media backgrounds,
 * robust comment X image, and preserved RSS visual composition.
 */

:root {
    --nr2-page: #ffffff;
    --nr2-surface: #ffffff;
    --nr2-border: rgba(16, 42, 70, .085);
    --nr2-border-soft: rgba(16, 42, 70, .06);
    --nr2-shadow: 0 5px 16px rgba(27, 39, 52, .045);
    --nr2-shadow-hover: 0 8px 22px rgba(27, 39, 52, .065);
    --nr2-radius: 15px;
    --nr2-radius-small: 12px;
    --nr2-gap: clamp(13px, 1.55vw, 20px);
    --bz-page: #ffffff;
    --bz-surface: #ffffff;
}

html,
body,
#page,
.site,
.af-main-content {
    background-color: var(--nr2-page) !important;
}

body {
    color-scheme: light;
}

/* ------------------------------------------------------------
 * Shared restrained card treatment
 * ------------------------------------------------------------ */
.home :where(
    .af-home-top-sidebar .af-tab-index,
    .af-home-lead-center,
    .af-home-lead-side,
    .af-news-main,
    .af-side-index,
    .af-side-allnews,
    .af-comment-section,
    .af-timeline,
    .af-service-section
),
body:not(.home) :where(
    .af-single-content,
    .af-side-content,
    .af-page-shell,
    .af-page-article,
    .af-archive-items,
    .af-service-archive,
    .af-single-related,
    .comments-area,
    .baztab-search-result-summary,
    .baztab-search-empty,
    .bz404
) {
    background: var(--nr2-surface) !important;
    border: 1px solid var(--nr2-border) !important;
    border-radius: var(--nr2-radius) !important;
    box-shadow: var(--nr2-shadow) !important;
}

.home :where(
    .af-home-top-sidebar .af-tab-index,
    .af-home-lead-center,
    .af-home-lead-side
) {
    padding: 9px !important;
}

.home :where(.af-news-main, .af-side-index, .af-side-allnews, .af-comment-section, .af-timeline, .af-service-section) {
    overflow: hidden;
}

.home .af-home-top-layout {
    gap: var(--nr2-gap) !important;
    background: transparent !important;
}

.home .af-home-top {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.home .af-home-lead-card {
    background: #fff !important;
    border: 1px solid var(--nr2-border-soft) !important;
    border-radius: var(--nr2-radius-small) !important;
    box-shadow: 0 3px 11px rgba(27, 39, 52, .035) !important;
}

.home .af-home-lead-card:hover {
    border-color: rgba(var(--bz-accent-rgb), .14) !important;
    box-shadow: var(--nr2-shadow-hover) !important;
}

.home :where(
    .af-home-lead-card--hero .af-home-lead-media,
    .af-home-lead-card--side .af-home-lead-media,
    .af-home-lead-card--bottom .af-home-lead-media,
    .af-media-frame,
    .af-picrure-content > a,
    .af-pishkhan-picture-content > a
) {
    border-radius: 11px;
    overflow: hidden;
}

.home .af-home-top-sidebar .af-tab-index > .nav-pills,
.home .af-home-top-sidebar .af-tab-index .tab-content {
    background: #fff !important;
    border: 1px solid var(--nr2-border-soft) !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------
 * Full-bleed Baztab TV and Photo Report backgrounds
 * ------------------------------------------------------------ */
body.home .af-video-index {
    width: 100vw !important;
    max-width: none !important;
    margin-right: calc(50% - 50vw) !important;
    margin-left: calc(50% - 50vw) !important;
    padding: clamp(28px, 3vw, 42px) 0 !important;
    background-color: var(--bz-brand-900) !important;
    background-image: url('../imgs/videobg.jpg') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
}

body.home .af-video-index.af-picture-video-layout {
    background-image: url('../imgs/pishkhanbg2.jpg') !important;
}

body.home .af-video-index > .container-af {
    width: min(100% - 24px, 1220px);
    max-width: 1220px;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Keep deliberate dark/media presentation intact. */
body.home .af-video-index :where(.af-video-main, .af-video-item, .af-photo-video-player, .af-photo-video-item) {
    border-color: rgba(var(--bz-white-rgb), .14);
}

/* ------------------------------------------------------------
 * Stable image-based X icon for the more-comment block
 * ------------------------------------------------------------ */
.af-x-icon-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    margin: 1px 0 0;
    padding: 6px;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid rgba(17, 19, 24, .13) !important;
    border-radius: 50% !important;
    box-shadow: 0 5px 13px rgba(17, 19, 24, .07) !important;
    line-height: 1;
}

.af-x-icon-frame img {
    display: block !important;
    width: 29px !important;
    height: 29px !important;
    max-width: none !important;
    object-fit: contain;
}

body.home .baztab-block--morecomment li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body.home .baztab-block--morecomment li > a,
body.home .baztab-block--morecomment li .af-post-title {
    flex: 1 1 auto;
    min-width: 0;
}

/* Neutralize legacy SVG/icon styles only inside the more-comment block. */
body.home .baztab-block--morecomment li > svg.af-x,
body.home .baztab-block--morecomment li > svg.af-twitter,
body.home .baztab-block--morecomment li > svg.bi-x-social {
    display: none !important;
}

/* ------------------------------------------------------------
 * RSS: preserve the approved composition and newly designed icons
 * ------------------------------------------------------------ */
.baztab-rss-page {
    background: transparent !important;
}

.baztab-rss-page__hero {
    background: linear-gradient(135deg, #fff, rgba(var(--bz-accent-rgb), .035)) !important;
    border: 1px solid rgba(var(--bz-accent-rgb), .12) !important;
    box-shadow: 0 10px 28px rgba(27, 39, 52, .05) !important;
}

.baztab-rss-page__hero::before {
    display: block !important;
}

.baztab-rss-section {
    background: #fff !important;
    border: 1px solid var(--nr2-border) !important;
    box-shadow: var(--nr2-shadow) !important;
}

.baztab-rss-item {
    background: linear-gradient(180deg, #fff, rgba(var(--bz-accent-rgb), .018)) !important;
    border: 1px solid var(--nr2-border-soft) !important;
    box-shadow: 0 2px 8px rgba(27, 39, 52, .025) !important;
}

.baztab-rss-item:hover {
    border-color: rgba(var(--bz-accent-rgb), .15) !important;
    box-shadow: var(--nr2-shadow-hover) !important;
}

.baztab-rss-page__hero-mark,
.baztab-rss-section__title-icon,
.baztab-rss-item__icon {
    background: #fff !important;
    border-color: rgba(var(--bz-accent-rgb), .16) !important;
    border-radius: 50% !important;
}

/* ------------------------------------------------------------
 * Archive rows and forms
 * ------------------------------------------------------------ */
body:not(.home) .af-archive-item {
    background: #fff !important;
    border: 1px solid var(--nr2-border-soft) !important;
    border-radius: var(--nr2-radius-small) !important;
    box-shadow: 0 3px 11px rgba(27, 39, 52, .03) !important;
}

:where(input, textarea, select):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']) {
    background-color: #fff;
    border-color: rgba(16, 42, 70, .12);
    border-radius: 10px;
}

@media (max-width: 899.98px) {
    :root {
        --nr2-radius: 13px;
        --nr2-radius-small: 10px;
        --nr2-gap: 12px;
    }

    .home :where(
        .af-home-top-sidebar .af-tab-index,
        .af-home-lead-center,
        .af-home-lead-side
    ) {
        padding: 7px !important;
    }

    body.home .af-video-index {
        padding: 24px 0 !important;
    }

    body.home .af-video-index > .container-af {
        width: calc(100% - 16px);
    }

    .af-x-icon-frame {
        width: 40px;
        height: 40px;
        min-width: 40px;
        flex-basis: 40px;
        padding: 6px;
    }

    .af-x-icon-frame img {
        width: 27px !important;
        height: 27px !important;
    }
}

@media (max-width: 575.98px) {
    body.home .af-video-index {
        padding: 20px 0 !important;
    }

    .baztab-rss-page__hero-mark {
        width: 58px !important;
        height: 58px !important;
        flex-basis: 58px !important;
    }

    .baztab-rss-item__icon {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}


/* ============================================================
 * Baztab newsroom v2.2.1
 * - Smaller X icon aligned with the more-comment title rows.
 * - Featured TV/photo-report title below the image on desktop.
 * - Compact RSS header is completed in page-templates/feed.php.
 * ============================================================ */
.af-x-icon-frame {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    flex: 0 0 30px !important;
    margin-top: 0 !important;
    padding: 5px !important;
    border-width: 1px !important;
    box-shadow: 0 2px 7px rgba(17, 19, 24, .055) !important;
}

.af-x-icon-frame img {
    width: 18px !important;
    height: 18px !important;
}

body.home .baztab-block--morecomment li {
    align-items: center;
    gap: 8px;
}

@media (max-width: 767.98px) {
    .af-x-icon-frame {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        flex-basis: 28px !important;
        padding: 4px !important;
    }

    .af-x-icon-frame img {
        width: 17px !important;
        height: 17px !important;
    }
}

.baztab-rss-page__hero {
    background: #fff !important;
    border-color: rgba(var(--bz-black-rgb), .08) !important;
    box-shadow: 0 4px 14px rgba(var(--bz-black-rgb), .035) !important;
}

.baztab-rss-page__hero::before {
    display: none !important;
}

@media (min-width: 900px) {
    body.home .af-video-index .af-video-main > a,
    body.home .af-video-index.af-picture-video-layout .af-video-main > a {
        display: block;
        overflow: visible !important;
        border-radius: 0 !important;
    }

    body.home .af-video-index .af-video-main .af-media-frame--featured,
    body.home .af-video-index.af-picture-video-layout .af-video-main .af-media-frame--featured {
        border-radius: 9px;
        overflow: hidden;
    }

    body.home .af-video-index .af-video-main h3,
    body.home .af-video-index.af-picture-video-layout .af-video-main h3 {
        position: static !important;
        inset: auto !important;
        width: auto !important;
        margin: 11px 2px 0 !important;
        padding: 0 !important;
        color: var(--bz-white) !important;
        background: none !important;
        border-radius: 0 !important;
        font-size: 1.16rem !important;
        font-weight: 800;
        line-height: 1.75 !important;
        text-shadow: none !important;
        pointer-events: auto !important;
    }
}


/* ------------------------------------------------------------
 * 2.2.2 — Restore natural circular thumbnail size in Accidents
 * and Market Guide widgets without affecting other round lists.
 * ------------------------------------------------------------ */
.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li {
    align-items: center;
}

.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child {
    width: 82px !important;
    min-width: 82px !important;
    flex: 0 0 82px !important;
    margin-left: 10px;
}

.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child img {
    display: block;
    width: 76px !important;
    height: 76px !important;
    max-width: 76px !important;
    margin: 0 auto;
    padding: 2px !important;
    border-width: 2px !important;
    border-radius: 50% !important;
    object-fit: cover;
}

.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:last-child {
    padding-top: 0 !important;
    line-height: 1.75;
}

@media (max-width: 767.98px) {
    .home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child {
        width: 74px !important;
        min-width: 74px !important;
        flex-basis: 74px !important;
        margin-left: 9px;
    }

    .home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child img {
        width: 68px !important;
        height: 68px !important;
        max-width: 68px !important;
    }
}


/* ============================================================
 * Baztab newsroom v2.2.3 — Editorial spacing rhythm
 * Tightens image/title relationships and normalizes recurring
 * heading, card and list gaps without changing column geometry.
 * ============================================================ */
:root {
    --bz-editorial-gap-xs: 6px;
    --bz-editorial-gap-sm: 8px;
    --bz-editorial-gap-md: 12px;
    --bz-editorial-gap-lg: 14px;
}

/* Section headings should sit closer to the content they introduce. */
.home .af-news-main > .af-news-head,
.home .af-side-index > .af-head-title,
.home .af-side-allnews > .af-head-title {
    margin-top: 0;
}

.home .af-news-main > .af-news-head {
    align-items: center;
    gap: var(--bz-editorial-gap-md);
    margin-bottom: var(--bz-editorial-gap-md);
}

.home .af-news-main > .af-news-head .af-head-title,
.home .af-side-index > .af-head-title,
.home .af-side-allnews > .af-head-title {
    margin-bottom: 0;
}

.home .af-side-index > ul,
.home .af-side-allnews > ul {
    margin-top: var(--bz-editorial-gap-lg);
    margin-bottom: 0;
}

.home .af-side-index li,
.home .af-side-allnews li {
    margin-bottom: var(--bz-editorial-gap-sm);
}

.home .af-side-index li:last-child,
.home .af-side-allnews li:last-child {
    margin-bottom: 0;
}

/* Circular thumbnail lists: remove hidden wrapper/padding space. */
.home .af-comment-section li {
    align-items: center;
}

.home .af-comment-section li > a:last-child {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.72;
    align-self: center;
}

.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child {
    width: 76px !important;
    min-width: 76px !important;
    flex: 0 0 76px !important;
    margin-left: 7px !important;
}

.home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child img {
    margin: 0 !important;
}

/* Standard horizontal cards: predictable image-to-copy spacing. */
.home .af-news-main .af-article-main {
    padding-top: var(--bz-editorial-gap-md);
    padding-bottom: var(--bz-editorial-gap-md);
}

.home .af-news-main .af-article-img:not(.big) {
    width: 34%;
    flex: 0 0 34%;
    margin-left: var(--bz-editorial-gap-md);
}

.home .af-news-main .af-article-desc:not(.big) {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
}

.home .af-article-desc h3,
.home .af-video-desc h3,
.home .af-video-item h3,
.home .af-related-main h5 {
    margin-top: 0;
}

.home .af-article-desc h3 {
    margin-bottom: var(--bz-editorial-gap-xs);
}

.home .af-article-desc p {
    margin: var(--bz-editorial-gap-xs) 0 0;
}

/* Media cards and related stories: keep titles visually attached to images. */
.home .af-video-desc,
.home .af-video-item h3,
.home .af-related-main h5,
.home .af-pishkhan-picture-content h3 {
    margin-top: var(--bz-editorial-gap-sm) !important;
    margin-bottom: 0 !important;
}

.home .af-video-main h3 {
    margin-top: var(--bz-editorial-gap-sm) !important;
}

/* Archive rows use the same compact image/copy rhythm. */
body:not(.home) .af-archive-item {
    column-gap: var(--bz-editorial-gap-lg);
}

body:not(.home) .af-archive-img {
    margin-left: 0;
}

body:not(.home) .af-archive-desc {
    min-width: 0;
    flex: 1 1 auto;
}

body:not(.home) .af-archive-desc h2 {
    margin: 0 0 var(--bz-editorial-gap-xs);
}

body:not(.home) .af-archive-desc p {
    margin: var(--bz-editorial-gap-xs) 0 0;
}

@media (max-width: 899.98px) {
    .home .af-news-main > .af-news-head {
        margin-bottom: 10px;
    }

    .home .af-side-index > ul,
    .home .af-side-allnews > ul {
        margin-top: 11px;
    }

    .home .af-news-main .af-article-main {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .home .af-news-main .af-article-img:not(.big) {
        width: 100%;
        flex-basis: 100%;
        margin-left: 0;
        margin-bottom: var(--bz-editorial-gap-sm);
    }

    body:not(.home) .af-archive-img {
        margin-bottom: 12px;
    }
}

@media (max-width: 767.98px) {
    .home :is(.baztab-round-list--accidents, .baztab-round-list--market-guide) li > a:first-child {
        width: 68px !important;
        min-width: 68px !important;
        flex-basis: 68px !important;
        margin-left: 7px !important;
    }

    .home .af-comment-section li > a:last-child {
        line-height: 1.68;
    }
}


/* ============================================================
 * Baztab newsroom v2.2.4 — Special/Favorites spacing repair
 * Isolates these tabbed news lists from the broad 2.2.3 rhythm
 * so their image and copy retain the stable original geometry.
 * ============================================================ */
.home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-main {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 15px !important;
    padding: 15px 0 !important;
}

.home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-img:not(.big) {
    width: 35% !important;
    min-width: 0;
    flex: 0 0 35% !important;
    margin: 0 !important;
}

.home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-desc:not(.big) {
    width: auto !important;
    min-width: 0;
    flex: 1 1 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-desc h3 {
    margin: 0 0 7px !important;
}

.home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-desc p {
    margin: 6px 0 0 !important;
}

@media (max-width: 899.98px) {
    .home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-main {
        display: block !important;
        padding: 11px 0 !important;
    }

    .home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-img:not(.big) {
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 10px !important;
    }

    .home :is(#nav-special-tabContent, #nav-fav-tabContent) .af-article-desc:not(.big) {
        width: 100% !important;
    }
}
