/* =========================================================
   CardNFC — Navbar Styles
   elements/navbar.css
   ========================================================= */

/* ---------------------------------------------------------
   Nav wrapper & pill
   --------------------------------------------------------- */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 8px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------
   Brand
   --------------------------------------------------------- */
.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    width: 24px;
    height: 24px;
    background: var(--text-main);
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: var(--bg);
    font-size: 12px;
}

/* ---------------------------------------------------------
   Nav Links
   --------------------------------------------------------- */
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--text-main);
}

/* ---------------------------------------------------------
   Language Dropdown
   --------------------------------------------------------- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-dropdown.active .lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-width: 140px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.lang-dropdown.active .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.lang-menu a:hover,
.lang-menu a.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* ---------------------------------------------------------
   Theme Toggle Switch
   --------------------------------------------------------- */
.theme-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.theme-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    transition: background 0.35s var(--easing), border-color 0.35s var(--easing);
    cursor: pointer;
}

.theme-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-main);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
    transition: transform 0.35s var(--easing), background 0.35s var(--easing), box-shadow 0.35s var(--easing);
}

/* Icons inside the track */
.theme-slider::after {
    content: '☀';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.theme-switch input:checked+.theme-slider {
    background: rgba(200, 200, 255, 0.15);
    border-color: rgba(200, 200, 255, 0.25);
}

.theme-switch input:checked+.theme-slider::before {
    transform: translateX(20px);
    background: #e0e8ff;
    box-shadow: 0 0 8px rgba(180, 180, 255, 0.5);
}

.theme-switch input:checked+.theme-slider::after {
    content: '☾';
    left: 5px;
    right: auto;
}

.theme-switch-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

/* ---------------------------------------------------------
   Nav Actions
   --------------------------------------------------------- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
}

/* ---------------------------------------------------------
   Mobile Sidebar
   --------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 2000;
    padding: 24px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.close-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.sidebar-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1050px) {
    .nav-links {
        display: none;
    }

    .nav-inner {
        margin: 0 20px;
    }

    .hide-mobile {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* ---------------------------------------------------------
   Light Theme Overrides
   --------------------------------------------------------- */

/* Nav pill — frosted white glass */
[data-theme="light"] .nav-inner {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
}

/* Language button */
[data-theme="light"] .lang-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.09);
}

[data-theme="light"] .lang-btn:hover,
[data-theme="light"] .lang-dropdown.active .lang-btn {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Language dropdown menu */
[data-theme="light"] .lang-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .lang-menu a:hover,
[data-theme="light"] .lang-menu a.active {
    background: rgba(0, 0, 0, 0.04);
}

/* Theme slider in light mode — light track, dark knob */
[data-theme="light"] .theme-slider {
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-slider::before {
    background: #0a0a0a;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .theme-slider::after {
    color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-switch input:checked+.theme-slider {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .theme-switch input:checked+.theme-slider::before {
    background: #4f46e5;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}