/* Universal box-sizing for consistent layout */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    touch-action: pan-y;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

#page {
    background: #fff;
    overflow-x: hidden;
    width: 100%;
}

/* Allow horizontal scroll for carousel elements */
.trending-carousel-track,
[class*="carousel"],
[class*="slider"] {
    touch-action: pan-x;
}

/* Center pagination controls in search-widget */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 24px 0 0 0;
    min-height: 48px;
}
/* Shared styling for Carolina Panorama

/* SITE-WIDE IMPROVEMENTS */

/* Responsive typography with clamp() for natural scaling - 20% smaller */
body {
    font-size: clamp(0.75rem, 0.85vw, 0.875rem);
}

h1 {
    font-size: clamp(1.5rem, 3.2vw, 2rem);
}

h2 {
    font-size: clamp(1.25rem, 2.8vw, 1.75rem);
}

h3 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.headlines-section-header {
    text-align: center !important;
    margin-bottom: 32px !important;
    padding-bottom: 16px !important;
    border-bottom: 3px solid #3b82f6 !important;
}

.headlines-section-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-family: 'Georgia', serif !important;
}


/* ========================================
   AD ZONE CLASSES
   ======================================== */
/* BroadStreet handles positioning/behavior for most ad types through their dashboard.
   These classes provide basic container styling where needed. */

/* In-Story Ad - Auto-injected into article content by JS */
.ad-zone-instory {
    width: 100%;
    max-width: 728px;
    margin: 48px auto;
    padding: 24px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ad-zone-instory {
        margin: 32px auto;
        padding: 16px 0;
    }
}


/* ========================================
   SITE HEADER
   ======================================== */

.site-header {
    width: 100%;
    overflow: visible;
    position: relative;
    z-index: 1000;
}

/* ---- Banner ---- */

.site-banner {
    background: radial-gradient(circle,#1359e0 0%,#036 22%);
    padding: 10px;
    margin: 0px;
    border-radius: 0px;
    position: relative;
    width: 100%;
}

.site-banner-inner {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.site-logo {
    display: flex;
    height: 100%;
    width: 30%;
    align-items: inherit;
    flex-wrap: nowrap;
}

.site-logo img {
    max-height: 180px;
    position: relative;
}

.site-identity {
    color: white;
    width: 70%;
    padding: 0 5px 0 0;
    margin: 0;
    display: flex;
    flex: 1 1 auto !important;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    position: relative;
}

.site-title {
    font-size: clamp(1.6rem, 5.5vw, 4rem) !important;
    font-weight: 900;
    /* Change Font Later: */
    font-family: georgian;
    margin: 0;
    padding: 0;
    line-height: 1.3em;
    letter-spacing: 0;
    text-align: center;
    opacity: 1;
    width: auto;
    height: auto;
    word-break: break-word;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

.site-title a:hover {
    opacity: 0.88;
}

.site-description {
    margin: 0;
    padding: 0 0 10px;
    font-size: clamp(0.85rem, 2.2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.3em;
    text-align: center;
    letter-spacing: 0;
}

.site-text {
    margin-right: auto;
    padding-left: 20px;
}

/* ---- Nav bar ---- */

.site-nav-bar {
    background-color: white;
    margin: 0 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.site-nav-inner {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    position: relative;
    display: flex;
}

/* ---- Primary Navigation ---- */

.main-navigation {
    display: flex;
    align-items: center;
    flex-direction: row;
    list-style-type: none;
    font-weight: 400;
    font-size: 18px;
    line-height: 2em;
    text-align: center;
    width: 100%;
    position: relative;
    justify-content: flex-start;
}

.menu a {
    text-decoration: none;
    color: inherit;
}

ul#primary-menu.menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
}

.menu_item {
    margin-left: 12px;
    white-space: nowrap !important;
    border-radius: .125rem;
    padding: .5rem .375rem;
}

li.menu_item:hover {
    background: #003366;
    color: #fff !important;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
    display: flex;
    align-items: stretch;
}

.main-navigation ul li a {
    display: flex;
    align-items: center;
    color: #1a1a2e;
    text-decoration: none;
    padding: 0 15px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.1px;
    border-bottom: 3px solid transparent;
    height: 50px;
    box-sizing: border-box;
    transition: color 0.18s, border-color 0.18s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-page-ancestor > a {
    color: #003366;
    border-bottom-color: #003366;
}

/* Dropdowns */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    background-attachment: local;
    min-width: 200px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
    z-index: 1001;
    flex-direction: column;
    border-top: 3px solid #003366;
    padding: 6px 0;
    list-style: none;
    margin: 0;
}

.main-navigation ul li:hover > ul {
    display: flex;
}

/* Caret indicator on parent items */
.main-navigation ul li.menu-item-has-children > a::after {
    content: ' \25be'; /* ▾ */
    font-size: 0.75em;
    opacity: 0.55;
    margin-left: 2px;
    transition: opacity 0.15s;
}

.main-navigation ul li.menu-item-has-children:hover > a::after {
    opacity: 1;
}

.main-navigation ul ul li {
    display: block;
    width: 100%;
}

.main-navigation ul ul li a {
    height: auto;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: none;
    color: #1a1a2e;
    width: 100%;
    display: block;
}

.main-navigation ul ul li a:hover {
    background: #f0f4f8;
    color: #003366;
    border-bottom: none;
}

/* ---- Nav search ---- */

.nav-search-wrapper {
    margin-left: auto;
}

.nav-search-form {
    display: flex;
    align-items: center;
    max-width: 400px;
    width: 100%;
    margin-right: auto;
}

.nav-search-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
    margin: .5rem 0;
    text-transform: unset;
}

.nav-search-input:focus {
    border-color: #003366;
    background: #fff;
}

.nav-search-input::placeholder {
    color: #a0aec0;
}

.nav-search-button {
    padding: 8px 16px;
    background: #003366;
    color: white;
    border: 1px solid #2563eb;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-search-button:hover {
    background: #00234d;
    border-color: #00234d;
}

.nav-search-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.nav-divider {
    margin-top: 0px;
    color: #eee;
    width: 80%;
}

.nav-ad-banner {
    width: 80%;
    margin: auto;
    padding: 5px
}

.site-nav-inner .menu-toggle {
    display: none;
}

.home-page-sidebar {
    margin-left: auto !important;
}

/* ---- Hamburger ---- */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a1a2e;
    padding: 12px 6px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .nav-search-input { width: 140px; }
    .main-navigation ul li a { padding: 0 10px; }
}

@media (max-width: 768px) {
    .site-banner { padding: 18px 16px; }

    .site-banner-inner {
        gap: 14px;
        flex-direction: column;
        align-items: center;
    }

    .site-logo {
        display: none;
    }

    .site-identity {
        width: 100%;
        text-align: center;
    }

    .site-logo-img,
    .site-logo .custom-logo { height: 64px; }

    /* Reset site-text on mobile — no left push */
    .site-text {
        margin-right: 0;
        padding-left: 0;
    }

    /* Two-row nav: no hamburger needed */
    .menu-toggle {
        display: none;
    }

    .site-nav-inner {
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 0;
        gap: 0;
        align-items: stretch;
    }

    /* Row 1: search bar */
    .nav-search-wrapper {
        order: 1;
        width: 100%;
        margin-left: 0;
        padding: 6px 12px;
        box-sizing: border-box;
        border-bottom: 1px solid #e2e8f0;
    }

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

    /* Row 2: navigation with wrapping */
    .main-navigation {
        order: 2;
        width: 100%;
        padding: 0;
    }

    .main-navigation ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 4px;
        margin: 0;
        border-bottom: 2px solid #e2e8f0;
        gap: 4px;
    }

    .main-navigation ul li {
        flex-shrink: 0;
        display: flex;
    }

    .main-navigation ul li a {
        height: 40px;
        padding: 0 10px;
        font-size: 0.75rem;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .main-navigation ul li.current-menu-item > a,
    .main-navigation ul li.current-page-ancestor > a {
        border-bottom-color: #003366;
        color: #003366;
    }

    /* No dropdowns on mobile — tap the parent link */
    .main-navigation ul ul {
        display: none !important;
    }

    /* Hide caret on mobile since submenus are suppressed */
    .main-navigation ul li.menu-item-has-children > a::after {
        display: none;
    }

    .site-nav-bar { 
        margin: 0; 
        width: 100%;
        max-width: 100%;
    }

    main { 
        margin: 0 4%;
    }

    .nav-divider,
    .nav-ad-banner {
        width: 100%;
        max-width: 100%;
    }

    /* Force all grids to single column on mobile */
    .headlines-grid,
    .articles-with-sidebar,
    [class*=\"grid\"] {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* ========================================
   MAIN CONTENT
   ======================================== */

main {
    margin: 0 10%;
}

/* ========================================
   ARTICLES PAGE SIDEBAR LAYOUT
   ======================================== */

.articles-with-sidebar {
    display: grid;
    grid-template-columns: 1fr minmax(200px, 280px);
    gap: 32px;
    align-items: start;
}

.articles-main-content {
    min-width: 0; /* prevents grid blowout */
}

.articles-sidebar {
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-ad-zone {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 16px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

@media (max-width: 960px) {
    .articles-with-sidebar {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    .articles-main-content {
        width: 100%;
        max-width: 100%;
    }
    .articles-sidebar {
        position: static;
        width: 100%;
        max-width: 100%;
    }
}

/* ---- Nav divider & ad banner (below sticky nav) ---- */

.nav-divider {
    margin: 0 auto;
    color: #eee;
    width: 80%;
}

.nav-ad-banner {
    width: 80%;
    margin: 0 auto;
    padding: 5px;
}


/* ========================================
   SITE FOOTER
   ======================================== */

footer {
    background: #003366;
    color: white;
    /* Change Font Later: */
    font-family: 'Arial';
    padding: 20px 0;
    margin: 40px 0 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-inner{
    display: flex;
    justify-content: center;
    flex-direction: column;
}

/* --- Row 1: CTA --- */

.footer-cta {
    text-align: center;
    padding: 5px 10%;
    flex: 1 1 auto !important;
    position: relative;
}

.footer-cta-heading {
    font-size: 35px;
    font-weight: 500;
}

.footer-cta-text {
    margin: 0 auto 10px;
    max-width: 600px;
    padding: 0 16px;
    font-size: 14px;
}

.footer-cta-btn {
    background-color: #d1fadfff;
    color: #003366;
    border-radius: 10px;
    text-decoration: none;
    padding: 12px 40px;
    border-width: 1px;
    border-style: solid;
    cursor: pointer;
    position: relative;
    font-weight: 900;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    min-width: 200px;
    max-width: min(80%, 340px);
    display: inline-block;
    box-sizing: border-box;
    margin: 10px auto;
}

.footer-cta-btn:hover {
    background: #2fc4b1;
    transform: translateY(-1px);
    color: #001433;
}

/* --- Divider --- */

.footer-divider {
    width: 100%;
    border-top: 1px solid #aaa 40%;
    margin: 10px auto;
}

/* --- Row 2: Links grid --- */

.footer-links {
    margin: 0 auto;
    box-shadow: none;
    padding: 15px 0;
    width: 90%;
    display: flex;
    position: relative;
}

.footer-grid {
    width: 100%;
    color: white;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    position: relative;
    flex-direction: row;
}

.footer-col {
    padding: 10px 5px;
    flex: 1 1 160px;
    min-width: 140px;
    margin: 0;
    position: relative;
}

.footer-col a {
    color: white;
    text-decoration: none;
}

.footer-col-heading {
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    transition: color 0.15s;
}

.footer-col ul li a:hover {
    color: #fff;
}

/* --- Social icons --- */

.footer-social {
    display: flex;
    flex-wrap: wrap;
}

.footer-social-link {
    cursor: pointer;
    display: block;
    padding: 1rem;
    text-align: center;
}

.footer-social img {
    height: 20px;
    width: 20px;
}

/* --- Row 3: Copyright --- */

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 18px 0;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .footer-col {
        flex: 1 1 45%;
    }
}

@media (max-width: 480px) {
    .footer-col { flex: 1 1 100%; }
    .footer-cta { padding: 40px 16px 0; }
    main { margin: 0 2%; }
}
