/* ====================================================
   HARTO NAV - Shared navigation component
   All pages include this file
   ==================================================== */

.harto-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--nav-bg, #111);
    border-bottom: 1px solid var(--border, #222);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}
.harto-nav-brand {
    font-family: 'TT Commons Pro', 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--nav-text, #fff);
    letter-spacing: 2px;
    text-decoration: none;
    flex-shrink: 0;
}
.harto-nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
}
.harto-nav-links a {
    color: var(--nav-text, #ccc);
    text-decoration: none;
    font-size: 0.82rem;
    opacity: 0.6;
    transition: opacity 0.2s, color 0.2s;
    white-space: nowrap;
}
.harto-nav-links a:hover,
.harto-nav-links a.active { opacity: 1; color: var(--primary, #713EFD); }

.harto-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border, #333);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text, #fff);
    transition: background 0.2s;
    line-height: 1;
}
.theme-toggle:hover { background: rgba(255,255,255,0.06); }

/* Hamburger - always hidden on desktop */
.harto-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    padding: 7px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border, #333);
    flex-shrink: 0;
}
.harto-hamburger span {
    display: block;
    height: 2px;
    background: var(--text, #fff);
    border-radius: 2px;
    transition: all 0.25s ease;
    width: 100%;
}
.harto-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #FB3100; }
.harto-hamburger.open span:nth-child(2) { opacity: 0; }
.harto-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #FB3100; }

/* Overlay */
.harto-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
}
.harto-overlay.open { display: block; }

/* Drawer */
.harto-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card, #1a1a1a);
    border-left: 1px solid var(--border, #333);
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.harto-drawer.open { right: 0; }

.harto-drawer-header {
    padding: 20px 20px 14px;
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--text-muted, #666);
    border-bottom: 1px solid var(--border, #333);
    font-family: monospace;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.harto-drawer-close {
    background: none;
    border: none;
    color: var(--text-muted, #666);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.harto-drawer-section {
    padding: 12px 20px 4px;
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--text-muted, #555);
    text-transform: uppercase;
    font-family: monospace;
}
.harto-drawer a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    text-decoration: none;
    color: var(--text, #eee);
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s, color 0.15s;
}
.harto-drawer a:hover { background: rgba(113,62,253,0.1); color: #713EFD; }
.harto-drawer a.active { color: #713EFD; background: rgba(113,62,253,0.08); border-left: 3px solid #713EFD; }
.harto-drawer a .icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }

/* ====== MOBILE (≤768px) ====== */
@media screen and (max-width: 900px) {
    .harto-nav {
        padding: 12px 16px;
    }
    .harto-nav-links {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        overflow: hidden !important;
        flex: none !important;
    }
    .harto-hamburger {
        display: flex !important;
        visibility: visible !important;
    }
}

/* ====================================================
   NAV SIDEBAR (legacy drawer used across pages)
   ==================================================== */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.nav-overlay.open { display: block; }

.nav-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card, #1a1a1a);
    border-left: 1px solid var(--border, #333);
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.nav-sidebar.open { right: 0; }

.sidebar-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border, #333);
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    font-family: 'TT Commons Pro', monospace;
}
.sidebar-links {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 8px 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 24px;
    text-decoration: none;
    color: var(--text, #eee);
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: rgba(113,62,253,0.1); color: #713EFD; }
.sidebar-link.active { color: #713EFD; background: rgba(113,62,253,0.08); border-left: 3px solid #713EFD; }
.sidebar-link-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-link-label { font-weight: 500; }
.sidebar-link-desc { font-size: 0.72rem; color: var(--text-muted, #666); margin-top: 1px; }
.sidebar-divider {
    height: 1px;
    background: var(--border, #333);
    margin: 6px 0;
}
