/* ==========================================================================
   Aajoi redesign layer — view-only visual refresh.
   Loaded last in <head>, after the theme's inline :root block, so these
   custom-property values win the cascade for every existing var(--primary-color)
   usage across main.css/custom.css without editing those files or the DB.
   ========================================================================== */

:root {
    --primary-color: #dc2626;
    --plyr-color-main: #dc2626;
    --aajoi-ink: #1a1a1a;
    --aajoi-muted: #6b7280;
    --aajoi-border: #e9e9ec;
    --aajoi-bg: #f6f6f8;
    --aajoi-card: #ffffff;
}

body {
    background-color: var(--aajoi-bg);
}

/* ---------- Topbar ---------- */

.sg-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--aajoi-border);
    padding: 9px 0;
    font-size: 14px;
}

/* The right-side link groups (report missing/submit/language, social/dark-toggle/login)
   never had vertical centering applied — they were top-aligned against the left side's
   date+ticker row, which became more noticeable once the ticker added height there. */
.sg-topbar .d-md-flex.justify-content-md-between,
.sg-topbar .right-content,
.sg-topbar .right-content > .d-flex {
    align-items: center;
}

.sg-topbar .global-list li,
.sg-topbar .submit-news a,
.sg-topbar .sg-user span,
.sg-topbar .sg-user a {
    color: var(--aajoi-muted) !important;
    font-size: 14px;
}

.sg-topbar .submit-news a:hover,
.sg-topbar .sg-user a:hover {
    color: var(--primary-color) !important;
}

.sg-topbar .sg-social a {
    color: var(--aajoi-muted) !important;
    transition: color .15s ease;
}

.sg-topbar .sg-social a:hover {
    color: var(--primary-color) !important;
}

/* #switch-mode also carries legacy fixed-position styling from custom.css
   (originally a floating left-edge widget). Cancel that here — the ID+class
   pairing outranks the ID-only rule regardless of stylesheet order. */
#switch-mode.aajoi-icon-btn {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    background: transparent !important;
    border-radius: 50% !important;
    padding: 0 !important;
    z-index: auto !important;
}

.aajoi-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--aajoi-muted) !important;
    background: transparent;
    transition: background .15s ease, color .15s ease;
    text-decoration: none !important;
}

.aajoi-icon-btn:hover,
.aajoi-icon-btn.active {
    background: var(--aajoi-bg);
    color: var(--primary-color) !important;
}

/* ---------- Main nav ---------- */

.sg-menu {
    background: #ffffff;
    border-bottom: 1px solid var(--aajoi-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}

/* Bigger logo without growing the navbar's own height: .navbar-brand's
   default 5px top/bottom padding is trimmed to make room for the larger
   image (proportional scaling grows height along with width, since it's a
   tall shield shape, not a wide banner), keeping .sg-menu's overall height
   essentially unchanged. */
.sg-menu .navbar-brand {
    padding-top: 1px;
    padding-bottom: 1px;
    margin-left: 10px;
}

.sg-menu .navbar-brand img {
    width: 56px !important;
}

.sg-menu .navbar-nav {
    align-items: center;
}

.sg-menu .navbar-nav > .nav-item {
    margin: 0 2px;
}

.sg-menu .navbar-nav > .nav-item > a {
    color: var(--aajoi-ink) !important;
    font-weight: 600;
    font-size: 14.5px;
    padding: 10px 12px !important;
    position: relative;
    text-transform: none;
    letter-spacing: 0;
    transition: color .15s ease;
}

.sg-menu .navbar-nav > .nav-item > a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .15s ease;
}

.sg-menu .navbar-nav > .nav-item:hover > a,
.sg-menu .navbar-nav > .nav-item.active > a {
    color: var(--primary-color) !important;
}

.sg-menu .navbar-nav > .nav-item:hover > a::after,
.sg-menu .navbar-nav > .nav-item.active > a::after {
    transform: scaleX(1);
}

/* Search: icon-triggered flyout */

.aajoi-search {
    position: relative;
    margin-left: 10px;
}

.aajoi-search .search-form {
    display: none;
}

.aajoi-search .search-form.aajoi-search-open {
    display: block;
    position: absolute;
    right: 0;
    top: 42px;
    z-index: 50;
    background: #fff;
    border: 1px solid var(--aajoi-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 8px;
}

.aajoi-search .search-form form {
    display: flex;
    align-items: center;
}

.aajoi-search .search-form input {
    width: 220px;
    border: 1px solid var(--aajoi-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
}

.aajoi-search .search-form button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    margin-left: 6px;
}

/* ---------- Breaking news: merged into the topbar (site-wide, next to the date) ---------- */

.aajoi-breaking-badge {
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.aajoi-topbar-left {
    min-width: 0;
    flex: 1;
    gap: 18px;
    margin-right: 24px;
}

.aajoi-topbar-date {
    flex-shrink: 0;
    white-space: nowrap;
}

.aajoi-topbar-ticker {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    background: #16171c;
    border-radius: 6px;
    padding: 0 14px 0 6px;
}

.aajoi-topbar-ticker .news-ticker {
    min-width: 0;
    flex: 1;
}

.aajoi-topbar-ticker .news-ticker a {
    color: #f1f1f1 !important;
    font-size: 14px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Hero ---------- */

.aajoi-hero-section {
    padding-top: 4px;
    margin-bottom: 24px;
}

/* The hero (col-lg-5) and the ranked grid (col-lg-3) read as one dark unit —
   matching background/rounding/shadow with only a tight seam between them
   (not a full gutter). col-lg-4 stays clearly separate with normal spacing,
   since it's an independent section, not part of this pairing. The whole row
   uses no-gutters so every gap here is deliberate, not bootstrap's default. */
.aajoi-hero-main,
.aajoi-hero-grid {
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.aajoi-hero-main {
    position: relative;
    overflow: hidden;
    background: #000;
    margin-right: 8px;
}

.aajoi-hero-grid {
    margin-right: 8px;
}

.aajoi-top-story-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Fill-crop the slide image instead of letterboxing it inside a forced-height
   box — that mismatch (tall box, natural-aspect image) was the real cause of
   the "too much empty black space" look, not just the height number itself. */
.aajoi-hero-main .home-slider .sg-post.featured-post {
    position: relative;
    min-height: 380px;
    margin-bottom: 0;
}

/* .featured-post's content is entirely absolutely-positioned, so it never
   naturally establishes height — only min-height gives it size. slick.js's
   own JS-measured height for .slick-list/.slick-track doesn't reliably pick
   that up. Worse: .aajoi-hero-main itself gets stretched taller than 380px
   by the row's flex align-items:stretch whenever the ranked-grid sibling
   column is taller (its natural height varies with viewport width), so a
   fixed min-height here isn't enough — it leaves exactly that much black gap
   under the dots. .aajoi-hero-main DOES have a definite (if dynamic) height
   from that stretch — same mechanism .aajoi-hero-grid already relies on
   successfully — so height:100% cascaded through every layer tracks it
   correctly; min-height stays as a floor for when the grid isn't taller. */
.aajoi-hero-main {
    height: 100%;
}

.aajoi-hero-main .home-slider,
.aajoi-hero-main .home-slider .slick-list,
.aajoi-hero-main .home-slider .slick-track,
.aajoi-hero-main .home-slider .slick-slide,
.aajoi-hero-main .home-slider .slick-slide > div {
    height: 100%;
    min-height: 380px;
}

.aajoi-hero-main .home-slider .sg-post.featured-post {
    height: 100%;
}

@media (max-width: 991px) {
    .aajoi-hero-main .home-slider,
    .aajoi-hero-main .home-slider .slick-list,
    .aajoi-hero-main .home-slider .slick-track,
    .aajoi-hero-main .home-slider .slick-slide,
    .aajoi-hero-main .home-slider .slick-slide > div {
        min-height: 300px;
    }
}

@media (max-width: 575px) {
    .aajoi-hero-main .home-slider,
    .aajoi-hero-main .home-slider .slick-list,
    .aajoi-hero-main .home-slider .slick-track,
    .aajoi-hero-main .home-slider .slick-slide,
    .aajoi-hero-main .home-slider .slick-slide > div {
        min-height: 220px;
    }
}

.aajoi-hero-main .home-slider .sg-post.featured-post .entry-header,
.aajoi-hero-main .home-slider .sg-post.featured-post .entry-thumbnail,
.aajoi-hero-main .home-slider .sg-post.featured-post .entry-thumbnail a {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.aajoi-hero-main .home-slider .sg-post.featured-post .entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aajoi-hero-main .entry-content.absolute {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,0) 100%);
    padding: 18px 20px 16px;
}

/* main.css has a generic .sg-post:hover .entry-content.absolute rule (padding-top:50%
   plus a much darker gradient) meant for small thumbnail cards' hover reveal. On the
   full-bleed hero it blacks out almost the whole image on mouse hover — override it
   back to the normal resting state so hovering the hero doesn't crush the photo. */
.aajoi-hero-main .home-slider .sg-post.featured-post:hover .entry-content.absolute {
    padding-top: 0 !important;
    padding: 18px 20px 16px !important;
    background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,0) 100%) !important;
}

.aajoi-hero-main .entry-content.absolute .category a {
    background: var(--primary-color) !important;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.aajoi-hero-main .entry-title a {
    color: #fff !important;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.aajoi-hero-main .entry-meta li,
.aajoi-hero-main .entry-meta a {
    color: #d8d8d8 !important;
    font-size: 12px;
}

.aajoi-hero-main .aajoi-read-time {
    color: #d8d8d8;
}

.aajoi-hero-main .home-slider-nav {
    display: none;
}

/* Slick arrows/dots restyle inside the hero.
   Specificity note: main.css positions .home-slider .slick-arrow.fa-angle-* off-canvas
   (visible only on :hover) at 0-0-3-0 specificity, and this theme's slick.css ships with
   no .slick-dots theme at all — so these rules match that selector shape and use
   !important to guarantee the always-visible mockup look regardless of load order. */

.aajoi-hero-main .home-slider .slick-arrow,
.aajoi-hero-main .home-slider .slick-arrow.fa-angle-right,
.aajoi-hero-main .home-slider .slick-arrow.fa-angle-left {
    top: 50% !important;
    bottom: auto !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    margin-top: -19px !important;
    background: rgba(255,255,255,.9) !important;
    border-radius: 50% !important;
    z-index: 25 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--aajoi-ink) !important;
    font-size: 15px !important;
    opacity: 1 !important;
}

.aajoi-hero-main .home-slider .slick-arrow:hover {
    background: #fff !important;
    color: var(--aajoi-ink) !important;
}

.aajoi-hero-main .home-slider .slick-arrow.fa-angle-left,
.aajoi-hero-main .home-slider:hover .slick-arrow.fa-angle-left {
    left: 16px !important;
    right: auto !important;
}

.aajoi-hero-main .home-slider .slick-arrow.fa-angle-right,
.aajoi-hero-main .home-slider:hover .slick-arrow.fa-angle-right {
    right: 16px !important;
    left: auto !important;
}

.aajoi-hero-main .slick-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.aajoi-hero-main .slick-dots li {
    display: inline-flex;
    margin: 0 4px;
}

.aajoi-hero-main .slick-dots li button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
    cursor: pointer;
}

.aajoi-hero-main .slick-dots li.slick-active button {
    background: var(--primary-color);
}

/* Ranked grid (right column) */

.aajoi-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    height: 100%;
    overflow: hidden;
    /* background: #14151a; */
    /* padding: 12px; */
    box-sizing: border-box;
}

.aajoi-hero-tile {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #1f2229;
}

/* Image now fills the entire tile — entry-header is no longer a flex sibling
   sharing space with the caption below it. */
.aajoi-hero-tile .entry-header {
    position: absolute;
    inset: 0;
}

.aajoi-hero-tile .entry-thumbnail {
    position: absolute;
    inset: 0;
}

.aajoi-hero-tile .entry-thumbnail img {
    height: 100%;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* Caption overlays the bottom of the image with a gradient scrim, same
   pattern as the main hero's .entry-content.absolute, instead of sitting in
   its own block below the thumbnail. Title still clamped to 2 lines so the
   scrim height stays consistent across all 4 tiles regardless of length. */
.aajoi-hero-tile .entry-content.absolute {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(0,0,0,.95) 0%, rgba(0,0,0,.75) 55%, rgba(0,0,0,0) 100%);
    padding: 22px 10px 8px;
}

.aajoi-hero-tile .entry-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
    margin-bottom: 2px;
    line-height: 1.3;
}

.aajoi-hero-tile .entry-meta li {
    color: #e5e5ea;
    font-weight: 500;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,.7);
}

.aajoi-rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Responsive pass
   ========================================================================== */

/* Tablet: nav has already collapsed to the hamburger (navbar-expand-lg breaks
   at 992px), hero drops to a shorter single-width band, ranked grid sits below
   it full-width. */
@media (max-width: 991px) {
    .sg-menu .navbar-brand img {
        width: 40px !important;
    }

    .sg-menu .navbar-collapse {
        background: #fff;
        padding: 8px 0;
    }

    .sg-menu .navbar-nav > .nav-item > a {
        padding: 8px 4px !important;
    }

    .sg-menu .navbar-nav > .nav-item > a::after {
        display: none;
    }

    .aajoi-hero-main .home-slider .sg-post.featured-post {
        min-height: 300px;
    }

    .aajoi-hero-main .entry-title a {
        font-size: 19px;
    }

    /* Below 992px the hero and grid stack (no longer side-by-side), so
       matching heights via flex/100% no longer applies — revert tiles to
       simple fixed-height thumbnails. */
    .aajoi-hero-grid {
        margin-top: 14px;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: none;
        height: auto;
    }

    .aajoi-hero-tile {
        display: block;
    }

    .aajoi-hero-tile .entry-header {
        position: relative;
        flex: none;
        min-height: 0;
    }

    .aajoi-hero-tile .entry-thumbnail {
        position: static;
    }

    .aajoi-hero-tile .entry-thumbnail img {
        position: static;
        height: 80px;
    }

    .aajoi-hero-tile .entry-content p {
        font-size: 11.5px;
    }

    .aajoi-search .search-form.aajoi-search-open {
        max-width: calc(100vw - 24px);
    }
}

/* Phone: topbar's secondary items already hide via existing d-none d-md-block
   utility classes; tighten what's left and stack the ranked grid to 2x2 again
   since 4-across gets too cramped under ~576px. */
@media (max-width: 575px) {
    .sg-topbar {
        font-size: 12px;
    }

    .sg-menu .navbar-brand img {
        width: 34px !important;
    }

    /* Not enough width for date + badge + ticker on one line — let the
       breaking-news ticker drop to its own row under the date instead of
       truncating everything into illegibility. */
    .aajoi-topbar-left {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .aajoi-topbar-ticker {
        flex-basis: 100%;
    }

    .aajoi-breaking-badge {
        font-size: 10px;
        padding: 4px 8px;
        margin-right: 10px;
    }

    .aajoi-topbar-ticker .news-ticker a {
        font-size: 13.5px;
    }

    .aajoi-hero-main .home-slider .sg-post.featured-post {
        min-height: 220px;
    }

    .aajoi-hero-main .entry-content.absolute {
        padding: 14px 14px 12px;
    }

    .aajoi-hero-main .entry-title a {
        font-size: 16px;
    }

    .aajoi-hero-main .entry-meta li,
    .aajoi-hero-main .entry-meta a {
        font-size: 11px;
    }

    .aajoi-hero-main .home-slider .slick-arrow {
        width: 30px !important;
        height: 30px !important;
        margin-top: -15px !important;
        font-size: 12px !important;
    }

    .aajoi-hero-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        height: auto;
        gap: 10px;
    }

    .aajoi-hero-tile .entry-thumbnail img {
        height: 76px;
    }

    .aajoi-rank-badge {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .aajoi-search .search-form input {
        width: 100%;
    }

    .aajoi-search .search-form.aajoi-search-open {
        max-width: calc(100vw - 24px);
        width: 220px;
    }
}

/* ---------- Explore Categories ---------- */

.aajoi-explore-categories {
    padding: 10px 0px 15px;
}

.aajoi-explore-head {
    margin-bottom: 6px;
}

.aajoi-explore-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--aajoi-ink);
    margin: 0;
}

.aajoi-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.aajoi-category-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--aajoi-card);
    border: 1px solid var(--aajoi-border);
    border-radius: 8px;
    padding: 10px 6px;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.aajoi-category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.aajoi-category-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(220, 38, 38, .08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.aajoi-category-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--aajoi-ink);
    text-align: center;
    line-height: 1.2;
}

/* auto-fill/minmax on .aajoi-category-grid already reflows column count to
   fit the (now col-lg-6-constrained) available width at any screen size, so
   no per-breakpoint column-count overrides are needed here. */
@media (max-width: 767px) {
    .aajoi-category-card {
        padding: 8px 6px;
    }
}

.sg-dark .aajoi-category-card {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-explore-head h2,
.sg-dark .aajoi-category-label {
    color: #e5e5e5;
}

/* ---------- General card / widget polish (site-wide, existing classes) ---------- */

.sg-post {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .15s ease, transform .15s ease;
}

.sg-post:not(.featured-post):hover {
    box-shadow: 0 10px 22px rgba(0,0,0,.09);
}

.sg-post .entry-title a,
.sg-post .entry-content p a,
.sg-post .entry-content > a p {
    color: var(--aajoi-ink);
}

.sg-post .entry-title a:hover,
.sg-post .entry-content p a:hover,
.sg-post .entry-content > a:hover p {
    color: var(--primary-color);
}

/* Full-width red banner instead of a thin left border — makes each section
   (Latest Posts, Opinion, Interviews, Videos, Book of the Month) read as a
   clearly separated block on the page, not just a subtly-accented heading. */
.section-title {
    background: var(--primary-color);
    border-bottom: none;
    border-left: none;
    padding: 10px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.section-title h1 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #fff;
    margin: 0;
}

/* ---------- Latest Posts tabs ---------- */

.aajoi-section-title-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.aajoi-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* .aajoi-tab sits inside .section-title, which now has a red background —
   these need to invert (light on red) instead of the original red-on-white
   scheme, or the active tab (previously red-on-red) would disappear. */
.aajoi-tab {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    color: #fff;
    background: rgba(255,255,255,.15);
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}

.aajoi-tab:hover {
    background: rgba(255,255,255,.28);
    color: #fff;
}

.aajoi-tab.active {
    background: #fff;
    color: var(--primary-color);
}

/* .aajoi-tab no longer needs a dark-mode override — .section-title is red
   in both modes now, and the inverted white-on-red scheme above already
   works consistently regardless of light/dark mode. */

/* ---------- Sidebar: featured-post as a spotlight card ---------- */

.sg-widget .sg-post.featured-post {
    border-radius: 8px;
    overflow: hidden;
}

.sg-widget .sg-post.featured-post .entry-title {
    font-size: 16px;
    line-height: 1.3;
}

.sg-widget .sg-post.featured-post .entry-content.absolute .category a {
    background: var(--primary-color) !important;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* ---------- Sidebar: numbered rank lists (Popular Posts / Most Read / Recommended) ---------- */

.sg-sidebar .sg-widget:not(.categories-widget):not(.aajoi-video-widget):not(.aajoi-podcast-widget) > ul.global-list {
    counter-reset: aajoi-rank;
}

.sg-sidebar .sg-widget:not(.categories-widget):not(.aajoi-video-widget):not(.aajoi-podcast-widget) > ul.global-list > li {
    position: relative;
    counter-increment: aajoi-rank;
    padding-left: 26px;
}

.sg-sidebar .sg-widget:not(.categories-widget):not(.aajoi-video-widget):not(.aajoi-podcast-widget) > ul.global-list > li::before {
    content: counter(aajoi-rank);
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-widget {
    background: var(--aajoi-card);
    border: 1px solid var(--aajoi-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Theme's own main.css already gives .widget-title a solid red background
   (var(--primary-color), now red via our :root override) — my earlier rule
   only touched color/border-left, leaving text dark-on-red (poor contrast).
   White text is correct here; the left border is redundant on a solid-red
   background (same color, invisible) so it's dropped instead of kept. */
.sg-widget .widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    color: #fff;
}

.categories-widget ul li {
    padding: 7px 0;
    border-bottom: 1px dashed var(--aajoi-border);
}

.categories-widget ul li:last-child {
    border-bottom: 0;
}

.categories-widget ul li a {
    color: var(--aajoi-ink);
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
}

.categories-widget ul li a:hover {
    color: var(--primary-color);
}

.categories-widget ul li a span {
    color: var(--aajoi-muted);
}

/* "Imp Links" renamed/redesigned to "Explore Categories" — compact icon+count
   cards instead of a plain text list, matching the icon-card treatment used
   near the hero (now removed as a separate section per request — this widget
   replaces it). */
.aajoi-explore-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-top: 10px;
}

.aajoi-explore-widget-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px 10px;
    background: var(--aajoi-card);
    border: 1px solid var(--aajoi-border);
    border-radius: 8px;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease;
}

.aajoi-explore-widget-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.aajoi-explore-widget-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(220, 38, 38, .08);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.aajoi-explore-widget-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
    text-align: center;
    line-height: 1.2;
}

.aajoi-explore-widget-count {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-dark .aajoi-explore-widget-card {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-explore-widget-name {
    color: #e5e5e5;
}

.sg-dark .sg-widget {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .sg-widget .widget-title {
    color: #e5e5e5;
}

.sg-dark .categories-widget ul li {
    border-color: #2a2d34;
}

.sg-dark .categories-widget ul li a {
    color: #e5e5e5;
}

/* ---------- Sidebar: Latest Videos ---------- */

.aajoi-video-widget ul.global-list,
.aajoi-podcast-widget ul.global-list {
    counter-reset: none;
}

.aajoi-video-widget ul.global-list > li {
    padding-left: 0;
    margin-bottom: 10px;
}

.aajoi-video-widget ul.global-list > li::before {
    content: none;
}

.aajoi-video-row {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.aajoi-video-thumb {
    position: relative;
    flex-shrink: 0;
    width: 76px;
    height: 54px;
    border-radius: 6px;
    overflow: hidden;
}

.aajoi-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aajoi-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 11px;
}

.aajoi-video-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.aajoi-video-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aajoi-video-date {
    font-size: 11px;
    color: var(--aajoi-muted);
}

.aajoi-video-row:hover .aajoi-video-title {
    color: var(--primary-color);
}

/* ---------- Sidebar: Podcast ---------- */

.aajoi-podcast-widget ul.global-list > li {
    padding-left: 0;
    margin-bottom: 8px;
}

.aajoi-podcast-widget ul.global-list > li::before {
    content: none;
}

.aajoi-podcast-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    background: var(--aajoi-bg);
    text-decoration: none !important;
    transition: background .15s ease;
}

.aajoi-podcast-row:hover {
    background: rgba(220, 38, 38, .08);
}

.aajoi-podcast-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.aajoi-podcast-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.aajoi-podcast-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aajoi-podcast-date {
    font-size: 11px;
    color: var(--aajoi-muted);
}

.aajoi-podcast-play {
    flex-shrink: 0;
    color: var(--aajoi-muted);
    font-size: 18px;
}

.aajoi-podcast-row:hover .aajoi-podcast-play {
    color: var(--primary-color);
}

/* ---------- Sidebar: Stay Connected ---------- */

.aajoi-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.aajoi-social-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--aajoi-border);
    text-decoration: none !important;
    transition: border-color .15s ease, background .15s ease;
}

.aajoi-social-item:hover {
    border-color: var(--primary-color);
    background: rgba(220, 38, 38, .05);
}

.aajoi-social-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.aajoi-social-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
}

.sg-dark .aajoi-video-title,
.sg-dark .aajoi-podcast-title,
.sg-dark .aajoi-social-name {
    color: #e5e5e5;
}

.sg-dark .aajoi-podcast-row {
    background: #1f2229;
}

.sg-dark .aajoi-social-item {
    border-color: #2a2d34;
}

/* ---------- Newsletter widget: illustrated envelope + app logo ---------- */

.aajoi-newsletter-card {
    background: linear-gradient(180deg, #fdf3f4 0%, #ffffff 45%);
    border: 1px solid var(--aajoi-border);
    border-radius: 10px;
    padding: 18px 14px;
}

.aajoi-newsletter-illustration {
    position: relative;
    height: 92px;
    margin-bottom: 4px;
}

.aajoi-newsletter-deco {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.aajoi-newsletter-envelope {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 52px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 22px rgba(0,0,0,.1);
}

.aajoi-newsletter-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #f0eef0;
    clip-path: polygon(0 0, 100% 0, 50% 68%);
    border-radius: 4px 4px 0 0;
}

.aajoi-newsletter-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.18));
}

.aajoi-newsletter-heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--aajoi-ink);
    margin: 2px 0 6px;
}

.aajoi-newsletter-desc {
    font-size: 11.5px;
    color: var(--aajoi-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}

.aajoi-newsletter-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--aajoi-border);
    border-radius: 6px;
    padding: 9px 12px;
    margin-bottom: 10px;
}

.aajoi-newsletter-input-wrap i {
    color: var(--aajoi-muted);
    font-size: 13px;
    flex-shrink: 0;
}

.aajoi-newsletter-input-wrap input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--aajoi-ink);
}

.aajoi-newsletter-submit {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease;
}

.aajoi-newsletter-submit:hover {
    background: #b91c1c;
}

.aajoi-newsletter-privacy {
    font-size: 10px;
    color: var(--aajoi-muted);
    margin: 10px 0 0;
}

.sg-dark .aajoi-newsletter-card {
    background: linear-gradient(180deg, #241a1b 0%, #1f2229 45%);
    border-color: #2a2d34;
}

.sg-dark .aajoi-newsletter-heading {
    color: #e5e5e5;
}

.sg-dark .aajoi-newsletter-input-wrap {
    background: #16171c;
    border-color: #2a2d34;
}

.sg-dark .aajoi-newsletter-input-wrap input {
    color: #e5e5e5;
}

/* ---------- Voices & Opinion / Missing Persons ---------- */

.aajoi-voices-missing {
    padding: 24px 0;
}

.aajoi-block-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--aajoi-ink);
    margin: 0;
}

.aajoi-trending-widget .aajoi-block-title,
.aajoi-trending-widget .aajoi-block-title i {
    color: var(--primary-color);
}

.aajoi-view-all {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-muted);
    text-decoration: none !important;
}

.aajoi-view-all:hover {
    color: var(--primary-color);
}

.aajoi-author-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.aajoi-author-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--aajoi-card);
    border: 1px solid var(--aajoi-border);
    border-radius: 8px;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease;
}

.aajoi-author-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.aajoi-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.aajoi-author-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
    text-align: center;
}

.aajoi-missing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* ---------- Voices & Opinion / Missing Persons, moved into the left sidebar ---------- */

.aajoi-sidebar-voices,
.aajoi-sidebar-missing {
    margin-bottom: 20px;
}

.aajoi-sidebar-author-list {
    list-style: none;
    margin: 0;
    padding: 8px 0 0;
}

.aajoi-sidebar-author-list li {
    border-bottom: 1px dashed var(--aajoi-border);
}

.aajoi-sidebar-author-list li:last-child {
    border-bottom: 0;
}

.aajoi-sidebar-author-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none !important;
}

.aajoi-sidebar-author-list li img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.aajoi-sidebar-author-list li span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
}

.aajoi-sidebar-author-list li a:hover span {
    color: var(--primary-color);
}

.aajoi-missing-grid-sidebar {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 10px;
}

.sg-dark .aajoi-sidebar-author-list li {
    border-color: #2a2d34;
}

.sg-dark .aajoi-sidebar-author-list li span {
    color: #e5e5e5;
}

.aajoi-missing-card {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.aajoi-missing-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aajoi-missing-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 6px 6px;
    background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aajoi-missing-name {
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aajoi-missing-status {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    padding: 1px 6px;
    border-radius: 3px;
}

.aajoi-status-abduction {
    background: #f59e0b;
    color: #1a1a1a;
}

.aajoi-status-killed {
    background: var(--primary-color);
    color: #fff;
}

.aajoi-status-released {
    background: #16a34a;
    color: #fff;
}

@media (max-width: 767px) {
    .aajoi-author-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .aajoi-missing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .aajoi-voices-missing .col-lg-6 + .col-lg-6 {
        margin-top: 20px;
    }
}

.sg-dark .aajoi-author-card {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-author-name,
.sg-dark .aajoi-block-title {
    color: #e5e5e5;
}

/* ---------- Hero sidebar (col-lg-4): Trending Now + Daily Newsletter ---------- */

/* Trending Now + Newsletter side by side (not stacked) — a tall stacked
   sidebar was the tallest column in the hero row, stretching the hero/grid
   far past their natural height via the row's align-items:stretch. Side by
   side keeps this column's height close to the hero's, so nothing stretches. */
/* col-lg-4 itself already gets stretched by the row's flex align-items:stretch
   (same mechanism col-lg-5/col-lg-3 rely on, no explicit height needed on the
   column) — height:100% on the column itself (rather than its content) was
   fighting that instead of complementing it and produced a shorter, wrong
   result. Only the CONTENT needs height:100%, same pattern as .aajoi-hero-main. */
.aajoi-hero-sidebar-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    height: 100%;
}

.aajoi-hero-sidebar-row .aajoi-trending-widget {
    flex: 1.15;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.aajoi-hero-sidebar-row .aajoi-hero-newsletter {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.aajoi-hero-sidebar-row .aajoi-hero-newsletter .aajoi-newsletter-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aajoi-hero-sidebar-row .aajoi-hero-newsletter .aajoi-newsletter-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aajoi-hero-sidebar-row .aajoi-hero-newsletter .aajoi-newsletter-form {
    margin-top: auto;
}

@media (max-width: 991px) {
    .aajoi-hero-col4,
    .aajoi-hero-sidebar-row {
        height: auto;
    }
}

.aajoi-trending-widget {
    background: var(--aajoi-card);
    border: 1px solid var(--aajoi-border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 0;
}

.aajoi-view-all-block {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--aajoi-border);
}

.aajoi-trending-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aajoi-trending-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--aajoi-border);
}

.aajoi-trending-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.aajoi-trending-list li:first-child {
    padding-top: 0;
}

/* Reuse .aajoi-rank-badge's red-circle look, but it's an absolute overlay
   in the hero-tile context — here it's an inline badge in a flex row, so
   position/placement need resetting rather than the shared base rule. */
.aajoi-trending-list .aajoi-rank-badge {
    position: static;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    font-size: 10px;
}

.aajoi-trending-thumb {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
}

.aajoi-trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aajoi-trending-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-decoration: none !important;
}

.aajoi-trending-title {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--aajoi-ink);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aajoi-trending-list li:hover .aajoi-trending-title {
    color: var(--primary-color);
}

.aajoi-trending-time {
    font-size: 11px;
    color: var(--aajoi-muted);
}

.aajoi-hero-newsletter .sg-widget {
    margin-bottom: 0;
}

.sg-dark .aajoi-trending-widget {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-trending-title {
    color: #e5e5e5;
}

/* ---------- Dark mode: keep new elements legible ---------- */

.sg-dark .sg-topbar {
    background: #16181d !important;
    border-color: #2a2d34;
}

.sg-dark .sg-menu {
    background: #16181d;
    border-color: #2a2d34;
}

.sg-dark .sg-menu .navbar-nav > .nav-item > a {
    color: #e5e5e5 !important;
}

.sg-dark .aajoi-search .search-form {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-hero-tile {
    background: #1f2229;
    border-color: #2a2d34;
}

.sg-dark .aajoi-hero-tile .entry-content p {
    color: #e5e5e5;
}

/* ---------- Footer polish ---------- */

.footer-top {
    padding: 56px 0 44px;
}

.footer-widget h3 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .03em;
    color: #fff;
    border-left: 3px solid var(--primary-color);
    padding-left: 12px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Footer post thumbnails render at whatever size the source image happens to
   be (only a max-width cap exists site-wide) — fixing width/height/object-fit
   here so every item lines up cleanly instead of a ragged mix of sizes. */
.footer .sg-post.post-style-1 .entry-thumbnail {
    width: 76px;
    height: 76px;
    max-width: 76px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.footer .sg-post.post-style-1 .entry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footer .sg-post.post-style-1 {
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer .sg-post.post-style-1:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.footer .sg-post.post-style-1 .entry-content {
    padding: 0;
}

.footer .sg-post .entry-title a {
    color: #f1f1f1 !important;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.footer .sg-post:hover .entry-title a {
    color: var(--primary-color) !important;
}

.footer .sg-post .entry-meta li,
.footer .sg-post .entry-meta a {
    color: #9a9a9e !important;
    font-size: 11.5px;
}

.footer .about-widget p {
    color: #b5b5ba;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer .about-widget img {
    border-radius: 6px;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}

.footer-bottom span {
    color: #9a9a9e;
    font-size: 12.5px;
}
