/* =============================================
   NAV — LazyTextures  (modern 3D-assets style)
   Colors: #101010 bg · #1a1a1a / #2d2d2d nav
            #4096ff / #0066cc accent blue
   ============================================= */

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }

body, nav, a, button, input {
    font-family: 'Inter', sans-serif;
}

/* =============================================
   MAIN NAV BAR
   ============================================= */
#main-nav {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 28px;
    background: rgba(18, 18, 22, 0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(64, 150, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: visible;
}

/* ---- Accent stripe ---- */
.nav-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #4096ff 30%,
        #0099ff 60%,
        transparent 100%);
    opacity: 0.7;
    pointer-events: none;
}

/* =============================================
   LOGO
   ============================================= */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    margin-right: 32px;
    transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.85; }

.nav-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(64, 150, 255, 0.6));
}

.nav-logo-text {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.nav-logo-text strong {
    font-weight: 700;
    color: #fff;
}

/* =============================================
   DESKTOP NAV LINKS
   ============================================= */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #4096ff, #0066cc);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: #fff;
    background: rgba(64, 150, 255, 0.10);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link-highlight {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #4096ff 0%, #0066cc 100%);
    border: 1px solid rgba(64, 150, 255, 0.5);
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(64, 150, 255, 0.25);
}

.nav-link-highlight::after { display: none; }

.nav-link-highlight:hover {
    color: #fff;
    background: linear-gradient(135deg, #55aaff 0%, #004db3 100%);
    box-shadow: 0 6px 20px rgba(64, 150, 255, 0.4);
    transform: translateY(-1px);
}

/* =============================================
   RIGHT SIDE CONTROLS
   ============================================= */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ---- Search ---- */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(64, 150, 255, 0.25);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    width: 480px;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.10);
    border-color: #4096ff;
    box-shadow: 0 0 0 3px rgba(64, 150, 255, 0.15);
}

.search-icon-inner {
    margin-left: 12px;
    flex-shrink: 0;
    pointer-events: none;
}

#search-input {
    flex: 1;
    padding: 10px 10px 10px 8px;
    font-size: 13.5px;
    border: none;
    background: transparent;
    color: #fff;
    outline: none;
    min-width: 0;
}

#search-input::placeholder { color: rgba(255,255,255,0.4); }

#search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, #4096ff 0%, #0066cc 100%);
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

#search-button:hover {
    background: linear-gradient(135deg, #55aaff 0%, #004db3 100%);
    transform: none;
    box-shadow: none;
}

/* ---- Nav Buttons ---- */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.nav-btn-ghost {
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.nav-btn-ghost:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.nav-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #4096ff 0%, #0066cc 100%);
    border-color: rgba(64,150,255,0.4);
    box-shadow: 0 4px 14px rgba(64, 150, 255, 0.25);
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, #55aaff 0%, #004db3 100%);
    box-shadow: 0 6px 20px rgba(64, 150, 255, 0.4);
    transform: translateY(-1px);
}

.nav-btn-accent {
    color: #fff;
    background: rgba(64, 150, 255, 0.15);
    border-color: rgba(64, 150, 255, 0.35);
}

.nav-btn-accent:hover {
    background: rgba(64, 150, 255, 0.28);
    border-color: rgba(64, 150, 255, 0.6);
    transform: translateY(-1px);
}

/* =============================================
   HAMBURGER (hidden on desktop)
   ============================================= */
.mobile-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-left: 4px;
}

.mobile-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-hamburger:hover {
    background: rgba(64, 150, 255, 0.18);
    border-color: rgba(64, 150, 255, 0.4);
}

.mobile-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-hamburger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   MOBILE MENU BACKDROP
   ============================================= */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

/* =============================================
   MOBILE SLIDE-IN MENU
   ============================================= */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 90vw;
    height: 100dvh;
    background: linear-gradient(165deg, #161820 0%, #1e2028 100%);
    border-left: 1px solid rgba(64, 150, 255, 0.2);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-menu.active { transform: translateX(0); }

/* Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mobile-menu-close {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 22px;
    line-height: 1;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: background 0.2s;
}

.mobile-menu-close:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

/* Mobile search */
.mobile-menu-search {
    display: flex;
    align-items: center;
    margin: 14px 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(64, 150, 255, 0.25);
    border-radius: 50px;
    overflow: hidden;
}

.mobile-menu-search input {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.mobile-menu-search input::placeholder { color: rgba(255,255,255,0.4); }

#mobile-search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4096ff, #0066cc);
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    border-radius: 0 50px 50px 0;
}

/* Nav content */
.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 8px 12px 24px;
    flex: 1;
}

.mobile-menu-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 14px 10px 6px;
    display: block;
}

.mobile-menu-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mobile-menu-content a:hover {
    color: #fff;
    background: rgba(64, 150, 255, 0.12);
    border-color: rgba(64, 150, 255, 0.25);
}

.mobile-menu-content a.mobile-menu-highlight {
    color: #fff;
    background: linear-gradient(135deg, rgba(64,150,255,0.2) 0%, rgba(0,102,204,0.2) 100%);
    border-color: rgba(64, 150, 255, 0.35);
}

.mobile-menu-content a.mobile-menu-highlight:hover {
    background: linear-gradient(135deg, rgba(64,150,255,0.35) 0%, rgba(0,102,204,0.35) 100%);
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* Shrink links */
@media (max-width: 1600px) {
    .search-container { width: 380px; }
}

@media (max-width: 1400px) {
    .nav-link { padding: 8px 9px; font-size: 13px; }
    .search-container { width: 280px; }
    .nav-btn { padding: 9px 11px; font-size: 13px; }
}

/* Collapse to hamburger */
@media (max-width: 1200px) {
    #main-nav { padding: 0 16px; height: 60px; }

    .nav-links { display: none !important; }

    .nav-logo { margin-right: auto; }

    .search-container {
        width: auto;
        flex: 1;
        max-width: 460px;
        margin-right: 4px;
    }

    .nav-btn-ghost,
    .nav-btn-accent { display: none; }

    .nav-btn-primary {
        padding: 8px 12px;
        font-size: 13px;
    }

    .mobile-hamburger { display: flex; }
}

@media (max-width: 600px) {
    #main-nav {
        padding: 0 10px;
        overflow: hidden;
    }

    /* Hide logo on mobile — search bar + hamburger get full width */
    .nav-logo { display: none; }

    .nav-right {
        flex: 1;
        margin-left: 0;
        width: 100%;
        min-width: 0;
        gap: 8px;
    }

    .search-container {
        flex: 1;
        min-width: 0;
        width: auto;
        max-width: none;
    }

    /* Prevent search input from blocking shrink */
    #search-input {
        min-width: 0;
    }

    /* Keep hamburger pinned at its size, don't push offscreen */
    .mobile-hamburger {
        flex-shrink: 0;
        margin-left: 0;
    }

    .nav-btn-primary { display: none; }
}

/* Legacy helpers – keep old class names working */
.bottom-nav-mobile { display: none !important; }
.dropdown, .dropdown-content { display: none !important; }

