/* ==========================================================================
   NAVBAR CSS - POLYBITS THEME
   Premium Glassmorphism Design
   ========================================================================== */

/* ==========================================
   DESKTOP NAVBAR
   ========================================== */
.desktop-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 75, 75, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hide on mobile */
@media (max-width: 767px) {
    .desktop-navbar {
        display: none;
    }
}

.navbar-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 991px) {
    .navbar-container {
        padding: 0 24px;
    }
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height-desktop);
}

/* Logo */
.navbar-logo {
    display: block;
    width: 180px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 8px rgba(255, 75, 75, 0.4));
}

.navbar-logo .polybits-logo {
    width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .navbar-logo {
        width: 150px;
    }
}

/* Navigation Links */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1199px) {
    .nav-link {
        font-size: 16px;
        padding: 6px 12px;
        letter-spacing: 1px;
    }
}

@media (max-width: 991px) {
    .nav-link {
        font-size: 15px;
    }
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff4b4b 0%, #ff7b7b 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover {
    background: rgba(255, 75, 75, 0.1);
    color: #ff4b4b;
    text-shadow: 0 0 20px rgba(255, 75, 75, 0.5);
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link.active {
    background: rgba(255, 75, 75, 0.15);
    color: #ff4b4b;
}

.nav-link.active::before {
    width: 80%;
}

/* Search Toggle */
.nav-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.nav-search-toggle:hover {
    background: rgba(255, 75, 75, 0.15);
    border-color: rgba(255, 75, 75, 0.3);
    color: #ff4b4b;
}

/* Shimmer Animation Line */
.desktop-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            #ff4b4b 20%,
            #ff7b7b 50%,
            #ff4b4b 80%,
            transparent 100%);
    opacity: 0.6;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.4;
        transform: translateX(-5%);
    }

    50% {
        opacity: 0.8;
        transform: translateX(5%);
    }
}

/* ==========================================
   SEARCH OVERLAY
   ========================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    max-width: 600px;
    width: 90%;
    position: relative;
}

.search-overlay .search-form {
    display: flex;
    gap: 12px;
}

.search-overlay .search-field {
    flex: 1;
    padding: 18px 24px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 75, 75, 0.3);
    border-radius: 12px;
    color: #fff;
}

.search-overlay .search-field:focus {
    border-color: #ff4b4b;
    box-shadow: 0 0 0 4px rgba(255, 75, 75, 0.2);
}

.search-overlay .search-field::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-overlay .search-submit {
    padding: 18px 32px;
    background: #ff4b4b;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-overlay .search-submit:hover {
    background: #e03e3e;
    transform: translateY(-2px);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: rgba(255, 75, 75, 0.3);
    border-color: rgba(255, 75, 75, 0.5);
}

/* ==========================================
   MOBILE NAVBAR
   ========================================== */
.mobile-navbar {
    display: none;
}

@media (max-width: 767px) {
    .mobile-navbar {
        display: block;
    }
}

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 75, 75, 0.15);
    height: var(--nav-height-mobile);
}

.mobile-logo {
    width: 120px;
}

.mobile-logo .polybits-logo {
    width: 100%;
    height: auto;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hamburger Button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   SIDEBAR OVERLAY
   ========================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   MOBILE SIDEBAR
   ========================================== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 100%);
    z-index: 120;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 75, 75, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.mobile-sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    width: 100px;
}

.sidebar-logo .polybits-logo {
    width: 100%;
    height: auto;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 75, 75, 0.2);
    border-color: rgba(255, 75, 75, 0.3);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-link-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    margin-right: 14px;
}

.sidebar-link-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.sidebar-link:hover {
    background: rgba(255, 75, 75, 0.08);
    color: #fff;
    border-left-color: rgba(255, 75, 75, 0.5);
}

.sidebar-link.active {
    background: rgba(255, 75, 75, 0.12);
    color: #ff4b4b;
    border-left-color: #ff4b4b;
}

/* Sidebar Search */
.sidebar-search {
    padding: 16px 20px;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-search input:focus {
    outline: none;
    border-color: rgba(255, 75, 75, 0.5);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 20px;
}

/* Sidebar Social */
.sidebar-social {
    padding: 20px 24px;
}

.sidebar-social h4 {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-family: var(--font-body);
    font-weight: 600;
}

.sidebar-social .social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sidebar-social .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.sidebar-social .social-icons a:hover {
    background: rgba(255, 75, 75, 0.15);
    border-color: rgba(255, 75, 75, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}

.sidebar-footer a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-footer a:hover {
    color: #ff4b4b;
}

.sidebar-footer span {
    color: #333;
}

/* ==========================================
   LANGUAGE SWITCHER
   ========================================== */
.language-switcher {
    position: relative;
    margin-left: 8px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: rgba(255, 75, 75, 0.15);
    border-color: rgba(255, 75, 75, 0.3);
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
}

.lang-code {
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}

.lang-arrow {
    transition: transform 0.3s ease;
}

.language-switcher:hover .lang-arrow,
.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 75, 75, 0.15);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

.language-switcher:hover .lang-dropdown,
.language-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 75, 75, 0.1);
    color: #fff;
}

.lang-option.active {
    background: rgba(255, 75, 75, 0.15);
    color: #ff4b4b;
}

.lang-option .lang-flag {
    font-size: 18px;
}

.lang-option .lang-name {
    font-weight: 500;
}

/* Mobile Language Switcher */
.sidebar-lang-switcher {
    padding: 16px 24px;
}

.sidebar-lang-switcher h4 {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-family: var(--font-body);
    font-weight: 600;
}

.sidebar-lang-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sidebar-lang-options a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-lang-options a:hover {
    background: rgba(255, 75, 75, 0.1);
    border-color: rgba(255, 75, 75, 0.3);
    color: #fff;
}

.sidebar-lang-options a.active {
    background: rgba(255, 75, 75, 0.15);
    border-color: rgba(255, 75, 75, 0.4);
    color: #ff4b4b;
}