/**
 * Header Styles - Mobile-First Responsive Design
 * hd-* prefix for all classes
 */

:root {
    --hd-height: 64px;
    --hd-logo-size: 1.3rem;
    --hd-bg: #1a1a1a;
    --hd-border: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Base Header (Mobile First)
   ============================================ */
.hd-navbar {
    background: var(--hd-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    height: var(--hd-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 1px solid var(--hd-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Logo */
.hd-logo a {
    display: block;
    font-weight: 700;
    font-size: var(--hd-logo-size);
    color: #fff;
    letter-spacing: 1px;
    font-family: 'Space Mono', monospace;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff2d55, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* Nav Links - Hidden on mobile */
.hd-nav {
    display: none;
}

/* Search - Hidden on mobile */
.hd-search {
    display: none;
}

/* Mobile Menu Toggle */
.hd-menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    color: #fff;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-menu-toggle:hover {
    background: rgba(255, 45, 85, 0.2);
    border-color: #ff2d55;
}

/* ============================================
   Mobile Drawer
   ============================================ */
.hd-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.hd-drawer.open {
    display: block;
}

.hd-drawer-content {
    background: var(--hd-bg);
    width: 100%;
    max-height: 70vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding-top: 70px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.hd-drawer-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    color: #fff;
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hd-drawer-close:hover {
    background: rgba(255, 45, 85, 0.2);
    border-color: #ff2d55;
}

/* Mobile Search */
.hd-mobile-search {
    margin: 12px 0;
    padding: 0 20px;
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
}

.hd-mobile-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 10px 16px;
}

.hd-mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 10px;
    outline: none;
    font-family: 'Space Mono', monospace;
}

.hd-mobile-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hd-mobile-search-btn {
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-mobile-search-btn:hover {
    transform: scale(1.1);
}

/* Drawer Nav Links */
.hd-drawer-nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Space Mono', monospace;
    font-weight: 600;
    text-align: center;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
}

.hd-drawer-nav-link:hover {
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    color: #fff;
}

.hd-drawer-nav-link.hd-drawer-active {
    background: linear-gradient(135deg, #ff2d55, #ff375f);
    color: #fff;
}

/* ============================================
   Tablet (768px and up)
   ============================================ */
@media (min-width: 768px) {
    :root {
        --hd-height: 64px;
        --hd-logo-size: 1.4rem;
    }

    .hd-navbar {
        padding: 0 24px;
        gap: 16px;
    }

    /* Show nav on tablet */
    .hd-nav {
        display: flex;
        gap: 4px;
        align-items: center;
        flex-wrap: wrap;
        min-width: 0;
        flex-shrink: 1;
        margin-left: auto;
    }

    .hd-nav a {
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        margin: 0 3px;
        font-size: 0.8rem;
        font-weight: 600;
        border-radius: 20px;
        transition: all 0.3s ease;
        padding: 5px 10px;
        font-family: 'Space Mono', monospace;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .hd-nav a:hover {
        background: linear-gradient(135deg, #ff2d55, #ff375f);
        color: #fff;
        box-shadow: 0 4px 15px rgba(255, 45, 85, 0.3);
    }

    .hd-nav a.hd-active {
        background: linear-gradient(135deg, #ff2d55, #ff375f);
        color: #fff;
        box-shadow: 0 4px 15px rgba(255, 45, 85, 0.3);
    }

    /* Show search on tablet */
    .hd-search {
        display: block;
        flex: 0 1 160px;
        margin-left: 8px;
    }

    .hd-search-form {
        display: flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 4px 10px;
        transition: all 0.3s ease;
    }

    .hd-search-form:focus-within {
        background: rgba(255, 255, 255, 0.12);
        border-color: #ff2d55;
        box-shadow: 0 0 15px rgba(255, 45, 85, 0.2);
    }

    .hd-search-input {
        flex: 1;
        border: none;
        background: transparent;
        color: #fff;
        font-size: 0.75rem;
        padding: 6px 8px;
        outline: none;
        font-family: 'Space Mono', monospace;
    }

    .hd-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .hd-search-btn {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        padding: 6px;
        border-radius: 50%;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hd-search-btn:hover {
        background: rgba(255, 45, 85, 0.2);
        color: #ff2d55;
    }

    .hd-search-form:focus-within .hd-search-btn {
        color: #ff2d55;
    }

    /* Hide mobile toggle on tablet */
    .hd-menu-toggle {
        display: none;
    }

    /* Mobile drawer hidden on tablet */
    .hd-drawer {
        display: none !important;
    }

    .hd-drawer.open {
        display: none !important;
    }
}

/* ============================================
   Desktop (1024px and up)
   ============================================ */
@media (min-width: 1024px) {
    .hd-navbar {
        padding: 0 32px;
        gap: 20px;
    }

    .hd-logo {
        font-size: 1.5rem;
    }

    .hd-nav {
        gap: 8px;
    }

    .hd-nav a {
        font-size: 0.85rem;
        margin: 0 8px;
        padding: 8px 14px;
    }

    .hd-search {
        flex: 0 1 200px;
        margin-left: 12px;
    }

    .hd-search-form {
        padding: 6px 12px;
        border-radius: 25px;
    }

    .hd-search-input {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

/* ============================================
   Large Desktop (1300px and up)
   ============================================ */
@media (min-width: 1300px) {
    .hd-navbar {
        width: 100%;
        left: 0;
        border-radius: 0;
    }
}
