 
/* =========================================================
   GoldPriceBD - Header
   =========================================================
   Version: 2.3.0

   Includes:
   - PNG logo
   - GOLD PRICE BD brand text
   - Desktop navigation
   - Mobile navigation
   - Hamburger -> X
   - Theme toggle
   - Live status
   - Dark mode compatible
   - Responsive
   - Accessible focus states
   ========================================================= */


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);

    background:
        color-mix(
            in srgb,
            var(--color-bg-elevated) 94%,
            transparent
        );

    border-bottom: 1px solid var(--color-border);

    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.06);

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

    transition:
        background-color var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}


/* =========================================================
   HEADER INNER
   ========================================================= */

.header-inner {
    position: relative;

    min-height: 76px;

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

    gap: 24px;
}


/* =========================================================
   LOGO WRAPPER
   ========================================================= */

.site-logo {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    flex: 0 0 auto;

    color: var(--color-text);

    font-size: 20px;

    font-weight: 800;

    letter-spacing: -0.03em;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color var(--transition-fast),
        opacity var(--transition-fast),
        transform var(--transition-fast);
}

.site-logo:hover {
    color: var(--color-text);

    opacity: 0.96;
}


/* =========================================================
   PNG LOGO
   ========================================================= */

.site-logo-image {
    width: 42px;
    height: 42px;

    display: block;

    flex: 0 0 auto;

    object-fit: contain;

    object-position: center;

    border-radius: 10px;

    filter:
        drop-shadow(
            0 5px 10px rgba(184, 134, 11, 0.16)
        );

    transition:
        transform var(--transition-fast),
        filter var(--transition-fast),
        opacity var(--transition-fast);
}


/* =========================================================
   LOGO IMAGE HOVER
   ========================================================= */

.site-logo:hover .site-logo-image {
    transform:
        translateY(-1px)
        scale(1.03);

    filter:
        drop-shadow(
            0 7px 14px rgba(184, 134, 11, 0.22)
        );
}


/* =========================================================
   BRAND TEXT
   ---------------------------------------------------------
   GOLD PRICE BD
   ========================================================= */

.site-logo-text {
    display: inline-flex;

    align-items: baseline;

    gap: 4px;

    color: var(--color-text);

    font-size: 19px;

    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.035em;

    white-space: nowrap;
}


/* =========================================================
   BRAND MAIN TEXT
   ========================================================= */

.site-logo-text > span {
    color: var(--color-text);

    font-weight: 800;
}


/* =========================================================
   BRAND BD
   ========================================================= */

.site-logo-text strong {
    color: var(--color-primary);

    font-weight: 900;
}


/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.site-header .site-nav {
    display: flex;

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

    gap: 4px;

    margin-left: auto;

    flex: 0 0 auto;

    position: static;

    width: auto;

    padding: 0;

    background: transparent;

    border: 0;

    box-shadow: none;

    visibility: visible;

    opacity: 1;

    transform: none;

    overflow: visible;

    pointer-events: auto;

    z-index: auto;
}


/* =========================================================
   DESKTOP NAV LINKS
   ========================================================= */

.site-header .site-nav > a {
    position: relative;

    display: inline-flex;

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

    min-height: 42px;

    padding: 8px 14px;

    border-radius: 10px;

    color: var(--color-text-secondary);

    font-size: var(--font-size-sm);

    font-weight: var(--font-weight-medium);

    line-height: 1.2;

    white-space: nowrap;

    text-decoration: none;

    transition:
        color var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
}


/* =========================================================
   DESKTOP NAV HOVER
   ========================================================= */

.site-header .site-nav > a:hover {
    color: var(--color-text);

    background: var(--color-bg-soft);

    transform: translateY(-1px);
}


/* =========================================================
   DESKTOP NAV FOCUS
   ========================================================= */

.site-header .site-nav > a:focus-visible {
    outline: 2px solid var(--color-primary);

    outline-offset: 3px;
}


/* =========================================================
   DESKTOP ACTIVE
   ========================================================= */

.site-header .site-nav > a.active {
    color: var(--color-primary);

    background: var(--color-primary-light);
}


/* =========================================================
   DESKTOP ACTIVE INDICATOR
   ========================================================= */

.site-header .site-nav > a.active::after {
    content: "";

    position: absolute;

    left: 14px;
    right: 14px;

    bottom: 4px;

    height: 2px;

    border-radius: 999px;

    background: var(--color-primary);
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions {
    display: flex;

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

    gap: 9px;

    flex: 0 0 auto;
}


/* =========================================================
   LIVE STATUS
   ========================================================= */

.header-live-status {
    display: inline-flex;

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

    gap: 7px;

    min-height: 36px;

    padding: 7px 11px;

    border: 1px solid var(--color-success);

    border-radius: 999px;

    background: var(--color-success-bg);

    color: var(--color-success);

    font-size: 12px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   LIVE DOT
   ========================================================= */

.header-live-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;

    background: currentColor;

    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            currentColor 12%,
            transparent
        );
}


/* =========================================================
   ICON BUTTON
   ========================================================= */

.icon-button {
    width: 40px;
    height: 40px;

    display: inline-flex;

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

    flex: 0 0 auto;

    padding: 0;

    border: 1px solid var(--color-border-dark);

    border-radius: 10px;

    background: var(--color-bg-card);

    color: var(--color-text-secondary);

    cursor: pointer;

    text-decoration: none;

    transition:
        transform var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        box-shadow var(--transition-fast);
}


/* =========================================================
   ICON BUTTON HOVER
   ========================================================= */

.icon-button:hover {
    color: var(--color-primary);

    border-color: var(--color-primary);

    background: var(--color-bg-soft);

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   ICON BUTTON ACTIVE
   ========================================================= */

.icon-button:active {
    transform: translateY(0) scale(0.96);
}


/* =========================================================
   ICON BUTTON FOCUS
   ========================================================= */

.icon-button:focus-visible {
    outline: 2px solid var(--color-primary);

    outline-offset: 3px;
}


/* =========================================================
   THEME ICON
   ========================================================= */

.theme-icon {
    display: inline-flex;

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

    width: 20px;
    height: 20px;

    font-size: 18px;

    line-height: 1;

    transition:
        transform 180ms ease;
}


.theme-toggle:hover .theme-icon {
    transform:
        rotate(15deg)
        scale(1.05);
}


/* =========================================================
   MOBILE MENU TOGGLE
   ========================================================= */

.mobile-menu-toggle {
    display: none;

    position: relative;

    z-index: 1002;
}


/* =========================================================
   MOBILE MENU ICON
   ========================================================= */

.mobile-menu-icon {
    position: relative;

    width: 22px;
    height: 22px;

    display: inline-flex;

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

    color: currentColor;

    font-size: 0;

    line-height: 1;

    pointer-events: none;

    background:
        linear-gradient(
            currentColor,
            currentColor
        )
        center / 19px 2px
        no-repeat;

    border-radius: 999px;

    transition:
        transform 220ms ease,
        background-size 180ms ease;
}


/* =========================================================
   HAMBURGER BARS
   ========================================================= */

.mobile-menu-icon::before,
.mobile-menu-icon::after {
    content: "";

    position: absolute;

    left: 50%;

    width: 19px;
    height: 2px;

    border-radius: 999px;

    background: currentColor;

    transform:
        translateX(-50%)
        rotate(0deg);

    transition:
        top 220ms ease,
        transform 220ms ease,
        width 180ms ease,
        opacity 180ms ease;
}


/* =========================================================
   TOP / BOTTOM BARS
   ========================================================= */

.mobile-menu-icon::before {
    top: 6px;
}

.mobile-menu-icon::after {
    top: 14px;
}


/* =========================================================
   MOBILE MENU OPEN BUTTON
   ========================================================= */

.site-header.menu-open .mobile-menu-toggle {
    color: var(--color-primary);

    border-color: var(--color-primary);

    background: var(--color-primary-light);

    box-shadow:
        0 5px 14px rgba(184, 134, 11, 0.12);
}


/* =========================================================
   HAMBURGER -> X
   ========================================================= */

.site-header.menu-open .mobile-menu-icon {
    background-size: 0 0;

    transform: rotate(0deg);
}


.site-header.menu-open .mobile-menu-icon::before {
    top: 10px;

    transform:
        translateX(-50%)
        rotate(45deg);
}


.site-header.menu-open .mobile-menu-icon::after {
    top: 10px;

    transform:
        translateX(-50%)
        rotate(-45deg);
}


/* =========================================================
   MOBILE NAVIGATION WRAPPER
   ========================================================= */

.mobile-navigation-wrapper {
    display: none;
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-navigation {
    display: flex;

    flex-direction: column;

    gap: 5px;

    width: 100%;
}


/* =========================================================
   MOBILE NAV LINK
   ========================================================= */

.mobile-navigation-link {
    position: relative;

    display: flex;

    align-items: center;

    width: 100%;

    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid transparent;

    border-radius: 11px;

    color: var(--color-text-secondary);

    background: transparent;

    font-size: 14px;

    font-weight: 600;

    line-height: 1.2;

    text-decoration: none;

    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}


/* =========================================================
   MOBILE NAV LINK HOVER
   ========================================================= */

.mobile-navigation-link:hover {
    color: var(--color-text);

    background: var(--color-bg-soft);

    border-color: var(--color-border);

    transform: translateX(3px);
}


/* =========================================================
   MOBILE NAV FOCUS
   ========================================================= */

.mobile-navigation-link:focus-visible {
    outline: 2px solid var(--color-primary);

    outline-offset: 2px;
}


/* =========================================================
   MOBILE NAV ACTIVE
   ========================================================= */

.mobile-navigation-link.active {
    color: var(--color-primary);

    background: var(--color-primary-light);

    border-color:
        color-mix(
            in srgb,
            var(--color-primary) 18%,
            transparent
        );
}


/* =========================================================
   MOBILE ACTIVE INDICATOR
   ========================================================= */

.mobile-navigation-link.active::before {
    content: "";

    position: absolute;

    left: 5px;

    top: 50%;

    width: 3px;
    height: 22px;

    border-radius: 999px;

    background: var(--color-primary);

    transform: translateY(-50%);
}


/* =========================================================
   MOBILE NAV LABEL
   ========================================================= */

.mobile-nav-label {
    display: block;

    padding-left: 3px;
}


/* =========================================================
   BODY SCROLL LOCK
   ========================================================= */

body.mobile-menu-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .site-header {
        z-index: calc(var(--z-header) + 20);
    }


    /* -----------------------------------------------------
       HEADER INNER
       ----------------------------------------------------- */

    .header-inner {
        min-height: 68px;

        gap: 9px;

        padding-block: 9px;
    }


    /* -----------------------------------------------------
       LOGO + BRAND
       ----------------------------------------------------- */

    .site-logo {
        margin-right: auto;

        font-size: 18px;

        gap: 9px;
    }


    .site-logo-image {
        width: 38px;
        height: 38px;

        border-radius: 9px;
    }


    .site-logo-text {
        font-size: 17px;

        gap: 3px;
    }


    /* -----------------------------------------------------
       DESKTOP NAV HIDDEN
       ----------------------------------------------------- */

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


    /* -----------------------------------------------------
       LIVE STATUS
       ----------------------------------------------------- */

    .header-live-status {
        min-height: 34px;

        padding: 6px 9px;

        font-size: 11px;
    }


    /* -----------------------------------------------------
       MOBILE MENU BUTTON
       ----------------------------------------------------- */

    .mobile-menu-toggle {
        display: inline-flex;
    }


    /* -----------------------------------------------------
       MOBILE NAVIGATION
       ----------------------------------------------------- */

    .mobile-navigation-wrapper {
        display: block;

        position: absolute;

        top: calc(100% + 8px);

        left: 10px;
        right: 10px;

        width: auto;

        max-height: calc(100vh - 90px);

        padding: 8px;

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

        overscroll-behavior: contain;

        background:
            color-mix(
                in srgb,
                var(--color-bg-elevated) 97%,
                transparent
            );

        border: 1px solid var(--color-border);

        border-radius: 16px;

        box-shadow:
            0 18px 45px rgba(15, 23, 42, 0.18);

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

        visibility: hidden;

        opacity: 0;

        transform:
            translateY(-12px)
            scale(0.97);

        transform-origin: top center;

        pointer-events: none;

        transition:
            opacity 180ms ease,
            transform 200ms ease,
            visibility 200ms ease;

        z-index: 1001;
    }


    /* -----------------------------------------------------
       OPEN MOBILE MENU
       ----------------------------------------------------- */

    .site-header.menu-open
    .mobile-navigation-wrapper {

        visibility: visible;

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

        pointer-events: auto;
    }


    /* -----------------------------------------------------
       MOBILE NAVIGATION
       ----------------------------------------------------- */

    .mobile-navigation {
        display: flex;

        flex-direction: column;

        gap: 5px;
    }


    /* -----------------------------------------------------
       MOBILE LINKS
       ----------------------------------------------------- */

    .mobile-navigation-link {
        min-height: 48px;

        padding: 12px 14px;

        border-radius: 11px;

        font-size: 14px;
    }


    /* -----------------------------------------------------
       MOBILE LINK ACTIVE
       ----------------------------------------------------- */

    .mobile-navigation-link.active::before {
        left: 4px;

        width: 3px;

        height: 22px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .header-inner {
        min-height: 64px;

        padding-block: 8px;

        gap: 7px;
    }


    /* -----------------------------------------------------
       LOGO + BRAND
       ----------------------------------------------------- */

    .site-logo {
        font-size: 17px;

        gap: 8px;
    }


    .site-logo-image {
        width: 34px;
        height: 34px;

        border-radius: 8px;
    }


    .site-logo-text {
        font-size: 15px;

        gap: 3px;

        letter-spacing: -0.04em;
    }


    /* -----------------------------------------------------
       HEADER ACTIONS
       ----------------------------------------------------- */

    .header-actions {
        gap: 6px;
    }


    /* -----------------------------------------------------
       LIVE STATUS HIDDEN
       ----------------------------------------------------- */

    .header-live-status {
        display: none;
    }


    /* -----------------------------------------------------
       ICON BUTTON
       ----------------------------------------------------- */

    .icon-button {
        width: 38px;
        height: 38px;

        border-radius: 9px;
    }


    /* -----------------------------------------------------
       MOBILE MENU TOGGLE
       ----------------------------------------------------- */

    .mobile-menu-toggle {
        display: inline-flex;
    }


    /* -----------------------------------------------------
       MOBILE MENU
       ----------------------------------------------------- */

    .mobile-navigation-wrapper {
        top: calc(100% + 7px);

        left: 7px;
        right: 7px;

        padding: 7px;

        border-radius: 14px;
    }


    .mobile-navigation-link {
        min-height: 46px;

        padding: 11px 13px;

        font-size: 13px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .site-logo-text {
        font-size: 13px;

        gap: 2px;
    }


    .site-logo-image {
        width: 31px;
        height: 31px;

        border-radius: 7px;
    }


    .icon-button {
        width: 36px;
        height: 36px;
    }


    .mobile-navigation-wrapper {
        left: 5px;
        right: 5px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

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

    .site-header,
    .site-header *,
    .site-header *::before,
    .site-header *::after {

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;
    }

}
 
