/* ========================================================================
   HEADER & NAVIGATION CUSTOMIZATIONS
   ======================================================================== */

/* Header padding */
.header-one-defaults-innermost {
    padding: 10px;
}

/* Astra theme header - primary bar background */
.ast-primary-header-bar {
    background-color: #014d4e;
}

/* Ensure all header container elements have dark background - DESKTOP ONLY */
@media (min-width: 922px) {
    .ast-primary-header-bar .site-primary-header-wrap,
    .ast-primary-header-bar .ast-builder-grid-row,
    .ast-primary-header-bar .site-header-primary-section-center,
    .ast-primary-header-bar .ast-builder-menu-1,
    .ast-primary-header-bar .ast-main-header-bar-alignment,
    .ast-primary-header-bar .main-header-bar-navigation,
    .ast-primary-header-bar .site-navigation,
    .ast-primary-header-bar .main-navigation,
    .ast-primary-header-bar .main-header-menu,
    .ast-main-header,
    .main-header-bar {
        background-color: #014d4e !important;
    }
}

/* Mobile header: white background */
@media (max-width: 921px) {
    .ast-primary-header-bar,
    .ast-primary-header-bar .site-primary-header-wrap,
    .ast-primary-header-bar .ast-builder-grid-row,
    .ast-main-header,
    .main-header-bar {
        background-color: #ffffff !important;
    }
}

/* Menu items in primary header */
.ast-primary-header-bar .menu-item,
.main-header-bar .menu-item,
.ast-main-header-bar-alignment .menu-item {
    background-color: #014d4e;
    font-size: 20px;
}

.ast-primary-header-bar .menu-item a,
.main-header-bar .menu-item a,
.ast-main-header-bar-alignment .menu-item a {
    color: white;
}

/* Hover effects for header menu items */
.ast-primary-header-bar .menu-item a:hover,
.main-header-bar .menu-item a:hover,
.ast-main-header-bar-alignment .menu-item a:hover {
    color: lightblue !important;
}

/* Current menu item styling */
.ast-primary-header-bar .current-menu-item a,
.main-header-bar .current-menu-item a,
.ast-main-header-bar-alignment .current-menu-item a {
    color: #55ff00;
}

/* Search icon color */
.astra-search-icon {
    color: white;
}

/* ========================================================================
   STICKY MENU
   ======================================================================== */

/* Menu starts in normal position */
.main-header-bar {
    position: relative;
    z-index: 999;
    background-color: #0a5f5f;
}

/* When scrolled, switch menu to fixed at top */
body.scrolled .main-header-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    transition: none;
}

/* Adjust top position when WordPress admin bar is present */
body.admin-bar.scrolled .main-header-bar {
    top: 32px !important;
}

/* On smaller screens, admin bar is shorter */
@media screen and (max-width: 782px) {
    body.admin-bar.scrolled .main-header-bar {
        top: 46px !important;
    }
}

/* Make dropdown submenus scrollable when they're too tall */
.main-header-bar .sub-menu {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Adjust max-height when admin bar is present */
body.admin-bar .main-header-bar .sub-menu {
    max-height: calc(100vh - 180px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-header-bar .sub-menu {
        max-height: calc(100vh - 200px);
    }
}

/* ========================================================================
   ANCHOR SCROLL OFFSETS - accounts for sticky header height
   ======================================================================== */
/* Adjust if still landing on wrong element */

#how-to-use-the-acs-website {
    scroll-margin-top: 80px;
}

#subscribe {
    scroll-margin-top: 80px; 
}

/* Universal fallback for all anchors */
[id] {
    scroll-margin-top: 80px;
}


