/* ================================================================
   CultCrit Nav — Header, Hamburger, Side Drawer, Footer
================================================================ */

/* ── Header ── */
header {
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

/* ── Marka ── */
.nav-brand    { display: flex; align-items: baseline; gap: 2px; flex-shrink: 0; text-decoration: none; }
.brand-crit   { font-family: var(--font-display); font-size: 1.5rem; color: var(--text); line-height: 1; }
.hamburger-btn:hover { border-color: var(--border-strong); background: var(--bg-alt); }
.hamburger-btn svg   { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; fill: none; }
.hamburger-btn .icon-open  { display: block; }
.hamburger-btn .icon-close { display: none; }
.hamburger-btn.active .icon-open  { display: none; }
.hamburger-btn.active .icon-close { display: block; }

/* ── Overlay ── */
.menu-overlay {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(10,9,8,0.50);
    opacity: 0; pointer-events: none;
    transition: opacity 0.35s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.menu-overlay.open { opacity: 1; pointer-events: all; }

/* ── Drawer ── */
.side-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(380px, 92vw);
    z-index: 210;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.32, 0, 0.15, 1);
    overflow: hidden;
}
.side-drawer.open { transform: translateX(0); }

.drawer-header {
    height: var(--nav-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.drawer-brand { font-family: var(--font-display); font-size: 1.25rem; color: var(--text); }

.drawer-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s, border-color 0.2s;
}
.drawer-close:hover { color: var(--text); border-color: var(--border-strong); }
.drawer-close svg   { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; }

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    overscroll-behavior: contain;
}
.drawer-body::-webkit-scrollbar       { width: 4px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.drawer-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.625rem;
    padding-left: 0.25rem;
}

.drawer-nav   { list-style: none; margin-bottom: 1.75rem; }
.drawer-nav li + li { margin-top: 2px; }
.drawer-nav a {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 400;
    font-size: 0.9375rem;
    transition: background 0.15s;
    text-decoration: none;
}
.drawer-nav a:hover { background: var(--bg-alt); }
.drawer-nav .nav-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.drawer-nav a:hover .nav-icon { background: var(--bg-deep); }
.drawer-nav .nav-label  { flex: 1; }
.drawer-nav .nav-arrow  { color: var(--text-faint); font-size: 0.75rem; transition: transform 0.15s, color 0.15s; }
.drawer-nav a:hover .nav-arrow { transform: translateX(3px); color: var(--text-muted); }
.drawer-nav a.accent { background: var(--gold-bg); border: 1px solid rgba(201,149,58,0.15); }
.drawer-nav a.accent .nav-icon { background: rgba(201,149,58,0.15); }
.drawer-nav a.accent:hover { background: rgba(201,149,58,0.14); }

.drawer-sep  { height: 1px; background: var(--border); margin-bottom: 1.75rem; }

/* Drawer kontroller */
.drawer-controls { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.75rem; }
.control-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0.875rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.control-label { font-size: 0.875rem; color: var(--text-muted); font-weight: 400; }

.theme-pill         { display: flex; background: var(--bg-deep); border-radius: 8px; padding: 3px; gap: 2px; }
.theme-pill button  { padding: 5px 12px; border-radius: 6px; border: none; background: transparent; color: var(--text-muted); font-size: 0.8125rem; font-family: var(--font-body); cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.theme-pill button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.lang-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: pointer;
    outline: none;
    min-width: 90px;
    width: auto;
    min-height: unset;
}
.lang-select:focus { border-color: var(--gold); }

/* Auth bloğu drawer içinde */
.auth-user-card {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.875rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.875rem;
}
.auth-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--gold-bg);
    border: 1px solid rgba(201,149,58,0.25);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
}
.auth-user-info .username  { font-weight: 500; font-size: 0.9375rem; }
.auth-user-info .user-role { font-size: 0.8rem; color: var(--text-muted); }

.drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.drawer-footer-brand { font-family: var(--font-display); font-size: 0.9rem; color: var(--text-faint); }
.drawer-version      { font-size: 0.75rem; color: var(--text-faint); }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 2rem;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media(min-width:768px) {
    .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-brand  { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); }
.footer-links  { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
