:root {
    --primary: #002868; /* Old Glory Blue */
    --accent: #bf0a30;  /* Old Glory Red */
    --bg-light: rgba(255, 255, 255, 0.95);
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --shadow: 0 0.625rem 2.5rem rgba(0, 40, 104, 0.1);
    --glass-border: rgba(0, 40, 104, 0.08);
    --gray-bg: #f8fafc;
    --dark-bg: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background: #f0f2f5;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

#main-container {
    width: 100%;
}

/* --- SECTION 1: MAP VIEW --- */
#map-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 26.25rem;
    background: var(--bg-light);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
    border-right: 0.0625rem solid var(--glass-border);
    transition: transform 0.3s ease-in-out;
    border-bottom-right-radius: 0.75rem;
    overflow: visible;
}

#ui-overlay.collapsed {
    bottom: auto !important;
    border-bottom: 0.0625rem solid var(--glass-border);
    overflow: visible;
}

#ui-overlay.collapsed #results-sidebar {
    display: none !important;
}

.toggle-trigger {
    display: flex;
    justify-content: center;
    padding: 0.625rem 0;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    z-index: 1001;
    border-radius: 0 0 0.75rem 0.75rem;
}

.toggle-trigger:hover {
    background: rgba(0, 0, 0, 0.03);
}

.arrow-icon {
    width: 0.875rem;
    height: 0.875rem;
    border-bottom: 0.22rem solid var(--accent);
    border-right: 0.22rem solid var(--accent);
    transform: rotate(-135deg);
    /* Points Up */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0.3125rem 0 -0.3125rem 0;
}

#ui-overlay.collapsed .arrow-icon {
    transform: rotate(45deg);
    /* Points Down */
    margin: -0.3125rem 0 0.3125rem 0;
}

header {
    padding: 1.25rem 1.5rem 0.3125rem 1.5rem;
}
.logo-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 0.125rem;
}
.logo {
    height: 1.75rem;
    display: block;
    width: auto;
}
header p { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-top: 0.1rem; }
.about-btn-link {
    background: rgba(0, 40, 104, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 0.4rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-family: inherit;
}
.about-btn-link:hover {
    background: rgba(0, 40, 104, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
}
#controls {
    padding: 0 1.5rem 0.625rem 1.5rem;
}

.search-box { display: flex; gap: 0.625rem; margin-bottom: 0.9375rem; }

input { 
    flex: 1; 
    padding: 0.875rem 1.25rem; 
    border-radius: 1rem; 
    border: 0.0625rem solid rgba(0, 0, 0, 0.08); 
    outline: none; 
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s; 
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 0.25rem rgba(0, 40, 104, 0.05); }

button#search-btn { 
    background: var(--primary); 
    color: white; 
    border: none; 
    padding: 0 1.5rem; 
    border-radius: 1rem; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.95rem;
    white-space: nowrap;
    height: 3rem;
    transition: all 0.2s; 
}
button#search-btn:hover { background: #001a45; transform: translateY(-0.0625rem); }

/* --- FILTERS UI --- */
#filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9375rem;
    gap: 0.5rem;
}
.filters-wrapper {
    position: relative;
    z-index: 4001; /* Ensure button and panel are higher than map markers */
}
.filters-btn {
    background: transparent;
    border: 0.0625rem solid var(--glass-border);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    font-family: inherit;
}
.filters-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}
.filters-btn .chevron {
    width: 0.45rem;
    height: 0.45rem;
    border-width: 0.12rem;
    margin-top: -0.1rem;
    transition: transform 0.3s;
    animation: none; /* remove bounce */
}
.filters-btn.active .chevron {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
}
.filters-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 17rem;
    z-index: 5000;
    background: white;
    border: 0.0625rem solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

#clear-filters-btn {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: #f8fafc;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

#clear-filters-btn:hover {
    background: white;
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(191, 10, 48, 0.08);
    transform: translateY(-1px);
}

#clear-filters-btn:active {
    transform: translateY(0);
}
.filters-panel.hidden {
    display: none !important;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
}
.filter-option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    cursor: pointer;
    border-radius: 0.25rem;
}
.filter-option:hover {
    color: var(--primary);
}

#stats { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; margin-top: 0; white-space: nowrap; }

#results-sidebar { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    border-top: 0.0625rem solid var(--glass-border); 
}
#job-list-container { flex: 1; overflow-y: auto; padding: 0; }

.job-item { 
    padding: 1.5rem; 
    background: transparent;
    border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.04); 
    transition: all 0.2s ease; 
    cursor: pointer; 
}
.job-item:hover { 
    background: #f1f5f9; 
}
.job-item h3 { font-size: 1rem; color: var(--primary); margin-bottom: 0.25rem; line-height: 1.4; }
.job-item .agency { color: var(--accent); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03125rem; }
.job-item .details { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

.salary-list { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text-main); }

/* --- PAGINATION STYLES --- */
.pagination { 
    display: flex; 
    justify-content: center; 
    gap: 1rem; 
    padding: 1.5rem; 
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.pagination button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.pagination button:hover {
    background: #001a45;
    transform: translateY(-1px);
}

/* --- SCROLL NAV BUTTONS --- */
.scroll-up-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 3.125rem;
    box-shadow: 0 0.625rem 1.875rem rgba(0, 40, 104, 0.2);
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09375rem;
    top: 2.5rem; 
    background: white; 
    color: var(--primary); 
    z-index: 2002;
}

.scroll-up-btn:hover { 
    transform: translateX(-50%) translateY(0.3125rem); 
    box-shadow: 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.1); 
}



.chevron {
    width: 0.5625rem;
    height: 0.5625rem;
    border-bottom: 0.15625rem solid currentColor;
    border-right: 0.15625rem solid currentColor;
}

.chevron.down { 
    transform: rotate(45deg); 
    margin-top: -0.25rem; /* Centering tweak for rotation */
    animation: bounceDown 2s infinite; 
}

.chevron.up { 
    transform: rotate(-135deg); 
    margin-top: 0.25rem; /* Centering tweak for rotation */
    animation: bounceUp 2s infinite; 
}

@keyframes bounceDown { 0%, 100% {transform: rotate(45deg) translate(0,0);} 50% {transform: rotate(45deg) translate(0.125rem,0.125rem);} }
@keyframes bounceUp { 0%, 100% {transform: rotate(-135deg) translate(0,0);} 50% {transform: rotate(-135deg) translate(0.125rem,0.125rem);} }

/* --- SECTION 2: INFO LAYOUT --- */
#info-section {
    width: 100%;
    position: relative;
    z-index: 2001;
    background: white;
}

.full-section {
    width: 100%;
    padding: 4.5rem 1.25rem;
    display: flex;
    justify-content: center;
    text-align: center;
}

.full-section h2 { 
    font-size: clamp(1.75rem, 4vw, 2.5rem); 
    margin-bottom: 2rem; 
    color: var(--primary); 
    font-weight: 600;
}

.content-wrapper {
    max-width: 75rem;
    width: 100%;
}

.hero-lite { padding: 5.5rem 1.25rem 3.5rem 1.25rem; }
.hero-lite h2 { 
    font-size: clamp(2rem, 6vw, 3.25rem); 
    margin-bottom: 1rem; 
    letter-spacing: -0.05rem; 
}
.subtitle { 
    font-size: clamp(1.1rem, 2.5vw, 1.25rem); 
    color: var(--text-muted); 
    max-width: 65rem; 
    margin: 0 auto; 
    line-height: 1.6; 
}

.bg-gray { background: var(--gray-bg); }
.bg-dark { background: var(--dark-bg); color: white; padding: 4rem 1.25rem; text-align: left; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 3rem;
}

.feature-block { text-align: left; }
.feature-block h3 { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--primary); font-weight: 600; }
.feature-block p { color: var(--text-muted); line-height: 1.6; font-size: 1rem; }

.path-section { border-top: 0.0625rem solid #edf2f7; }

.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
}

.path-item { text-align: left; background: white; padding: 2rem; border-radius: 1.25rem; box-shadow: 0 0.25rem 1.25rem rgba(0,0,0,0.03); border: 0.0625rem solid #f1f5f9; }
.path-item h4 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--accent); }
.path-item p { color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }

.mission-text { font-size: 1rem; opacity: 0.8; margin-bottom: 1rem; line-height: 1.6; max-width: none; }
.data-attribution { font-size: 0.85rem; opacity: 0.6; }
.data-attribution a { color: white; text-decoration: underline; }

/* --- SEO Discovery Section --- */
.border-top { border-top: 0.0625rem solid #edf2f7; }
.seo-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.seo-link {
    display: block;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 1rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-align: left;
}

.seo-link:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 40, 104, 0.08);
    transform: translateY(-2px);
}

.hidden { display: none !important; }

@media (max-width: 48rem) {
    #map-section {
        position: relative;
        height: 100vh;
        width: 100vw;
    }

    #ui-overlay { 
        position: fixed;
        top: 0;
        left: 0;
        width: 100%; 
        height: auto; 
        max-height: 100vh;
        background: #ffffff;
        z-index: 2000;
        box-shadow: 0 0.125rem 0.625rem rgba(0,0,0,0.1);
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    #ui-overlay:not(.collapsed) {
        height: 100vh;
    }



    #map { 
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin-top: 135px; /* Aligned with typical header height */
        z-index: 1;
    }

    #results-sidebar {
        position: relative;
        top: 0;
        width: 100%;
        flex: 1;
        background: white;
        z-index: 1500;
        overflow-y: auto;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    header { padding: 0.75rem 1rem 0.15rem 1rem; }
    #controls { padding: 0 1rem 0rem 1rem; }

    .toggle-trigger {
        background: white;
        padding: 0.1rem 0 0.8rem 0; /* Tighter padding to dock better */
        z-index: 2001;
        position: relative;
        flex-shrink: 0;
    }

    .search-box { 
        flex-direction: row; 
        gap: 0.4rem;
        margin-bottom: 0.5rem;
    }
    
    input { padding: 0.6rem 0.8rem; font-size: 0.9rem; }

    button#search-btn {
        width: auto;
        padding: 0 1rem;
        height: 2.8rem;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    /* Restore missing mobile tweaks */
    .hero-lite { padding: 8.5rem 1.25rem 2.5rem 1.25rem; }
    .hero-lite h2 { font-size: 2.2rem; letter-spacing: -0.05rem; margin-top: 0; }
    .subtitle { font-size: 1.1rem; }
    .feature-grid { gap: 2rem; }
    .full-section { padding: 3rem 1.25rem; }
    .path-content h2 { font-size: 1.8rem; }

    .scroll-up-btn {
        top: 1.5rem;
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
    }


}
/* --- BLOG SECTION STYLES --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 2.5rem;
    text-align: left;
    margin-top: 3rem;
}

.blog-card {
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-0.5rem);
    border-color: var(--primary);
    box-shadow: 0 1.25rem 3rem rgba(0, 40, 104, 0.08);
}

.blog-card-image {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.blog-card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-content h3 {
    color: var(--primary);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-weight: 600;
}

.blog-card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.blog-card-link {
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card.placeholder {
    opacity: 0.75;
    background: #fcfcfc;
    border-style: dashed;
    cursor: default;
}

.blog-card.placeholder:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.blog-card.placeholder .blog-card-link {
    color: var(--text-muted);
}

@media (max-width: 48rem) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
