/* =========================================================
   header2.css — Smooth enhancement layer for header2.php
   Loaded ON TOP of header_styles.css — no duplicate rules.
   ========================================================= */

/* Self-hosted fonts */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/Plus_Jakarta_Sans/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron/Orbitron-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

/* ── Header enhanced transitions ──────────────────── */
.header {
    transition:
        height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        backdrop-filter 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
    will-change: height, background;
}

/* Subtle top glow that fades in on scroll */
.header.scrolled::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(108, 92, 231, 0.5) 50%,
            transparent 100%);
    animation: h2-glow-slide 3s ease-in-out infinite;
}

@keyframes h2-glow-slide {

    0%,
    100% {
        opacity: 0.4;
        left: 20%;
        right: 20%;
    }

    50% {
        opacity: 1;
        left: 5%;
        right: 5%;
    }
}

/* ── Logo smooth hover ────────────────────────────── */
.h2-logo {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.h2-logo:hover {
    transform: scale(1.05);
}

.h2-logo img {
    transition: filter 0.3s ease, height 0.3s ease;
}

.h2-logo:hover img {
    filter: drop-shadow(0 0 18px rgba(108, 92, 231, 0.7));
}

.header.scrolled .h2-logo img {
    height: 36px;
}

/* ── Nav links smoother underline ─────────────────── */
.nav-links a {
    transition: color 0.25s ease;
}

.nav-links a::after {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    opacity: 1;
}

/* ── Balance pill skeleton loading ────────────────── */
.h2-balance .h2-balance-amt {
    transition: opacity 0.4s ease;
}

.h2-balance.loading .h2-balance-amt {
    opacity: 0.4;
}

/* ── Avatar pill — press effect ───────────────────── */
.avatar-pill-mobile {
    transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.avatar-pill-mobile:hover {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 1px rgba(108, 92, 231, 0.3);
}

.avatar-pill-mobile:active {
    transform: scale(0.93);
}

/* ── Drawer — smoother slide + spring feel ─────────── */
.mobile-drawer {
    transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: right;
}

/* Drawer link — smooth left indent on hover ─────── */
.drawer-link {
    position: relative;
    transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.drawer-link:hover,
.drawer-link.active {
    padding-left: 20px;
}

/* ── Bottom nav — smooth icon bounce on active ─────── */
.bottom-nav-item {
    transition: color 0.2s ease, background 0.2s ease;
}

.bottom-nav-item i {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, filter 0.2s ease;
}

.bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.15);
}

.bottom-nav-item:not(.active):hover i {
    transform: scale(1.1);
}

/* ── Contact btn glow pulse ───────────────────────── */
.btn-contact {
    position: relative;
    overflow: hidden;
}

.btn-contact::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-contact:hover::after {
    opacity: 1;
}

/* ── WhatsApp float — smoother animation ──────────── */
.whatsapp-float {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.whatsapp-float:hover {
    transform: scale(1.14) translateY(-2px);
}

/* ── h2 balance pill wrapper ──────────────────────── */
.h2-pill-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 1;
}

/* =========================================================
   Dual-Row Layout & Premium Theme Styles
   (Extracted from header.php style tag)
   ========================================================= */
    /* Suppress pseudo-element artifacts on mobile nav */
    .bottom-nav-item::before,
    .bottom-nav-item::after {
        display: none !important;
        content: none !important;
    }
    
    /* â”€â”€ TELEGRAM PRESET VARIABLES & CORE OVERRIDES â”€â”€ */
    :root {
        --tg-blue: #3390ec;
        --tg-blue-hover: #2b7ec9;
        --tg-dark-bg: #17212b;
        --tg-dark-sidebar: #0f171e;
        --tg-muted-text: #7f91a4;
        --tg-light-text: #f5f6fa;
        --tg-glass-bg: rgba(23, 33, 43, 0.72);
        --tg-glass-bg-scrolled: rgba(15, 23, 30, 0.88);
        --tg-border: rgba(255, 255, 255, 0.05);
        --tg-active-soft: rgba(51, 144, 236, 0.12);
        --tg-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
        --tg-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body {
        font-family: 'Plus Jakarta Sans', sans-serif !important;
    }

    /* â”€â”€ HEADER NAVIGATION BAR â”€â”€ */
    .header {
        background: var(--tg-glass-bg) !important;
        backdrop-filter: blur(25px) saturate(190%) !important;
        -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
        border-bottom: 1px solid var(--tg-border) !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15) !important;
        transition: var(--tg-transition) !important;
    }
    .header.scrolled {
        background: var(--tg-glass-bg-scrolled) !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
        border-bottom: 1px solid rgba(51, 144, 236, 0.15) !important; /* Subtle Telegram blue glow line */
    }

    /* â”€â”€ DESKTOP NAV LINKS â”€â”€ */
    .nav-links a {
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.3px !important;
        text-transform: none !important; /* Modern clean casing */
        color: var(--tg-muted-text) !important;
        transition: var(--tg-transition) !important;
    }
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--tg-blue) !important;
        text-shadow: none !important;
    }
    .nav-links a::after {
        background: var(--tg-blue) !important;
        height: 3px !important;
        border-radius: 3px !important;
        box-shadow: 0 2px 8px rgba(51, 144, 236, 0.4) !important;
    }

    /* â”€â”€ ACTIONS BUTTON (TELEGRAM BLUE PILL) â”€â”€ */
    .btn-contact {
        background: var(--tg-blue) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 20px !important;
        padding: 8px 22px !important;
        font-weight: 700 !important;
        font-size: 0.85rem !important;
        text-transform: none !important;
        letter-spacing: 0.2px !important;
        box-shadow: 0 4px 12px rgba(51, 144, 236, 0.25) !important;
        transition: var(--tg-transition) !important;
    }
    .btn-contact:hover {
        background: var(--tg-blue-hover) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 22px rgba(51, 144, 236, 0.4) !important;
    }
    .btn-contact:active {
        transform: translateY(0) scale(0.97) !important;
    }

    /* â”€â”€ DESKTOP RANK PILL â”€â”€ */
    .rank-btn {
        background: var(--tg-active-soft) !important;
        border: 1px solid rgba(51, 144, 236, 0.15) !important;
        color: var(--tg-blue) !important;
        border-radius: 12px !important;
        padding: 6px 14px !important;
        font-weight: 600 !important;
        font-size: 0.82rem !important;
        transition: var(--tg-transition) !important;
    }
    .rank-btn:hover {
        background: rgba(51, 144, 236, 0.18) !important;
        border-color: var(--tg-blue) !important;
        transform: translateY(-1px) !important;
    }
    .rank-btn i {
        color: var(--tg-blue) !important;
    }

    /* â”€â”€ DESKTOP DROPDOWN PROFILE MENU â”€â”€ */
    .profile-dropdown {
        position: relative !important;
    }
    .profile-menu {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 200px !important;
        background: rgba(23, 33, 43, 0.95) !important; /* Premium Telegram dark side */
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 18px !important;
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5) !important;
        padding: 6px !important;
        transform: translateY(12px) scale(0.95) !important;
        transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        z-index: 1000 !important;
    }
    .profile-dropdown:hover .profile-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }
    .profile-menu a {
        padding: 10px 14px !important;
        border-radius: 12px !important;
        color: var(--tg-light-text) !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        transition: var(--tg-transition) !important;
    }
    .profile-menu a:hover {
        background: var(--tg-active-soft) !important;
        color: var(--tg-blue) !important;
        transform: translateX(4px) !important;
    }
    .profile-menu a i {
        width: 20px !important;
        text-align: center !important;
        transition: transform 0.2s ease !important;
    }
    .profile-menu a:hover i {
        transform: scale(1.1) !important;
    }

    /* â”€â”€ MOBILE AVATAR QUICK PILL â”€â”€ */
    .avatar-pill-mobile {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.04) !important;
        border-radius: 20px !important;
        padding: 3px 10px 3px 3px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        transition: var(--tg-transition) !important;
    }
    .avatar-pill-mobile:hover {
        background: rgba(51, 144, 236, 0.08) !important;
        border-color: rgba(51, 144, 236, 0.2) !important;
    }

    /* â”€â”€ MOBILE FLOATING BOTTOM NAV BAR â”€â”€ */
    .bottom-nav-bar {
        background: rgba(23, 33, 43, 0.82) !important; /* Sleek Dark Glass */
        backdrop-filter: blur(25px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 24px !important;
        bottom: 18px !important;
        left: 18px !important;
        right: 18px !important;
        width: auto !important;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4) !important;
        padding: 4px 8px !important;
        height: 62px !important;
        display: flex;
        justify-content: space-around;
        transition: var(--tg-transition) !important;
    }
    .bottom-nav-item {
        border-radius: 16px !important;
        color: var(--tg-muted-text) !important;
        padding: 5px !important;
        gap: 2px !important;
        transition: var(--tg-transition) !important;
    }
    .bottom-nav-item.active {
        background: var(--tg-active-soft) !important;
        color: var(--tg-blue) !important;
    }
    .bottom-nav-item.active i {
        color: var(--tg-blue) !important;
        filter: drop-shadow(0 0 8px rgba(51, 144, 236, 0.4)) !important;
        transform: translateY(-2px) scale(1.1) !important;
    }
    .bottom-nav-label {
        font-size: 0.6rem !important;
        text-transform: none !important;
        font-weight: 600 !important;
        letter-spacing: 0.1px !important;
    }

    /* WhatsApp floating button positioning */
    .whatsapp-float {
        bottom: 95px !important;
        right: 20px !important;
        background: linear-gradient(135deg, #25d366, #128c7e) !important;
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35) !important;
    }

    /* â”€â”€ MOBILE SLIDE DRAWER (TELEGRAM CLASSIC) â”€â”€ */
    .mobile-drawer {
        background: #17212b !important; /* Telegram dark mode */
        border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-radius: 24px 0 0 24px !important;
        box-shadow: -15px 0 45px rgba(0, 0, 0, 0.5) !important;
        transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .drawer-user-card {
        background: linear-gradient(180deg, rgba(51, 144, 236, 0.12) 0%, transparent 100%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 45px 20px 20px !important;
    }
    .drawer-username {
        color: #ffffff !important;
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.2px !important;
    }
    .rank-chip {
        padding: 3px 9px !important;
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        text-transform: none !important;
        letter-spacing: 0.3px !important;
        border-radius: 12px !important;
    }
    .rank-chip.rank-owner {
        background: rgba(240, 165, 0, 0.12) !important;
        color: #f0a500 !important;
        border: 1px solid rgba(240, 165, 0, 0.25) !important;
    }
    .rank-chip.rank-admin {
        background: rgba(232, 67, 147, 0.12) !important;
        color: #e84393 !important;
        border: 1px solid rgba(232, 67, 147, 0.25) !important;
    }
    .rank-chip.rank-reseller {
        background: rgba(0, 184, 148, 0.12) !important;
        color: #00b894 !important;
        border: 1px solid rgba(0, 184, 148, 0.25) !important;
    }
    .rank-chip.rank-vip {
        background: rgba(0, 206, 201, 0.12) !important;
        color: #00cec9 !important;
        border: 1px solid rgba(0, 206, 201, 0.25) !important;
    }
    .rank-chip.rank-user {
        background: rgba(51, 144, 236, 0.12) !important;
        color: var(--tg-blue) !important;
        border: 1px solid rgba(51, 144, 236, 0.25) !important;
    }
    .drawer-link {
        color: #e5edf5 !important;
        font-weight: 500 !important;
        font-size: 0.92rem !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        margin: 2px 10px !important;
        transition: var(--tg-transition) !important;
    }
    .drawer-link:hover,
    .drawer-link.active {
        background: rgba(51, 144, 236, 0.1) !important;
        color: var(--tg-blue) !important;
        padding-left: 22px !important;
    }
    .drawer-link i {
        width: 22px !important;
        text-align: center !important;
        font-size: 1.05rem !important;
        color: var(--tg-muted-text) !important;
        transition: transform 0.2s ease !important;
    }
    .drawer-link:hover i,
    .drawer-link.active i {
        color: var(--tg-blue) !important;
        transform: scale(1.1) !important;
    }
    .drawer-quick-btn.primary {
        background: var(--tg-blue) !important;
        box-shadow: 0 4px 12px rgba(51, 144, 236, 0.25) !important;
        border: none !important;
        border-radius: 14px !important;
        color: #ffffff !important;
        transition: var(--tg-transition) !important;
    }
    .drawer-quick-btn.ghost {
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px !important;
        color: #e5edf5 !important;
        transition: var(--tg-transition) !important;
    }
    .drawer-quick-btn.primary:hover {
        background: var(--tg-blue-hover) !important;
    }
    .drawer-quick-btn.ghost:hover {
        background: rgba(255, 255, 255, 0.08) !important;
    }
    .drawer-section-label {
        color: var(--tg-muted-text) !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 1.2px;
        margin: 15px 20px 8px !important;
    }
    .drawer-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.05);
        margin: 10px 20px;
    }
    .drawer-contact-btn {
        background: #25d366 !important;
        color: white !important;
        border-radius: 16px !important;
        font-weight: 700 !important;
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.25) !important;
        transition: var(--tg-transition) !important;
    }
    .drawer-contact-btn:hover {
        transform: translateY(-2px) scale(1.01) !important;
        box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4) !important;
    }

    /* â”€â”€ DUAL ROW LAYOUT OVERRIDES FOR DESKTOP HEADER â”€â”€ */
    @media (min-width: 993px) {
        :root {
            --header-height: 112px !important;
        }
        .header {
            height: 112px !important;
            padding-top: 6px !important;
            padding-bottom: 6px !important;
            display: flex;
            align-items: center;
        }
        .header.scrolled {
            height: 106px !important;
            padding-top: 4px !important;
            padding-bottom: 4px !important;
        }
        
        .desktop-header-only {
            display: flex !important;
            flex-direction: column;
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 16px !important; /* padding 0px 16px (px-4) */
            gap: 4px;
        }
        .mobile-header-only {
            display: none !important;
        }
        
        /* Top Row styling: height h-14 (56px) */
        .header-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 56px !important; /* h-14 */
            gap: 16px !important; /* gap-4 */
        }
        
        /* Huge, wide search bar center-aligned */
        .header-search-container {
            flex-grow: 1;
            max-width: 780px;
            margin: 0 auto;
        }
        
        .header-search-form {
            position: relative;
            width: 100%;
        }
        
        .header-search-form .search-icon {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255, 255, 255, 0.4);
            font-size: 1.05rem;
            pointer-events: none;
            transition: color 0.3s ease;
        }
        
        .header-search-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-radius: 30px !important;
            padding: 10px 24px 10px 48px !important;
            color: #ffffff !important;
            font-size: 0.9rem !important;
            font-family: 'Plus Jakarta Sans', sans-serif !important;
            outline: none !important;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }
        
        .header-search-input::placeholder {
            color: rgba(255, 255, 255, 0.32) !important;
        }
        
        .header-search-input:focus {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(108, 92, 231, 0.8) !important;
            box-shadow: 0 0 18px rgba(108, 92, 231, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        }
        
        .header-search-input:focus + .search-icon {
            color: rgba(108, 92, 231, 1);
        }
        
        .header-profile-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-shrink: 0;
        }
        
        /* Bottom Row navigation capsule styling: Left-aligned to align with logo */
        .header-bottom-row {
            display: flex;
            justify-content: flex-start !important;
            width: 100%;
        }
        
        /* Borderless and background-less nav list */
        .desktop-capsule-nav {
            display: flex;
            align-items: center;
            gap: 20px;
            background: none !important;
            border: none !important;
            padding: 0 !important;
            box-shadow: none !important;
        }
        
        .capsule-nav-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255, 255, 255, 0.6) !important;
            text-decoration: none !important;
            font-size: 0.86rem !important;
            font-weight: 600 !important;
            padding: 8px 16px !important;
            border-radius: 30px !important;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        }
        
        .capsule-nav-item i {
            font-size: 0.9rem;
            transition: transform 0.2s ease;
        }
        
        .capsule-nav-item:hover {
            color: #ffffff !important;
            background: rgba(255, 255, 255, 0.05);
        }
        
        .capsule-nav-item:hover i {
            transform: scale(1.1);
        }
        
        /* Active capsule nav state (matching screenshot) */
        .capsule-nav-item.active {
            background: rgba(108, 92, 231, 0.18) !important;
            color: #a29bfe !important;
            border: 1px solid rgba(108, 92, 231, 0.3) !important;
            box-shadow: 0 0 12px rgba(108, 92, 231, 0.2);
        }
        
        .capsule-nav-item.active i {
            color: #a29bfe !important;
            filter: drop-shadow(0 0 6px rgba(108, 92, 231, 0.5));
        }
        
        .desktop-signin-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            color: #ffffff !important;
            text-decoration: none !important;
            font-size: 0.85rem !important;
            font-weight: 700 !important;
            padding: 8px 18px !important;
            border-radius: 20px !important;
            transition: all 0.25s ease !important;
        }
        
        .desktop-signin-btn:hover {
            background: rgba(108, 92, 231, 0.15) !important;
            border-color: rgba(108, 92, 231, 0.4) !important;
            color: #a29bfe !important;
            transform: translateY(-1px);
        }
    }
    
    @media (max-width: 992px) {
        :root {
            --header-height-mobile: 56px !important;
            --header-height: 56px !important;
        }
        .header {
            height: 56px !important;
        }
        .header.scrolled {
            height: 56px !important;
        }
        .desktop-header-only {
            display: none !important;
        }
        .mobile-header-only {
            display: flex !important;
            width: 100% !important;
            height: 56px !important; /* h-14 */
            align-items: center !important;
            justify-content: space-between !important;
            padding: 0 16px !important; /* padding 0px 16px */
            gap: 16px !important; /* gap-4 */
        }
    }
