/**
 * Shared “premium” header / top-bar / nav link styles.
 * Previously duplicated in <head> and footer <style> on many pages.
 * Load after page-specific <style> blocks, before site-responsive.css.
 */

/* --- Fixed site chrome (all public pages including home) --- */
html.ha-unified header#header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

html.ha-unified header#header.scrolled .top-bar,
html.ha-unified header#header.ha-header-scrolled .top-bar {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-bottom-width: 0;
}

/* --- Premium Header Alignment Restructured --- */
html.ha-unified .main-nav-container {
    padding-block: clamp(10px, 1.5vw, 14px) !important;
}

html.ha-unified .main-nav-container .container {
    padding-inline: var(--gutter, clamp(16px, 4vw, 40px));
}

html.ha-unified .main-nav-container nav {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100%;
    position: relative !important;
    gap: clamp(12px, 2vw, 24px);
}

html.ha-unified .nav-logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent !important;
    min-width: 56px;
    max-width: none;
    order: 1;
}

html.ha-unified .nav-logo img {
    display: block;
    margin-inline: auto;
    max-width: none !important;
    width: auto !important;
    height: clamp(52px, 5vw, 64px) !important;
    max-height: 64px !important;
    min-width: 48px;
    object-fit: contain;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

html.ha-unified #mobile-toggle.mobile-toggle,
html.ha-unified .mobile-toggle {
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
}

html.ha-unified .nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(10px, 1.2vw, 22px);
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    padding: 0;
    flex-wrap: nowrap;
    order: 2;
}

html.ha-unified .nav-links a {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    flex-shrink: 0;
    text-decoration: none;
}

html.ha-unified .header-cta {
    flex-shrink: 0;
}

html.ha-unified header.scrolled .main-nav-container,
html.ha-unified header.ha-header-scrolled .main-nav-container {
    padding-block: 8px !important;
}

@media (min-width: 1201px) {
    html.ha-unified #mobile-toggle.mobile-toggle,
    html.ha-unified .mobile-toggle {
        display: none !important;
    }

    html.ha-unified .nav-links {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (min-width: 1201px) and (max-width: 1380px) {
    html.ha-unified .nav-links {
        gap: clamp(6px, 0.8vw, 14px);
    }

    html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact) {
        font-size: clamp(0.88rem, 0.25vw + 0.82rem, 0.98rem) !important;
        padding: 8px 2px !important;
    }
}

@media (min-width: 1201px) {
    html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact) {
        font-size: clamp(0.94rem, 0.35vw + 0.86rem, 1.06rem) !important;
        padding: 10px 4px !important;
    }
}

@media (max-width: 1024px) {
    html.ha-unified .header-cta {
        display: none;
    }
}

/* --- Premium Header Aesthetics Enhancement --- */
html.ha-unified header#header {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(0, 130, 36, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
    transition: box-shadow 0.35s ease, background 0.35s ease !important;
}

html.ha-unified header#header.scrolled,
html.ha-unified header#header.ha-header-scrolled {
    box-shadow: 0 10px 30px rgba(0, 115, 5, 0.08) !important;
    background: rgba(255, 255, 255, 0.99) !important;
}

html.ha-unified .top-bar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    pointer-events: none !important;
}

html.ha-unified {
    --site-fixed-header-offset: calc(4.75rem + env(safe-area-inset-top, 0px));
}

html.ha-unified .top-action-btn a {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    padding: 6px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.top-action-btn a:hover {
    background: white !important;
    color: #006b04 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25) !important;
}

/* Top bar: long phone/email from admin — wrap cleanly instead of mid-line breaks */
.top-bar .top-bar-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
}

.top-contact-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px clamp(12px, 2.5vw, 28px);
    min-width: 0;
    flex: 1 1 220px;
}

.top-contact-info a {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.top-action-btn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 1200px) {
    html.ha-unified #mobile-toggle.mobile-toggle,
    html.ha-unified .mobile-toggle {
        order: 2;
        margin-left: auto;
    }

    html.ha-unified .nav-links {
        order: 3;
        flex: none;
        width: 100%;
        margin-left: 0;
    }
}

/* Text nav links */
html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact) {
    color: #1a1f1b !important;
    font-weight: 600 !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    letter-spacing: 0.01em !important;
    line-height: 1.3 !important;
    position: relative !important;
    transition: color 0.25s ease !important;
}

html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact):hover,
html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact).active-link,
html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact).ha-nav-active {
    color: #007305 !important;
}

html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact)::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 0 !important;
    margin-inline: auto !important;
    background: linear-gradient(90deg, #007305, #00a62e) !important;
    height: 2px !important;
    border-radius: 2px !important;
    bottom: 0 !important;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact):hover::after,
html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact).active-link::after,
html.ha-unified .nav-links a:not(.nav-btn):not(.nav-link--contact).ha-nav-active::after {
    width: 100% !important;
}

/* Contact CTA in main nav */
html.ha-unified .nav-links a.nav-link--contact {
    background: linear-gradient(135deg, #007305 0%, #005a04 100%) !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    font-size: clamp(0.88rem, 0.3vw + 0.82rem, 0.98rem) !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 14px rgba(0, 115, 5, 0.28) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
    border: none !important;
    text-transform: none !important;
    margin-left: 4px;
}

html.ha-unified .nav-links a.nav-link--contact::after {
    display: none !important;
}

html.ha-unified .nav-links a.nav-link--contact:hover,
html.ha-unified .nav-links a.nav-link--contact.ha-nav-active {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 115, 5, 0.38) !important;
    background: linear-gradient(135deg, #008224 0%, #006b04 100%) !important;
}

/* Admission dropdown: css/nav-admission-dropdown.css (load last) */

html.ha-unified .header-cta .nav-btn,
html.ha-unified .nav-links a.nav-btn {
    background: linear-gradient(135deg, #008224 0%, #006b04 100%) !important;
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 15px rgba(0, 130, 36, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-transform: uppercase !important;
    border: none !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.header-cta .nav-btn:hover,
.nav-links a.nav-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 130, 36, 0.4) !important;
    background: linear-gradient(135deg, #00962a 0%, #007305 100%) !important;
    color: white !important;
}

.header-cta .nav-btn::after,
.nav-links a.nav-btn::after {
    display: none !important;
}

/* Mobile / tablet drawer links — larger tap targets */
@media (max-width: 1200px) {
    html.ha-unified .nav-links.active a:not(.nav-btn):not(.nav-link--contact) {
        font-size: 1.05rem !important;
        padding: 16px 20px !important;
        font-weight: 600 !important;
    }

    html.ha-unified .nav-links.active a.nav-link--contact {
        margin: 8px 16px 12px !important;
        text-align: center;
        justify-content: center;
        display: flex !important;
        width: calc(100% - 32px) !important;
        box-sizing: border-box;
    }
}

/* Fixed mobile menu panel (common-interactive.js) */
html.ha-unified #global-mobile-menu-panel a {
    display: block;
    padding: 14px 18px;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1f1b;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

html.ha-unified #global-mobile-menu-panel a:hover,
html.ha-unified #global-mobile-menu-panel a:focus-visible {
    background: #f0fdf4;
    color: #007305;
}

html.ha-unified #global-mobile-menu-panel a.nav-link--contact {
    margin: 12px 16px 16px;
    border-radius: 999px;
    border-bottom: none;
    background: linear-gradient(135deg, #007305 0%, #005a04 100%);
    color: #fff !important;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 115, 5, 0.28);
}

/* ≤1200px: hamburger + stacked nav — see site-responsive.css (must load after this file). */
