
/* =========================================================
   BLISSFULL MIND - PREMIUM RESPONSIVE HEADER
   Optimized Mobile Navigation | Smooth Transitions
========================================================= */


/* =========================================================
   01. MAIN HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;

    background: rgba(255, 253, 249, 0.94);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-bottom: 1px solid rgba(233, 227, 239, 0.8);

    transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
    box-shadow: 0 8px 28px rgba(57, 32, 94, 0.09);
}


/* =========================================================
   02. HEADER CONTAINER
========================================================= */

.nav-wrap {
    position: relative;

    height: 84px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;
}


/* =========================================================
   03. BRAND LOGO
========================================================= */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 210px;
    flex-shrink: 0;

    text-decoration: none;
}

.brand-mark {
    width: 43px;
    height: 43px;

    border-radius: 15px;

    background:
        linear-gradient(145deg, var(--purple), var(--purple-deep));

    display: grid;
    place-items: center;

    color: #fff;
    font-size: 1.15rem;

   /* box-shadow: 0 8px 18px rgba(57, 32, 94, 0.2);   */
}

.brand-name {
    font-family: "Manrope", sans-serif;
    font-size: 1.06rem;
    line-height: 1.05;

    font-weight: 800;
    color: var(--purple-deep);

    letter-spacing: -0.04em;
}

.brand-name small {
    display: block;

    margin-top: 5px;

    font-family: "DM Sans", sans-serif;
    font-size: 0.57rem;

    letter-spacing: 0.13em;
    text-transform: uppercase;

    color: var(--muted);
    font-weight: 700;
}


/* =========================================================
   04. DESKTOP NAVIGATION
========================================================= */

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links > a,
.nav-group > button,
.dropdown-toggle {
    font-size: 0.95rem;
    font-weight: 700;

    color: #51485f;

    background: none;
    border: 0;

    padding: 12px 0;

    cursor: pointer;
    text-decoration: none;

    transition: color 0.25s ease;
}

.nav-links > a:hover,
.nav-group > button:hover,
.dropdown-toggle:hover {
    color: var(--purple);
}


/* =========================================================
   05. DROPDOWN NAVIGATION
========================================================= */

.nav-dropdown,
.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    white-space: nowrap;
}

.dropdown-arrow {
    display: inline-block;
    transition: transform 0.35s ease;
}


/* Dropdown Panels */

.dropdown-menu,
.dropdown {
    position: absolute;

    top: 100%;
    left: -18px;

    min-width: 240px;
    padding: 10px;

    display: flex;
    flex-direction: column;
    gap: 3px;

    background: #fff;

    border: 1px solid var(--line);
    border-radius: 12px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-12px);

    transition:
        opacity 0.3s ease,
        transform 0.35s ease,
        visibility 0.3s ease;

    z-index: 1001;
}


/* Dropdown Links */

.dropdown-menu a,
.dropdown a {
    display: block;

    padding: 11px 14px;

    border-radius: 7px;

    font-size: 0.88rem;
    font-weight: 600;

    color: var(--muted);
    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;
}

.dropdown-menu a:hover,
.dropdown a:hover {
    background: var(--lavender-pale);
    color: var(--purple);

    padding-left: 19px;
}


/* Desktop Hover Dropdown */

@media (min-width: 851px) {

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu,
    .nav-group:hover .dropdown,
    .nav-group:focus-within .dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }

    .nav-dropdown:hover .dropdown-arrow,
    .nav-group:hover .dropdown-arrow {
        transform: rotate(180deg);
    }

}


/* JavaScript Dropdown State */

.nav-dropdown.active .dropdown-menu,
.nav-group.active .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}

.nav-dropdown.active .dropdown-arrow,
.nav-group.active .dropdown-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   06. HEADER ACTIONS
========================================================= */

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    flex-shrink: 0;
}

.nav-cta {
    white-space: nowrap;
}


/* =========================================================
   07. MOBILE MENU BUTTON
========================================================= */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 13px;

    background: #fff;
    color: var(--purple);

    font-size: 26px;
    line-height: 1;

    padding: 8px;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.menu-toggle:hover {
    background: var(--lavender-pale);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}


/* =========================================================
   08. TABLET & MOBILE NAVIGATION
========================================================= */

@media (max-width: 850px) {

    /* Header */

    .nav-wrap {
        height: 76px;
        gap: 12px;
    }


    /* Hamburger */

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }


    /* Navigation Panel - Closed State */

     .nav-links {
        display: flex;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }



    /* Navigation Panel - Open State */

     .nav-links.active {
        max-height: 75vh;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


    /* Navigation Links */

    .nav-links > a {
        display: block;
        width: 100%;

        padding: 15px 10px;

        border-bottom: 1px solid rgba(57, 32, 94, 0.08);

        font-size: 0.95rem;
    }

    .nav-links > a:last-child {
        border-bottom: none;
    }


    /* Dropdown Containers */

    .nav-dropdown,
    .nav-group {
        display: block;
        width: 100%;
    }


    /* Dropdown Buttons */

    .dropdown-toggle,
    .nav-group > button {
        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;

        padding: 15px 10px;

        text-align: left;
    }


    /* Dropdown Panels */

    .dropdown-menu,
    .dropdown {
        position: static;

        width: 100%;
        min-width: 100%;

        display: flex;
        flex-direction: column;

        max-height: 0;
        overflow: hidden;

        padding: 0 10px;

        border: none;
        border-radius: 8px;

        box-shadow: none;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            max-height 0.35s ease,
            opacity 0.3s ease,
            transform 0.3s ease,
            padding 0.3s ease,
            visibility 0.3s ease;
    }


    /* Expanded Dropdown */

    .nav-dropdown.active .dropdown-menu,
    .nav-group.active .dropdown {
        max-height: 400px;

        padding: 8px 10px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }


    /* Dropdown Links */

    .dropdown-menu a,
    .dropdown a {
        padding: 11px 12px;
        font-size: 0.88rem;
    }


    /* Appointment Button */

    .nav-actions .btn {
        font-size: 12px;
        padding: 10px 12px;
    }

}


/* =========================================================
   09. SMALL MOBILE SCREENS
========================================================= */

@media (max-width: 480px) {

    .nav-wrap {
        height: 70px;
    }

    .brand {
        min-width: 0;
        gap: 9px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .brand-name small {
        font-size: 0.50rem;
    }

    .nav-actions .btn {
        display: none;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

}


/* =========================================================
   10. REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .menu-toggle,
    .nav-links,
    .dropdown-menu,
    .dropdown {
        transition: none !important;
    }

}



/* ==========================================
   BLISSFULL MIND - MOBILE MENU VISIBILITY FIX
========================================== */

@media screen and (max-width: 850px) {

    header.site-header .nav-wrap {
        position: relative !important;
        overflow: visible !important;
    }

    header.site-header #menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 99999 !important;
    }

    header.site-header #primary-nav {
        display: none !important;

        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;

        width: 100% !important;
        height: auto !important;
        max-height: 75vh !important;

        flex-direction: column !important;
        align-items: stretch !important;

        background: #fffdf9 !important;

        padding: 15px 20px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        transform: none !important;

        box-shadow: 0 15px 35px rgba(57,32,94,0.15) !important;

        border-radius: 0 0 16px 16px !important;

        z-index: 99998 !important;
    }

    header.site-header #primary-nav.active {
        display: flex !important;
    }

    header.site-header #primary-nav > a {
        display: block !important;
        width: 100% !important;
        padding: 15px 10px !important;
        color: #51485f !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

}
