.overlay-link,
a[style*="position:absolute"][style*="width:100%"] {
    pointer-events: none;
}
/* --- GLOBAL CONFIG --- */
:root {
    --NAVY: #2171cc;
    --GOLD: #999999e0;
    --WHITE: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Jost', sans-serif;
    background-color: #a3a2a2;
    
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.main-header {
    width: 100%;
    height: 180px; /* YOUR SPECIFIC HEIGHT */
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 4px solid #2171cc; /* Professional Navy border */
    overflow: hidden;
}

.header-container {
    width: 850px; /* YOUR SPECIFIC WIDTH */
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.header-logo {
    /* This ensures the logo scales nicely within your 250px height */
    max-height: 250px; 
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}
/* --- NAVIGATION --- */
.navbar {
    background-color: var(--NAVY);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    height: 4em;
    z-index: 9999;

}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    display: block;
    padding: 20px 18px;
    color: var(--WHITE);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    transition: 0.3s;
}

/* 1. Reset the link and hide overflow */
.nav-links > li > a {
    position: relative;
    text-decoration: none;
    display: inline-block;
    color: white; /* Ensure text is visible */
}

/* 2. The Horizontal Line (Start at 0 width) */
.nav-links > li > a::after {
    content: "";
    position: absolute;
    bottom: -2px;      /* Gap below text */
    left: 0;           /* Start at the left side */
    width: 0;          /* Start with NO horizontal width */
    height: 2px;       /* Fixed vertical thickness */
    background-color: white;
    transition: width 0.3s ease; /* Animate the X-axis growth */
}

/* 3. Slide/Grow the line to 100% on hover */
.nav-links > li:hover > a::after {
    width: 100%;       /* Line spans across the X-axis */
}
/* --- LEVEL 2 SUB-MENUS --- */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--WHITE);
    min-width: 300px;
    list-style: none;
    padding: 0;
    /* REMOVE margin: 10px; - This was killing the hover connection */
    margin: 0; 
    
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    
    /* Ensure it stays above the news buttons */
    z-index: 10000; 
}


.sub-menu li {
    position: relative;
    border-bottom: 1px solid #eee;
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.sub-menu li a:hover {
    background-color: #f8f8f8;
    color: var(--NAVY);
}

/* --- LEVEL 3 NESTED MENUS (APPEARING ON THE LEFT) --- */
.nested-menu {
    position: absolute;
    top: 0;
    right: 100%; 
    background-color: var(--WHITE);
    min-width: 300px;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    
    /* Ensure nested menus also stay on top */
    z-index: 10001;
}
/* --- HOVER BEHAVIOR --- */
li:hover > .sub-menu,
li:hover > .nested-menu {
    display: block;
}
/* FORCE COMPACT MOBILE (Every Phone) */
@media screen and (max-width: 1024px) {
    
    /* 1. Smash all fixed widths to 100% */
    .container, .header-container, .main-layout-wrapper, 
    .layout-wrapper, .editors--container, .footer-container,
    .latest-posts-container, .trending-slider-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        display: block !important; /* Stacks sidebars under content */
        box-sizing: border-box !important;
    }

    /* 2. Compact Header & Buttons */
    .main-header {
        height: auto !important;
        min-height: 80px !important;
    }

    .pick-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .pick-title {
        font-size: 18px !important;
    }

    /* Keep Navigation Buttons Small & Visible */
    .pick-nav button, .ctrl-btn {
        width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        display: inline-flex !important;
        z-index: 9999 !important;
    }

    /* 3. Scale down the news boxes */
    .pick-box {
        min-width: 250px !important;
        height: 250px !important;
    }

    .news-card {
        grid-template-columns: 1fr !important; /* Stack image over text */
        width: 100% !important;
    }

    .image-container img {
        height: 180px !important;
    }
}
/* --- MOBILE NAVIGATION COMPACT FIX --- */
@media screen and (max-width: 1024px) {
    
    /* 1. Shrink the Navbar height and fix position */
    .navbar {
        height: 3.5em !important;
        display: flex;
        align-items: center;
        padding: 0 15px;
    }

    /* 2. Hide the desktop horizontal links */
    /* Mobile users should use the sidebar/burger menu instead */
    .nav-links {
        display: none !important;
    }

    /* 3. Scale the Header Logo container */
    .header-container {
        width: 100% !important;
        height: auto !important;
        padding: 10px 0 !important;
    }

    .header-logo {
        max-height: 100px !important; /* Smaller logo for mobile */
        width: auto;
        margin: 0 auto;
    }

    /* 4. Fix Sub-menus (In case they are triggered) */
    .sub-menu, .nested-menu {
        position: static !important;
        width: 100% !important;
        min-width: 100% !important;
        box-shadow: none !important;
        display: none; /* Keep hidden until sidebar is used */
    }
}