/* ==========================================================
   BBNN LATEST NEWS V1.6
   Scoped to #bbnn-latest so it does not modify Blocksy header,
   breaking ticker, footer, mobile menu, or global containers.
========================================================== */

#bbnn-latest {
    --bbnn-red: #E50815;
    --bbnn-navy: #101B30;
    --bbnn-ink: #17202C;
    --bbnn-muted: #596474;
    --bbnn-light: #F5F6F8;
    --bbnn-border: #E5E7EB;
    --bbnn-white: #FFFFFF;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    background: var(--bbnn-white);
    color: var(--bbnn-ink);
    font-family: inherit;
    line-height: 1.5;
    position: relative;
    clear: both;
}

#bbnn-latest * { box-sizing: border-box; }
#bbnn-latest a { text-decoration: none; }
#bbnn-latest img { display: block; max-width: 100%; }

#bbnn-latest .bbnn-latest-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}


/* LATEST-PAGE STRUCTURE FIX
   Blocksy already owns the outer <main>. The plugin now renders a normal div
   inside it, avoiding nested <main> markup. These resets are page-scoped. */
body.bbnn-latest-active #main,
body.bbnn-latest-active main#main,
body.bbnn-latest-active .site-main {
    --theme-content-vertical-spacing: 0px !important;
    --content-vertical-spacing: 0px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.bbnn-latest-active #bbnn-latest {
    margin-top: 0;
    padding-top: 0 !important;
}

/* HERO */
/* V1.6 FULL-WIDTH HERO FIX
   The WordPress Posts page can be placed inside Blocksy's normal page
   container, which makes a child width:100% stop at the container edge.
   Break only the Latest hero out to the viewport while keeping the news
   columns themselves on BBNN's 1280px editorial grid. */
body.bbnn-latest-active #bbnn-latest .bbnn-latest-hero {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

#bbnn-latest .bbnn-latest-hero {
    margin: 0 !important;
    padding: 0;
    min-height: 286px;
    background:
        radial-gradient(circle at 83% 34%, rgba(48, 92, 174, .42) 0, rgba(48, 92, 174, 0) 34%),
        linear-gradient(110deg, #0A1426 0%, #101B30 56%, #15284D 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

#bbnn-latest .bbnn-latest-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -185px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(255,255,255,.018), 0 0 0 160px rgba(255,255,255,.014);
    pointer-events: none;
}

#bbnn-latest .bbnn-latest-hero-inner {
    min-height: 286px;
    padding: 38px 0 36px;
    position: relative;
    z-index: 1;
}

#bbnn-latest .bbnn-latest-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 12px;
    color: rgba(255,255,255,.72);
}
#bbnn-latest .bbnn-latest-breadcrumb a { color: rgba(255,255,255,.72); }
#bbnn-latest .bbnn-latest-breadcrumb a:hover { color: #fff; }
#bbnn-latest .bbnn-latest-breadcrumb strong { color: #fff; font-weight: 600; }

#bbnn-latest .bbnn-latest-kicker {
    margin-bottom: 8px;
    color: rgba(255,255,255,.76);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

#bbnn-latest .bbnn-latest-hero h1 {
    margin: 0 0 8px !important;
    color: #fff !important;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -1.8px;
    font-weight: 700;
}

#bbnn-latest .bbnn-latest-hero p {
    max-width: 700px;
    margin: 0 !important;
    color: rgba(255,255,255,.84);
    font-size: 15px;
}

#bbnn-latest .bbnn-latest-live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: rgba(255,255,255,.72);
    font-size: 11px;
}
#bbnn-latest .bbnn-latest-live-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #18B981;
    box-shadow: 0 0 0 4px rgba(24,185,129,.12);
}

/* MAIN 3-COLUMN LAYOUT */
#bbnn-latest .bbnn-latest-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 275px;
    gap: 24px;
    align-items: start;
    padding-top: 28px;
    padding-bottom: 54px;
}

/* LEFT NAV */
#bbnn-latest .bbnn-latest-left {
    border: 1px solid var(--bbnn-border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

#bbnn-latest .bbnn-latest-all,
#bbnn-latest .bbnn-latest-section-nav a {
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #EEF0F3;
    color: var(--bbnn-ink);
    font-size: 12px;
    font-weight: 600;
}
#bbnn-latest .bbnn-latest-section-nav a:last-child { border-bottom: 0; }
#bbnn-latest .bbnn-latest-all.is-active {
    background: var(--bbnn-red);
    color: #fff;
    border-bottom-color: var(--bbnn-red);
}
#bbnn-latest .bbnn-latest-section-nav a:hover {
    color: var(--bbnn-red);
    background: #FBFBFC;
}
#bbnn-latest .bbnn-latest-all b,
#bbnn-latest .bbnn-latest-section-nav b { font-size: 16px; font-weight: 500; }

/* FEED */
#bbnn-latest .bbnn-latest-center { min-width: 0; }
#bbnn-latest .bbnn-latest-feed-header {
    min-height: 62px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 0 0 11px;
    margin-bottom: 4px;
    border-bottom: 2px solid var(--bbnn-ink);
}
#bbnn-latest .bbnn-latest-eyebrow {
    display: block;
    color: var(--bbnn-red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}
#bbnn-latest .bbnn-latest-feed-header h2 {
    margin: 0 !important;
    color: var(--bbnn-ink);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.3px;
}
#bbnn-latest .bbnn-latest-feed-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
#bbnn-latest .bbnn-latest-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7B8491;
    font-size: 10px;
    white-space: nowrap;
}
#bbnn-latest .bbnn-latest-updated i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #18B981;
}
#bbnn-latest .bbnn-latest-view-toggle {
    display: flex;
    border: 1px solid var(--bbnn-border);
    border-radius: 4px;
    overflow: hidden;
}
#bbnn-latest .bbnn-latest-view-toggle button {
    appearance: none;
    border: 0;
    border-right: 1px solid var(--bbnn-border);
    background: #fff;
    color: #6B7280;
    padding: 7px 9px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
#bbnn-latest .bbnn-latest-view-toggle button:last-child { border-right: 0; }
#bbnn-latest .bbnn-latest-view-toggle button.is-active { background: var(--bbnn-red); color: #fff; }

#bbnn-latest .bbnn-latest-feed.is-list .bbnn-latest-story {
    display: grid;
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bbnn-border);
}
#bbnn-latest .bbnn-latest-story-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 5px;
    background: #E9EDF3;
}
#bbnn-latest .bbnn-latest-story-img,
#bbnn-latest .bbnn-latest-image-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
#bbnn-latest .bbnn-latest-story:hover .bbnn-latest-story-img { transform: scale(1.025); }
#bbnn-latest .bbnn-latest-image-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #101B30, #203B6A);
    color: rgba(255,255,255,.92);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}
#bbnn-latest .bbnn-latest-story-body { min-width: 0; padding: 1px 0; }
#bbnn-latest .bbnn-latest-story-category {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--bbnn-red);
    font-size: 10px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .55px;
}
#bbnn-latest .bbnn-latest-story h3 {
    margin: 0 0 5px !important;
    font-size: 17px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.2px;
}
#bbnn-latest .bbnn-latest-story h3 a { color: var(--bbnn-ink); }
#bbnn-latest .bbnn-latest-story h3 a:hover { color: var(--bbnn-red); }
#bbnn-latest .bbnn-latest-story p {
    margin: 0 0 8px !important;
    color: var(--bbnn-muted);
    font-size: 12px;
    line-height: 1.45;
}
#bbnn-latest .bbnn-latest-story-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #7A8491;
    font-size: 10px;
}
#bbnn-latest .bbnn-latest-dot { color: var(--bbnn-red); }

/* GRID VIEW */
#bbnn-latest .bbnn-latest-feed.is-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 18px;
}
#bbnn-latest .bbnn-latest-feed.is-grid .bbnn-latest-story {
    display: block;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--bbnn-border);
}
#bbnn-latest .bbnn-latest-feed.is-grid .bbnn-latest-story-image { margin-bottom: 12px; }
#bbnn-latest .bbnn-latest-feed.is-grid .bbnn-latest-story h3 { font-size: 18px; }

/* RIGHT SIDEBAR */
#bbnn-latest .bbnn-latest-right {
    display: grid;
    gap: 18px;
}
#bbnn-latest .bbnn-latest-side-card {
    border: 1px solid var(--bbnn-border);
    border-radius: 6px;
    background: #fff;
    padding: 16px;
}
#bbnn-latest .bbnn-latest-side-card h2 {
    margin: 0 !important;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--bbnn-ink);
}
#bbnn-latest .bbnn-latest-red-rule {
    width: 36px;
    height: 3px;
    margin: 8px 0 10px;
    background: var(--bbnn-red);
}
#bbnn-latest .bbnn-latest-headlines {
    list-style: none;
    margin: 0;
    padding: 0;
}
#bbnn-latest .bbnn-latest-headlines li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #EEF0F3;
}
#bbnn-latest .bbnn-latest-headlines li:last-child { border-bottom: 0; padding-bottom: 0; }
#bbnn-latest .bbnn-latest-headlines li > span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bbnn-navy);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
#bbnn-latest .bbnn-latest-headlines a {
    color: var(--bbnn-ink);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
}
#bbnn-latest .bbnn-latest-headlines a:hover { color: var(--bbnn-red); }
#bbnn-latest .bbnn-latest-no-headlines { display: block !important; color: var(--bbnn-muted); font-size: 12px; }

#bbnn-latest .bbnn-latest-regions { display: grid; }
#bbnn-latest .bbnn-latest-regions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #EEF0F3;
    color: var(--bbnn-ink);
    font-size: 12px;
    font-weight: 600;
}
#bbnn-latest .bbnn-latest-regions a:last-child { border-bottom: 0; }
#bbnn-latest .bbnn-latest-regions a:hover { color: var(--bbnn-red); }
#bbnn-latest .bbnn-latest-regions span { font-size: 16px; }

#bbnn-latest .bbnn-latest-live-card {
    padding: 20px;
    border-radius: 6px;
    background: linear-gradient(145deg, #101B30, #172A4E);
    color: #fff;
}
#bbnn-latest .bbnn-latest-live-card > span {
    color: #FF6872;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}
#bbnn-latest .bbnn-latest-live-card h2 {
    margin: 6px 0 6px !important;
    color: #fff !important;
    font-size: 20px;
    line-height: 1.2;
}
#bbnn-latest .bbnn-latest-live-card p {
    margin: 0 0 15px !important;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}
#bbnn-latest .bbnn-latest-live-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 4px;
    background: var(--bbnn-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* PAGINATION */
#bbnn-latest .bbnn-latest-pagination { margin-top: 26px; }
#bbnn-latest .bbnn-latest-pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}
#bbnn-latest .bbnn-latest-pagination a,
#bbnn-latest .bbnn-latest-pagination span {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 9px;
    border: 1px solid var(--bbnn-border);
    border-radius: 4px;
    background: #fff;
    color: var(--bbnn-ink);
    font-size: 11px;
    font-weight: 700;
}
#bbnn-latest .bbnn-latest-pagination .current {
    border-color: var(--bbnn-red);
    background: var(--bbnn-red);
    color: #fff;
}
#bbnn-latest .bbnn-latest-pagination a:hover { border-color: var(--bbnn-red); color: var(--bbnn-red); }

#bbnn-latest .bbnn-latest-empty {
    margin-top: 18px;
    padding: 30px;
    border: 1px solid var(--bbnn-border);
    border-radius: 6px;
    background: var(--bbnn-light);
}
#bbnn-latest .bbnn-latest-empty h3 { margin: 0 0 6px !important; }
#bbnn-latest .bbnn-latest-empty p { margin: 0 !important; color: var(--bbnn-muted); }

/* TABLET */
@media (max-width: 1100px) {
    #bbnn-latest .bbnn-latest-shell { width: min(100% - 40px, 1280px); }
    #bbnn-latest .bbnn-latest-layout {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 22px;
    }
    #bbnn-latest .bbnn-latest-right {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    #bbnn-latest .bbnn-latest-hero,
    #bbnn-latest .bbnn-latest-hero-inner { min-height: 250px; }
    #bbnn-latest .bbnn-latest-hero-inner { padding: 30px 0; }
    #bbnn-latest .bbnn-latest-layout { grid-template-columns: 1fr; }
    #bbnn-latest .bbnn-latest-left { display: none; }
    #bbnn-latest .bbnn-latest-right { grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #bbnn-latest .bbnn-latest-live-card { grid-column: 1 / -1; }
}

/* MOBILE */
@media (max-width: 600px) {
    #bbnn-latest .bbnn-latest-shell { width: calc(100% - 30px); }
    #bbnn-latest .bbnn-latest-hero,
    #bbnn-latest .bbnn-latest-hero-inner { min-height: 230px; }
    #bbnn-latest .bbnn-latest-hero-inner { padding: 24px 0 26px; }
    #bbnn-latest .bbnn-latest-breadcrumb { margin-bottom: 20px; }
    #bbnn-latest .bbnn-latest-hero h1 { letter-spacing: -1px; }
    #bbnn-latest .bbnn-latest-hero p { font-size: 13px; }
    #bbnn-latest .bbnn-latest-layout { padding-top: 20px; padding-bottom: 36px; }
    #bbnn-latest .bbnn-latest-feed-header { align-items: flex-start; flex-direction: column; }
    #bbnn-latest .bbnn-latest-feed-tools { width: 100%; justify-content: space-between; }
    #bbnn-latest .bbnn-latest-feed.is-list .bbnn-latest-story {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 12px;
    }
    #bbnn-latest .bbnn-latest-story h3 { font-size: 15px; }
    #bbnn-latest .bbnn-latest-feed.is-list .bbnn-latest-story p { display: none; }
    #bbnn-latest .bbnn-latest-feed.is-grid { grid-template-columns: 1fr; }
    #bbnn-latest .bbnn-latest-right { grid-template-columns: 1fr; }
    #bbnn-latest .bbnn-latest-live-card { grid-column: auto; }
}
