/* ============================
   RESPONSIVE VARIABLES
   Adjust these to tune sizes across all breakpoints
   ============================ */
:root {
    --header-height-mobile: 96px;
    --header-height: 60px;
    --logo-max-height: 90px;
    --logo-margin-left: 375px;
    --nav-gap: 250px;
    --brand-left-align: 0px;

    --ticker-item-width: 150px;
    --ticker-item-gap: 45px;

    --sidebar-thumb-width: 150px;
    --sidebar-thumb-height: 110px;
}

/* Prevent 100vw elements from creating a horizontal scrollbar on mobile/desktop */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.page-id-2415 .entry-title,
.page-id-2415 .page-title,
.page-id-2415 h1.wp-block-post-title {
    display: none !important;
}

/* ============================
   1. STICKY HEADER — Mobile first (base styles)
   ============================ */
body:not(.fse-enabled) #masthead.custom-sticky-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none !important;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 9999;
    padding-left: 0;
    padding-right: 0;
}

/* Push sticky header below WordPress admin bar when logged in */
body.admin-bar:not(.fse-enabled) #masthead.custom-sticky-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar:not(.fse-enabled) #masthead.custom-sticky-header {
        top: 46px;
    }
}

.site-content {
    padding-top: var(--header-height-mobile);
}

.custom-sticky-header .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 8px 12px;
    box-sizing: border-box;
    gap: 10px;
}

.custom-sticky-header .site-branding {
    margin-left: var(--brand-left-align);
    flex-shrink: 0;
}

.custom-sticky-header .site-branding img {
    max-height: 46px;
    width: auto;
    display: block;
}

/* Nav link base sizing (mobile) */
.custom-sticky-header .main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 10px;
    flex-wrap: wrap;
}

.custom-sticky-header .main-navigation ul li {
    margin: 0 !important;
    padding: 0;
}

.custom-sticky-header .main-navigation ul li a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2c3338;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.custom-sticky-header .main-navigation ul li a:hover {
    color: #0073aa;
}

.custom-sticky-header .main-navigation ul li.nav-button a {
    background-color: #FAAF02;
    color: #0073aa;
    padding: 5px 12px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
    transition: all 0.3s ease;
}

.custom-sticky-header .main-navigation ul li.nav-button a:hover {
    color: #ffffff;
    background-color: #005177;
    transform: translateY(-2px);
}

/* Tablet and up: restore larger logo + single-line header height */
@media (min-width: 768px) {
    .site-content {
        padding-top: var(--header-height);
    }

    .custom-sticky-header .header-inner {
        justify-content: flex-start;
        padding: 12px 20px;
        gap: 30px;
    }

    .custom-sticky-header .site-branding img {
        max-height: 70px;
    }

    .custom-sticky-header .main-navigation ul {
        justify-content: flex-start;
        gap: 12px;
    }

    .custom-sticky-header .main-navigation ul li a {
        font-size: 15px;
    }

    .custom-sticky-header .main-navigation ul li.nav-button a {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Desktop/laptop and up: full original spacing */
@media (min-width: 1024px) {
    .custom-sticky-header .header-inner {
        padding: 15px 30px;
        gap: var(--nav-gap);
    }

    .custom-sticky-header .site-branding {
        margin-left: var(--logo-margin-left);
    }

    .custom-sticky-header .site-branding img {
        max-height: var(--logo-max-height);
    }

    .custom-sticky-header .main-navigation ul li a {
        font-size: 16px;
    }

    .custom-sticky-header .main-navigation ul li.nav-button a {
        font-size: 16px;
        padding: 10px 24px;
    }
}

/* Wide screens: give the logo margin a bit more breathing room */
@media (min-width: 1600px) {
    .custom-sticky-header .site-branding {
        margin-left: calc(var(--logo-margin-left) + 40px);
    }
}


/* ============================
   2. MOBILE HERO & TEXT ALIGNMENT FIXES (< 768px only)
   ============================ */
@media (max-width: 767px) {
    /* Reset large desktop left-margins/paddings inside Cover and Group blocks on mobile */
    .wp-block-cover__inner-container,
    .wp-block-cover .wp-block-group,
    .wp-block-group {
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Keep the yellow left border accent on the hero text without pushing it off-screen */
    .wp-block-cover .wp-block-group[style*="border-left"] {
        padding-left: 12px !important;
        margin-left: 0 !important;
    }
}


/* ============================
   3. TICKER — Full-Bleed Across Full Screen
   ============================ */
.ticker-wrap {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
    padding-top: 25px;
    padding-bottom: 15px;
    box-sizing: border-box;
}

.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-ltr 60s linear infinite;
}

.ticker-item {
    position: relative;
    flex-shrink: 0;
    margin-right: 20px;
    width: 110px;
}

.ticker-item a {
    display: block;
}

.ticker-image-wrap {
    width: 110px;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
}

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

.ticker-fallback {
    width: 110px;
    height: 110px;
    background-color: #062631;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 0 8px;
    box-sizing: border-box;
    font-size: 12px;
}

.ticker-thumb,
.ticker-fallback {
    transition: transform 0.3s ease;
}

.ticker-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 110px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    padding: 0px 6px 6px;
    box-sizing: border-box;
    max-height: 2.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.6);
}

.ticker-item:hover .ticker-thumb,
.ticker-item:hover .ticker-fallback {
    transform: scale(1.12);
}

/* Tablet and up: restore full-size thumbnails */
@media (min-width: 768px) {
    .ticker-wrap {
        padding-top: 60px;
        padding-bottom: 20px;
    }

    .ticker-track {
        animation-duration: 80s;
    }

    .ticker-item {
        width: var(--ticker-item-width);
        margin-right: var(--ticker-item-gap);
    }

    .ticker-image-wrap {
        width: var(--ticker-item-width);
        height: var(--ticker-item-width);
    }

    .ticker-fallback {
        width: var(--ticker-item-width);
        height: var(--ticker-item-width);
        font-size: 13px;
    }

    .ticker-caption {
        width: var(--ticker-item-width);
        font-size: 13px;
        padding: 0px 9px 8px;
    }
}

/* Desktop/wide: slow the animation for a calmer scroll on bigger screens */
@media (min-width: 1024px) {
    .ticker-track {
        animation-duration: 100s;
    }
}

@keyframes ticker-ltr {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}


/* ============================
   4. CUSTOM SIDEBAR SCROLLER
   ============================ */
.nsn-custom-scroller {
    width: 100%;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nsn-custom-scroller::-webkit-scrollbar {
    width: 6px;
}
.nsn-custom-scroller::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}
.nsn-custom-scroller::-webkit-scrollbar-thumb {
    background-color: #062631;
    border-radius: 3px;
}

/* Card Wrapper — Mobile First (Stacked cleanly) */
.nsn-scroller-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.nsn-scroller-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Thumbnail Link & Image (Full width on mobile) */
.nsn-scroller-thumb-link {
    display: block;
    width: 100%;
    height: 185px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    text-decoration: none;
}

.nsn-scroller-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.nsn-scroller-thumb-link:hover .nsn-scroller-img {
    transform: scale(1.05);
}

.nsn-scroller-fallback {
    width: 100%;
    height: 100%;
    background-color: #062631;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    font-weight: 700;
    font-size: 14px;
    box-sizing: border-box;
}

/* Right-side Content */
.nsn-scroller-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.nsn-scroller-title {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.nsn-scroller-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nsn-scroller-title a:hover {
    color: #0073aa;
}

/* Author / Date / Comments row */
.nsn-scroller-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
}

/* Yellow "READ MORE" button */
.nsn-scroller-btn {
    display: inline-block;
    background-color: #FAAF02;
    color: #0f172a !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: 3px;
    text-decoration: none !important;
    margin-top: 2px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nsn-scroller-btn:hover {
    background-color: #005177;
    color: #ffffff !important;
}

/* Tablet & Desktop (768px+): Switch to side-by-side layout */
@media (min-width: 768px) {
    .nsn-scroller-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 18px;
    }

    .nsn-scroller-thumb-link {
        width: var(--sidebar-thumb-width);
        height: var(--sidebar-thumb-height);
    }
}

.articlestitle {
    align-content: center;
}

/* ============================
   5. FLIPCARD COMPONENT
   ============================ */
.nsn-flipcard-container {
    perspective: 1200px;
    max-width: 580px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    outline: none;
    user-select: none;
}

.nsn-card-flipper {
    position: relative;
    width: 100%;
    min-height: 480px;
    height: 520px;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
    cursor: pointer;
}

.nsn-card-flipper.is-flipped {
    transform: rotateY(180deg);
}

.nsn-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    padding: 28px;
    box-sizing: border-box;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.nsn-flipcard-container:hover .nsn-card-face {
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.06);
}

.nsn-card-back {
    transform: rotateY(180deg);
}

.nsn-card-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.nsn-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.nsn-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 0;
    line-height: 1.3;
}

.nsn-card-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

.nsn-card-body::-webkit-scrollbar {
    width: 5px;
}
.nsn-card-body::-webkit-scrollbar-track {
    background: #f8fafc;
}
.nsn-card-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.nsn-members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nsn-member-item {
    font-size: 0.92rem;
    line-height: 1.45;
    color: #334155;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 8px;
}

.nsn-member-item strong {
    display: block;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.96rem;
}

.nsn-member-role {
    font-size: 0.84rem;
    color: #64748b;
}

.nsn-card-footer {
    margin-top: 12px;
    padding-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.nsn-click-hint {
    font-size: 0.78rem;
    color: #FAAF02;
    font-weight: 500;
}

.nsn-dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.nsn-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.nsn-dot:hover {
    background-color: #94a3b8;
    transform: scale(1.15);
}

.nsn-dot.is-active {
    background-color: #2563eb;
    width: 24px;
    border-radius: 12px;
}