/* Business-ready header for Hope of Africa Institute. Bootstrap-independent. */

.site-header {
    --hoa-navy: #07294d;
    --hoa-green: #8dc16a;
    --hoa-blue-hover: #0f4f8a;
    --hoa-border: #e6ecf2;
    position: relative;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid rgba(7, 41, 77, 0.08);
    box-shadow: 0 10px 30px rgba(7, 41, 77, 0.07);
}

.site-header .header-topline {
    background: var(--hoa-navy);
    color: #fff;
}

.site-header .header-topline-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}

.site-header .header-topline a,
.site-header .header-topline span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.site-header .header-topline a:hover {
    color: #fff;
}

.site-header .navigation,
.site-header .navigation.sticky {
    padding: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 0;
    transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.site-header .navigation.sticky {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(7, 41, 77, 0.08) !important;
    box-shadow: 0 14px 34px rgba(7, 41, 77, 0.12) !important;
    animation: hoaStickyReveal 0.24s ease-out both !important;
    -webkit-animation: hoaStickyReveal 0.24s ease-out both !important;
}

.site-header .site-navbar {
    min-height: 82px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 40px;
    padding: 0;
    transition: min-height 0.22s ease;
}

.site-header .site-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-right: 30px;
    margin: 0;
    border-right: 1px solid rgba(7, 41, 77, 0.1);
    transition: gap 0.22s ease, padding-right 0.22s ease, border-color 0.22s ease;
}

.site-header .site-brand img {
    width: 64px;
    max-height: 64px;
    object-fit: contain;
    transition: width 0.22s ease, max-height 0.22s ease;
}

.site-header .site-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-header .site-brand strong {
    color: var(--hoa-navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    transition: font-size 0.22s ease;
}

.site-header .site-brand small {
    margin-top: 3px;
    color: #427123;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    transition: font-size 0.22s ease;
}

.site-header .site-menu {
    min-width: 0;
}

.site-header .site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header .site-nav li {
    flex: 0 0 auto;
    margin: 0;
}

.site-header .site-nav a {
    position: relative;
    display: block;
    padding: 34px 0;
    color: var(--hoa-navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease, padding 0.22s ease;
}

.site-header .site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    height: 3px;
    background: var(--hoa-green);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.site-header .site-nav a.active,
.site-header .site-nav a:hover {
    color: var(--hoa-blue-hover);
}

.site-header .site-nav a.active::after,
.site-header .site-nav a:hover::after {
    transform: scaleX(1);
}

.site-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.site-header .header-apply-btn {
    min-width: 118px;
    padding: 0 26px;
    line-height: 46px;
    border-radius: 5px;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, line-height 0.22s ease;
}

.site-header .navigation.sticky .site-navbar {
    min-height: 68px;
}

.site-header .navigation.sticky .site-brand {
    gap: 10px;
    padding-right: 24px;
}

.site-header .navigation.sticky .site-brand img {
    width: 52px;
    max-height: 52px;
}

.site-header .navigation.sticky .site-brand strong {
    font-size: 16px;
}

.site-header .navigation.sticky .site-brand small {
    font-size: 10px;
}

.site-header .navigation.sticky .site-nav a {
    padding-top: 27px;
    padding-bottom: 27px;
}

.site-header .navigation.sticky .site-nav a::after {
    bottom: 18px;
}

.site-header .navigation.sticky .header-apply-btn {
    line-height: 40px;
}

@keyframes hoaStickyReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .header-apply-btn:hover {
    background: var(--hoa-blue-hover);
    border-color: var(--hoa-blue-hover);
    color: #fff;
}

.site-header .mobile-apply-btn {
    display: none;
}

.site-header .site-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid var(--hoa-border);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.site-header .site-menu-toggle .icon-bar {
    width: 18px;
    height: 2px;
    margin: 3px 0;
    display: block;
    background: var(--hoa-navy);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header .site-menu-toggle.is-open .icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.site-header .site-menu-toggle.is-open .icon-bar:nth-child(2) {
    opacity: 0;
}

.site-header .site-menu-toggle.is-open .icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1399.98px) {
    .site-header .site-navbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 28px;
    }

    .site-header .site-brand {
        padding-right: 24px;
    }

    .site-header .site-brand span {
        display: none;
    }

    .site-header .site-nav {
        gap: 16px;
    }

    .site-header .site-nav a {
        font-size: 13px;
    }
}

@media (max-width: 1199.98px) {
    .site-header .site-navbar {
        min-height: 74px;
        display: grid;
        grid-template-columns: auto auto auto;
        justify-content: space-between;
        column-gap: 16px;
    }

    .site-header .site-brand {
        padding-right: 0;
        border-right: 0;
    }

    .site-header .site-brand span {
        display: flex;
    }

    .site-header .site-brand img {
        width: 54px;
        max-height: 54px;
    }

    .site-header .site-brand strong {
        font-size: 16px;
    }

    .site-header .site-brand small {
        font-size: 11px;
    }

    .site-header .site-menu-toggle {
        display: inline-flex;
        grid-column: 3;
    }

    .site-header .header-actions {
        grid-column: 2;
        grid-row: 1;
    }

    .site-header .header-apply-btn {
        min-width: 104px;
        padding: 0 18px;
        line-height: 40px;
        font-size: 14px;
    }

    .site-header .site-menu {
        grid-column: 1 / -1;
        display: none;
        position: absolute;
        left: 15px;
        right: 15px;
        top: calc(100% + 12px);
        padding: 8px;
        background: #fff;
        border: 1px solid rgba(7, 41, 77, 0.1);
        border-radius: 8px;
        box-shadow: 0 20px 46px rgba(7, 41, 77, 0.18);
        transform: translateY(-6px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    }

    .site-header .site-menu.is-open {
        display: block;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .site-header .site-nav {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
        padding: 0;
    }

    .site-header .site-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 14px !important;
        border-radius: 6px;
        font-size: 14px;
        line-height: 1.2;
    }

    .site-header .site-nav a::after {
        display: none;
    }

    .site-header .site-nav a.active,
    .site-header .site-nav a:hover {
        background: rgba(7, 41, 77, 0.08);
    }

    .site-header .mobile-apply-btn {
        display: block;
        width: 100%;
        margin-top: 8px;
        line-height: 46px;
        border-radius: 6px;
        text-align: center;
    }

    .site-header .mobile-apply-btn:hover {
        background: var(--hoa-blue-hover);
        border-color: var(--hoa-blue-hover);
        color: #fff;
    }

    .site-header .navigation.sticky .site-navbar {
        min-height: 66px;
    }

    .site-header .navigation.sticky .site-brand img {
        width: 48px;
        max-height: 48px;
    }

    .site-header .navigation.sticky .site-brand strong {
        font-size: 15px;
    }
}

@media (max-width: 991.98px) {
    .site-header .header-topline-inner {
        min-height: 34px;
        justify-content: center;
        gap: 18px;
    }

    .site-header .header-topline span {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .site-header .header-topline-inner {
        justify-content: center;
        gap: 0;
    }

    .site-header .header-topline a[href^="mailto"] {
        display: none;
    }

    .site-header .site-navbar {
        min-height: 70px;
        grid-template-columns: auto auto;
    }

    .site-header .site-brand span {
        display: none;
    }

    .site-header .site-brand img {
        width: 52px;
        max-height: 52px;
    }

    .site-header .header-actions {
        display: none;
    }

    .site-header .site-menu-toggle {
        grid-column: 2;
        width: 38px;
        min-height: 38px;
        height: 38px;
    }

    .site-header .navigation.sticky .site-navbar {
        min-height: 62px;
    }

    .site-header .navigation.sticky .site-brand img {
        width: 40px;
        max-height: 40px;
    }
}

/* Compact mobile menu override */
@media (max-width: 1199.98px) {
    .site-header .site-menu {
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .site-header .site-nav,
    .site-header .site-nav li {
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-header .site-nav a {
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 14px !important;
        display: flex !important;
        align-items: center !important;
    }

    .site-header .site-nav a.active {
        color: var(--hoa-blue-hover) !important;
        background: rgba(141, 193, 106, 0.14);
    }

    .site-header .mobile-apply-btn {
        height: 46px !important;
        line-height: 46px !important;
        padding: 0 18px !important;
    }
}
