/**
 * Liquid glass header (iOS frosted style)
 * Turns the theme navbar into a floating rounded glass shell.
 */

:root {
    --glass-header-blur: saturate(200%) blur(24px);
    --glass-header-bg-dark: rgba(31, 31, 36, 0.72);
    --glass-header-border-dark: rgba(255, 255, 255, 0.12);
    --glass-header-bg-light: rgba(244, 244, 245, 0.72);
    --glass-header-border-light: rgba(0, 0, 0, 0.1);
    --glass-header-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* Navbar itself becomes a transparent positioning wrapper.
   Fixed with !important so the theme's smart-stick script (inline styles)
   can never slide the header out of view. */
header .navbar,
[data-bs-theme=dark] header .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100% !important;
    z-index: 1030;
    background: transparent !important;
    box-shadow: none !important;
    padding: 1.75rem 0.75rem 0 !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    pointer-events: none;
}

/* Keep the circle buttons grouped with the centered shell
   (container's auto margins would push them to the screen edges) */
header .navbar > .container {
    margin-left: 0;
    margin-right: 0;
}

/* Re-enable clicks on the shell and the circle buttons only,
   so the transparent gutter around them doesn't block the page */
header .navbar > .container,
header .navbar .navbar-menu,
header .navbar .dark-light-switcher,
header .navbar .glass-burger {
    pointer-events: auto;
}

/* Offset page content under the fixed header */
body {
    padding-top: 6.75rem;
}

/* Kill the solid sticky background from the theme */
header .navbar.navbar-stick:not(.navbar-dark) {
    background: transparent !important;
    box-shadow: none !important;
}

/* The container is the frosted glass shell */
header .navbar > .container {
    background: var(--glass-header-bg-dark);
    -webkit-backdrop-filter: var(--glass-header-blur);
    backdrop-filter: var(--glass-header-blur);
    border: 1px solid var(--glass-header-border-dark);
    border-radius: 1rem;
    box-shadow: var(--glass-header-shadow);
    padding: 0.25rem 1.25rem !important;
}

/* Logo fills the shell height (overrides the inline 45px cap) */
header .navbar .navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

header .navbar .navbar-brand img {
    max-height: 56px !important;
    height: 56px;
    width: auto;
}

/* Narrower floating shell on desktop */
@media (min-width: 992px) {
    header .navbar > .container {
        width: 80%;
        max-width: 80%;
    }
}

[data-bs-theme=light] header .navbar > .container {
    background: var(--glass-header-bg-light);
    border-color: var(--glass-header-border-light);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
    header .navbar > .container {
        background: rgba(31, 31, 36, 0.95);
    }

    [data-bs-theme=light] header .navbar > .container {
        background: rgba(244, 244, 245, 0.95);
    }
}

/* Nav link colors per theme (theme default is white-on-green) */
[data-bs-theme=light] header .navbar-light .navbar-nav .nav-item .nav-link {
    color: #09090b;
    opacity: 0.65;
}

[data-bs-theme=light] header .navbar-light .navbar-nav .nav-item .nav-link:hover,
[data-bs-theme=light] header .navbar-light .navbar-nav .nav-item .nav-link.active {
    color: #09090b;
    opacity: 1;
}

/* Offcanvas trigger and theme switcher: compact glass circles beside the shell */
header .navbar .navbar-menu,
header .navbar .dark-light-switcher,
header .navbar .glass-burger {
    width: 48px !important;
    height: 48px !important;
    line-height: 48px;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50%;
    background: var(--glass-header-bg-dark) !important;
    -webkit-backdrop-filter: var(--glass-header-blur);
    backdrop-filter: var(--glass-header-blur);
    border: 1px solid var(--glass-header-border-dark);
    box-shadow: var(--glass-header-shadow);
    align-self: center;
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

header .navbar .navbar-menu {
    display: none !important;
}

@media (min-width: 768px) {
    header .navbar .navbar-menu {
        display: inline-flex !important;
    }
}

[data-bs-theme=light] header .navbar .navbar-menu,
[data-bs-theme=light] header .navbar .dark-light-switcher,
[data-bs-theme=light] header .navbar .glass-burger {
    background: var(--glass-header-bg-light) !important;
    border-color: var(--glass-header-border-light);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

[data-bs-theme=light] header .navbar .navbar-menu i,
[data-bs-theme=light] header .navbar .dark-light-switcher i.ri-contrast-2-line {
    color: #09090b !important;
}

/* Burger lines inside the mobile glass circle (theme positions them absolutely) */
header .navbar .glass-burger {
    cursor: pointer;
}

header .navbar .glass-burger .burger-icon {
    position: relative;
    top: auto;
    right: auto;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    border: 0 !important;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Same menu icon as the desktop circle */
header .navbar .glass-burger .burger-icon i {
    font-size: 1.35rem;
    color: #ffffff;
    line-height: 1;
}

[data-bs-theme=light] header .navbar .glass-burger .burger-icon i {
    color: #09090b;
}

/* Mobile: burger circle replaces the theme switcher, in-shell burger goes away */
@media (min-width: 992px) {
    header .navbar .glass-burger {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    header .navbar > .dark-light-switcher {
        display: none !important;
    }

    header .navbar .navbar-social {
        display: none !important;
    }

    /* Only the logo is in the shell on mobile, so drop the glass background */
    header .navbar > .container,
    [data-bs-theme=light] header .navbar > .container {
        background: transparent !important;
        border: 0;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Theme switcher row inside the mobile menu panel */
.mobile-header-active .mobile-theme-switcher {
    cursor: pointer;
    padding: 0.75rem 0;
}

.mobile-header-active .mobile-theme-switcher i {
    font-size: 1.15rem;
}

/* Liquid glass mobile sidebar (theme paints it solid neutral-1000) */
.mobile-header-wrapper-style {
    background-color: var(--glass-header-bg-dark) !important;
    -webkit-backdrop-filter: var(--glass-header-blur);
    backdrop-filter: var(--glass-header-blur);
    border-left: 1px solid var(--glass-header-border-dark);
    box-shadow: var(--glass-header-shadow);
}

[data-bs-theme=light] .mobile-header-wrapper-style {
    background-color: var(--glass-header-bg-light) !important;
    border-left: 1px solid var(--glass-header-border-light);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
    .mobile-header-wrapper-style {
        background-color: rgba(31, 31, 36, 0.97) !important;
    }

    [data-bs-theme=light] .mobile-header-wrapper-style {
        background-color: rgba(244, 244, 245, 0.97) !important;
    }
}

/* Liquid glass "Get in touch" offcanvas (desktop menu circle) */
.offCanvas__info {
    background: var(--glass-header-bg-dark) !important;
    -webkit-backdrop-filter: var(--glass-header-blur);
    backdrop-filter: var(--glass-header-blur);
    border-right: 1px solid var(--glass-header-border-dark);
    box-shadow: var(--glass-header-shadow);
}

[data-bs-theme=light] .offCanvas__info {
    background: var(--glass-header-bg-light) !important;
    border-right: 1px solid var(--glass-header-border-light);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

@supports not (backdrop-filter: blur(1px)) {
    .offCanvas__info {
        background: rgba(31, 31, 36, 0.97) !important;
    }

    [data-bs-theme=light] .offCanvas__info {
        background: rgba(244, 244, 245, 0.97) !important;
    }
}

/* Soften the black overlay so the glass blur stays visible */
.offCanvas__overly.active {
    opacity: 0.35;
}

/* Close button inside the sidebar: frosted circle instead of solid square */
.mobile-header-wrapper-style .mobile-header-wrapper-inner .mobile-header-logo .burger-icon {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid var(--glass-header-border-dark);
    border-radius: 50%;
}

[data-bs-theme=light] .mobile-header-wrapper-style .mobile-header-wrapper-inner .mobile-header-logo .burger-icon {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: var(--glass-header-border-light);
}
