/* =========================================
   GLOBAL
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* =========================================
   HEADER (TOP BLUE BAR)
   ========================================= */
.scouting-header {
    background-color: #005696; /* updated to match Scouting.org */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-top-bar {
    height: 70px;
    background-color: #005696; /* updated */
    display: flex;
    align-items: center;
}

.header-top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 40px;
}

.header-top-left {
    display: flex;
    align-items: center;
}

/* --- Logo lowered by 2px for pixel-perfect alignment --- */
.scouting-logo {
    width: 260px;
    aspect-ratio: auto 260 / 40;
    height: auto;
    max-width: 260px;
    padding-top: 8px; /* was 6px → lowered by 2px */
}

.header-top-right {
    display: flex;
    align-items: center;
}

.header-top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

/* --- Top-right menu: font-weight increased to 700 --- */
.top-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700; /* updated */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Roboto Slab', serif;
    line-height: 70px;
    padding: 0;
    background-color: transparent;
    transition: opacity 0.2s ease;
}

.top-nav-link:hover {
    opacity: 0.75;
}

/* =========================================
   CENTER NAVIGATION (WHITE BAR)
   ========================================= */
.pack-main-nav-section {
    background-color: #ffffff;
    position: sticky;
    top: 70px;
    z-index: 99;
}

.pack-main-nav-container {
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pack-main-nav-items {
    display: flex;
    gap: 0;
}

/* --- Center nav: font-weight increased to 600 --- */
.pack-nav-link {
    font-family: 'Roboto', sans-serif;
    font-weight: 600; /* updated */
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.25px;

    color: #a5a5a5; /* inactive text */

    height: 50px;
    line-height: 50px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background-color: #ffffff;
    text-decoration: none !important;

    border-bottom: 2px solid transparent;

    transition: background-color 0.2s ease,
                color 0.2s ease,
                border-bottom-color 0.2s ease;
}

.pack-nav-link:hover {
    background-color: #e8f3fa;
    color: #a5a5a5;
    border-bottom-color: transparent;
}

.active-nav-link {
    background-color: #ffffff;
    color: #003F87 !important;
    border-bottom-color: #007BEE;
}

/* =========================================
   HERO
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-background-image {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content-overlay {
    background: linear-gradient(to bottom,
        rgba(0, 92, 156, 0.7) 0%,
        rgba(0, 92, 156, 0) 50%);
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* =========================================
   TITLE OVERLAY
   ========================================= */
.pack-title-section {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    text-align: center;
    width: 100%;
    z-index: 3;
}

.pack-logo-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pack-logo-title-wrapper .pack-title-logo {
    width: 624px;
    height: 96px;
    max-width: 100%;
    margin-bottom: 15px;
}

.pack-title {
    font-size: 2.8em;
    font-weight: bold;
    margin: 0;
    line-height: 1.05em;
}

.location-name {
    font-size: 1.4em;       /* Increased from 0.8em for bold, readable visibility */
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 10px;       /* Fixed tracking instead of overlapping negative margin */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* =========================================
   CONTENT
   ========================================= */
.main-content-section {
    background-color: white;
    padding: 15px 0;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.content-wrapper h1,
.content-wrapper h2 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: rgb(0, 63, 135);
    margin-bottom: 15px;
}

.content-wrapper h1 { font-size: 3.0em; }
.content-wrapper h2 { font-size: 2.5em; }

/* Removes underlines and forces links inside headings to match heading colors */
.content-wrapper h1 a,
.content-wrapper h1 a:visited,
.content-wrapper h2 a,
.content-wrapper h2 a:visited,
.content-wrapper h3 a,
.content-wrapper h3 a:visited {
    text-decoration: none;
    color: rgb(0, 63, 135); /* Explicitly locks the link color to your custom heading blue */
}

/* Optional hover state to give users visual feedback when interacting */
.content-wrapper h1 a:hover,
.content-wrapper h2 a:hover,
.content-wrapper h3 a:hover {
    opacity: 0.8;
}

.content-wrapper p,
.content-wrapper ul {
    font-family: 'Roboto', sans-serif;
    color: rgb(135, 117, 117);
    text-align: left;
}

.content-wrapper li {
    margin-bottom: 10px;
}

/* ==========================================================================
   SIDE-BY-SIDE RESPONSIVE LAYOUT UTILITIES (DESKTOP ENGINE)
   ========================================================================== */
.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    text-align: left;
}

/* Reverses layout direction dynamically (Image Left / Text Right) */
.flex-row.row-reverse {
    flex-direction: row-reverse;
}

.flex-col {
    flex: 1;
    min-width: 280px;
}

.flex-col img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ==========================================================================
   PURE CSS COLLAPSIBLE RESPONSIVE ENGINE (NO-JS HACK MECHANICS)
   ========================================================================== */
.nav-toggle-checkbox,
.nav-hamburger-btn {
    display: none;
}

/* ⚠️ FIXED BREAKPOINT: Increased from 768px to 992px to capture phone landscape viewports */
@media (max-width: 992px) {
    
    /* Reveal Hamburger Icons */
    .nav-hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 22px;
        height: 16px;
        cursor: pointer;
        z-index: 10;
    }

    .header-top-bar-container .nav-hamburger-btn {
        margin-left: auto;
    }
    
    /* White hamburger lines for the top blue utility bar */
    .bar-line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #ffffff;
        transition: transform 0.2s, opacity 0.2s;
    }
    
    /* Blue hamburger lines for the primary white navigation bar */
    .nav-hamburger-btn.dark-theme .bar-line {
        background-color: #005696;
    }

    /* Force menus into hidden vertical drop-downs on mobile viewports */
    .mobile-collapsible-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        background-color: #005696;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, opacity 0.2s;
        position: absolute;
        left: 0;
        z-index: 90;
    }

    /* Top bar dropdown attaches below the 70px utility header */
    .header-top-right.mobile-collapsible-menu {
        top: 70px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    }

    /* Main nav dropdown attaches below the 50px white header */
    .pack-main-nav-items.mobile-collapsible-menu {
        top: 50px;
        background-color: #ffffff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    /* Toggle visibility triggers via pure CSS Checkbox selector engine */
    .nav-toggle-checkbox:checked ~ .mobile-collapsible-menu {
        max-height: 400px;
        opacity: 1;
    }

    /* Drawer contents alignment layouts */
    .header-top-nav ul {
        flex-direction: column;
        padding: 15px 0;
        gap: 15px;
    }

    .top-nav-link {
        line-height: normal;
        font-size: 13px;
        padding: 5px 0;
    }

    .pack-main-nav-items {
        padding: 10px 0;
        gap: 0;
        width: 100%;
    }

    .pack-nav-link {
        width: 100%;
        height: 44px;
        line-height: 44px;
        padding: 0 20px;
        justify-content: flex-start;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .active-nav-link {
        border-bottom: 1px solid #007BEE;
        border-left: 4px solid #007BEE;
        padding-left: 16px;
    }

    /* Mobile transformations for side-by-side content columns */
    .flex-row, .flex-row.row-reverse {
        flex-direction: column-reverse;
        gap: 20px;
    }
    
    .flex-col {
        width: 100%; /* Keeps text and graphics flowing stacked on expanded phone screens */
    }

    /* Fixes center hero logo stretching, distortion, and margins on mobile devices */
    .pack-logo-title-wrapper .pack-title-logo {
        max-width: 90% !important;
        width: 90% !important;
        height: auto !important;
    }
}

/* ==========================================================================
   SMALL SMARTPHONE DISPLAY ADJUSTMENTS
   ========================================================================== */
@media (max-width: 480px) {
    .header-top-bar-container {
        padding: 0 20px;
    }
    .scouting-logo {
        max-width: 80% !important; /* Slightly more indentation on small phones */
    }
    .pack-title {
        font-size: 1.8em;
    }
    .hero-section {
        height: 300px;
    }
}

