/**
 * Global Fact — mobile/tablet nav panel (aligned with primetaxglobal ptg-sidebar)
 */

body.gft-type-scale {
    --gft-nav-deep: #0a1f3d;
    --gft-nav-gold-light: #fde68a;
}

body.gft-type-scale .gft-nav-toggle {
    background-color: transparent !important;
    border: none;
    box-shadow: none;
}

@media (min-width: 1200px) {
    body.gft-type-scale .gft-nav-toggle {
        color: var(--gft-nav-deep);
    }
}

@media (max-width: 1199.98px) {
    html,
    body.gft-type-scale {
        overflow-x: hidden !important;
        max-width: 100%;
    }

    body.gft-type-scale {
        position: relative;
    }

    /* Header: keep hamburger fully visible */
    body.gft-type-scale header .header-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    body.gft-type-scale header .hero-container {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.gft-type-scale .navbar-nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        min-width: 0;
        overflow: visible;
    }

    body.gft-type-scale .navbar-logo-container {
        width: auto !important;
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 52px);
    }

    body.gft-type-scale .navbar-logo-container .gft-site-logo-link {
        max-width: 100%;
    }

    body.gft-type-scale .navbar-logo-container .gft-site-logo--header {
        height: clamp(44px, 12vw, 56px);
        max-width: min(260px, 62vw);
    }

    body.gft-type-scale .gft-header__nav-wrap .nav-link-container {
        display: none !important;
    }

    body.gft-type-scale .gft-header__nav-wrap {
        flex: 0 0 0;
        width: 0;
        min-width: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    body.gft-type-scale .nav-btn.gft-nav-toggle {
        flex: 0 0 auto;
        margin-left: auto;
    }

    body.gft-type-scale aside {
        position: fixed;
        inset: 0;
        z-index: 1040;
        width: 100%;
        height: 0;
        overflow: visible;
        pointer-events: none;
    }

    body.gft-type-scale aside .sidebar-overlay.active,
    body.gft-type-scale aside .sidebar.gft-sidebar.active {
        pointer-events: auto;
    }

    body.gft-type-scale.gft-sidebar-open .gft-floating-contact {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.gft-type-scale .gft-sidebar .sidebar-menu a {
        word-break: break-word;
    }

    body.gft-type-scale .nav-btn.gft-nav-toggle {
        display: inline-flex !important;
        flex-shrink: 0;
        color: #fff !important;
    }

    body.gft-type-scale .gft-nav-toggle,
    body.gft-type-scale .gft-nav-toggle i {
        color: #fff !important;
    }

    body.gft-type-scale .gft-header__nav-wrap .nav-link-container {
        display: none !important;
    }

    body.gft-type-scale .sidebar-overlay,
    body.gft-type-scale .sidebar {
        display: block;
    }

    body.gft-type-scale .gft-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 48px;
        padding: 10px 12px;
        font-size: 26px;
        line-height: 1;
    }

    body.gft-type-scale .gft-nav-toggle i {
        font-size: 1.15em;
    }
}

@media (min-width: 1200px) {
    body.gft-type-scale .navbar-nav-container .nav-btn.gft-nav-toggle {
        display: none !important;
    }
}

/* Sidebar panel */
body.gft-type-scale .gft-sidebar {
    background: var(--gft-nav-deep);
}

body.gft-type-scale .gft-sidebar .sidebar-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.gft-type-scale .gft-site-logo-link--sidebar {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 52px);
}

body.gft-type-scale .gft-sidebar .sidebar-close-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

body.gft-type-scale .gft-sidebar .sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--gft-nav-gold-light);
}

body.gft-type-scale .gft-sidebar .sidebar-menu a,
body.gft-type-scale .gft-sidebar .sidebar-dropdown .dropdown-header a {
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase !important;
    letter-spacing: 0.07em;
    font-weight: 600;
}

body.gft-type-scale .gft-sidebar .sidebar-dropdown-menu a {
    color: rgba(255, 255, 255, 0.82);
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    font-weight: 500;
    font-size: 0.92em;
}

body.gft-type-scale .gft-sidebar .sidebar-menu a:hover,
body.gft-type-scale .gft-sidebar .sidebar-dropdown-menu a:hover {
    color: var(--gft-nav-gold-light);
}

body.gft-type-scale .gft-sidebar .sidebar-dropdown-btn {
    color: rgba(255, 255, 255, 0.75);
    margin-left: auto;
}

body.gft-type-scale .gft-sidebar .sidebar-dropdown-btn:hover {
    color: var(--gft-nav-gold-light);
}

body.gft-type-scale .gft-sidebar .sidebar-dropdown .dropdown-header {
    width: 100%;
    justify-content: space-between;
}

body.gft-type-scale .gft-sidebar .sidebar-menu a.gft-nav-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 14px 28px !important;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

body.gft-type-scale .gft-sidebar .sidebar-menu a.gft-nav-portal:hover {
    color: #fff !important;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

@media (max-width: 1199.98px) {
    body.gft-type-scale.gft-sidebar-open {
        overflow: hidden;
    }

    html:has(body.gft-sidebar-open) {
        overflow: hidden;
    }

    body.gft-type-scale .sidebar-overlay {
        z-index: 1040;
        left: 0 !important;
        right: 0;
        width: 100%;
        max-width: 100%;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    body.gft-type-scale .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.gft-type-scale .sidebar.gft-sidebar {
        z-index: 1050;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100dvh;
        height: 100%;
        padding: 0 !important;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        transform: translateX(-100%) !important;
        will-change: transform;
        display: flex;
        flex-direction: column;
    }

    body.gft-type-scale .sidebar.gft-sidebar.active {
        transform: translateX(0) !important;
    }

    body.gft-type-scale .gft-sidebar .sidebar-header {
        flex-shrink: 0;
        padding: clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px);
    }

    body.gft-type-scale .gft-sidebar .sidebar-menu {
        flex: 1;
        margin-top: 0;
        padding: clamp(8px, 2vw, 16px) clamp(16px, 4vw, 24px) clamp(32px, 8vw, 48px);
        overflow-x: hidden;
        overflow-y: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.gft-type-scale .gft-sidebar .sidebar-menu li {
        padding: clamp(14px, 3vw, 20px) 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        max-width: 100%;
    }

    body.gft-type-scale .gft-sidebar .sidebar-menu > li:last-child {
        border-bottom: none;
    }

    body.gft-type-scale .sidebar.gft-sidebar:not(.active) {
        pointer-events: none;
        visibility: hidden;
    }

    body.gft-type-scale .sidebar.gft-sidebar.active {
        visibility: visible;
    }

    body.gft-type-scale .gft-sidebar .sidebar-dropdown-menu {
        padding-left: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
}
