/*  HEADER  */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: rgba(250, 249, 244, 0.96);

    border-bottom: 1px solid rgba(23, 63, 50, 0.08);

    transition:
        padding 0.3s ease,
        box-shadow 0.3s ease,
        background-color 0.3s ease;
}


/* Header inner container */

.header-container {
    width: min(92%, 1200px);
    min-height: 96px;

    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    transition: min-height 0.3s ease;
}


/* Logo */

.site-logo {
    display: inline-flex;
    align-items: center;

    flex-shrink: 0;
}

.site-logo img {
    width: auto;
    max-height: 68px;

    transition:
        max-height 0.3s ease,
        transform 0.3s ease;
}

.site-logo-text {
    color: var(--color-primary);

    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
}


/* Navigation */

.main-navigation {
    margin-left: auto;
}

.primary-menu {
    display: flex;
    align-items: center;

    gap: 28px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.primary-menu a {
    position: relative;

    display: inline-block;

    padding: 8px 0;

    color: var(--color-text);

    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;

    transition: color 0.25s ease;
}

.primary-menu a::after {
    content: '';

    position: absolute;

    left: 0;
    bottom: 0;

    width: 0;
    height: 2px;

    background: var(--color-secondary);

    transition: width 0.25s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
    color: var(--color-primary);
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after {
    width: 100%;
}


/* Header action */

.header-donate {
    flex-shrink: 0;
}


/*  SHRUNK HEADER  */

.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(23, 63, 50, 0.08);
}

.site-header.is-scrolled .header-container {
    min-height: 70px;
}

.site-header.is-scrolled .site-logo img {
    max-height: 40px;
}


/*  MOBILE MENU BUTTON  */

.mobile-menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 8px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: var(--color-text);

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/*  MOBILE NAVIGATION (Default hidden globally)  */

.mobile-navigation {
    display: none;
}


/*  RESPONSIVE  */

@media (max-width: 900px) {

    .main-navigation,
    .header-donate {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-container {
        min-height: 78px;
    }

    /* Make the logo small on mobile devices */
    .site-logo img {
        max-height: 36px;
    }

    .mobile-navigation {
        padding: 20px 4% 30px;
        background: var(--color-surface, #faf9f4);
        border-top: 1px solid rgba(23, 63, 50, 0.08);
    }

    /* Properly reveal the mobile menu when JS adds the .is-open class */
    .mobile-navigation.is-open {
        display: block;
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin: 0 0 20px;
        padding: 0;

        list-style: none;
    }

    .mobile-menu a {
        display: block;
        padding: 12px 0;
        color: var(--color-text);
        font-size: 1rem;
        font-weight: 500;
        text-decoration: none;
    }

    .mobile-donate {
        display: inline-block;
        text-align: center;
        width: 100%;
    }
}