@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #0a0a0c;
    /* Fallback */
    --bg-gradient: linear-gradient(to bottom, #202020, #050505);
    --header-bg: rgba(10, 10, 12, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --nav-pill-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    /* Deep depth effect */
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header Styles */
.header-outer {
    width: 100%;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 12px 2px 2px;
    margin: 11px;
    background-color: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    width: calc(100% - 22px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-radius: 16px;
    gap: 0;
    min-height: 56px;
}

/* ── Search Trigger ──────────────────────────────────────────────── */
.header-search-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}
.header-search-trigger:hover {
    background: rgba(49, 168, 255, 0.15);
    border-color: rgba(49, 168, 255, 0.4);
    color: #31A8FF;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

.logo-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #333;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-primary);
}

/* Nav Menu Wrapper */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* No flex-grow — the header-right takes margin-left:auto */
}

/* Desktop Alignment */
.nav-group {
    margin: 0 auto;
    /* Centers the navigation group in the available space */
}

/* Ensure Logo and Social don't shrink */
.logo-section,
.social-group {
    flex-shrink: 0;
}

/* Desktop Defaults: Hide mobile-only elements */
.drawer-header,
.menu-title {
    display: none;
}

.social-link span {
    display: none;
    /* Hide social text on desktop */
}

/* Navigation Links */
.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    margin: 0 2px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Social Section */
.social-section {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background-color: black;
    padding: 0.4rem 1rem;
    border-radius: 50px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--nav-pill-bg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    margin-right: 1rem;
}

/* ── Tablet breakpoint (769px – 1024px) ── hides nav/social, shows burger ── */
@media (max-width: 1024px) {
    .main-header {
        padding: 4px 12px;
        gap: 0;
    }

    /* Hide the desktop nav links and social pill */
    .nav-group,
    .social-group {
        display: none !important;
    }

    /* The mobile drawer (nav-menu) itself stays in DOM for the hamburger to open */
    .nav-menu {
        display: none;
        /* hidden until hamburger clicked */
    }

    .menu-toggle {
        display: block;
        z-index: 1002;
        margin-right: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-header {
        padding: 0.8rem 1rem;
        border-radius: 0;
        margin: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        z-index: 1002;
    }

    /* Mobile Drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #000000f2;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transition: right 0.3s ease;
        z-index: 1001;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        padding: 2rem 1.5rem;
        gap: 2rem;
        /* Override the display:none we set in tablet breakpoint */
        display: flex !important;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Show nav-group and social-group inside the drawer */
    .nav-group,
    .social-group {
        display: flex !important;
    }

    /* Mobile Drawer Header */
    .drawer-header {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }

    .drawer-header .logo-section {
        margin-left: 0;
    }

    /* Menu Groups */
    .menu-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
    }

    .menu-title {
        display: block;
        font-size: 0.8rem;
        text-transform: uppercase;
        color: #666;
        /* Muted text for headers */
        font-weight: 500;
        padding-left: 0.5rem;
    }

    /* Nav List Vertical */
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        /* Spacing between items */
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        /* Bigger touch targets */
        margin: 0;
        width: 100%;
        /* Rounded items like image */
        background-color: transparent;
        /* Clean start */
        font-weight: 400;
    }

    .nav-link.active {
        background-color: #2a2a2a;
        /* Highlight active item in drawer */
    }


    /* Social Section Vertical */
    .social-section {
        flex-direction: column;
        background-color: transparent;
        padding: 0;
        gap: 0.5rem;
        width: 100%;
        align-items: flex-start;
    }

    .social-link {
        width: 100%;
        height: auto;
        border-radius: 12px;
        background-color: transparent;
        justify-content: flex-start;
        padding: 0.8rem 1rem;
        /* Same as nav links */
        gap: 1rem;
        font-size: 1rem;
    }

    .social-link i {
        font-size: 1.2rem;
        width: 24px;
        /* Fixed width icon alignment */
        text-align: center;
    }

    .social-link span {
        display: block;
        /* Show text on mobile */
    }

    .social-link:hover {
        background-color: #2a2a2a;
        /* Hover background */
        color: var(--text-secondary);
        /* Keep text color same */
        transform: none;
        /* remove lift effect for list items */
    }

    .social-link:hover i {
        color: var(--text-primary);
    }
}