/* ─────────────────────────────────────────
   REVNAK — Shared Navbar Styles
   Tüm sayfalarda ortak kullanılır.
───────────────────────────────────────── */

/* Skip link */
.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 9999;
    padding: 12px 20px; background: #2C5F8D; color: #fff;
    font-size: 14px; font-weight: 700; text-decoration: none;
    font-family: "Inter", system-ui, sans-serif;
    transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: 86px; background: #0F1B2D; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
[data-theme="dark"] .site-header { background: #060E1C; }

/* Inner layout */
.nav-inner {
    height: 86px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    width: min(1320px, calc(100% - 48px)); margin: 0 auto;
}

/* Brand */
.brand {
    display: inline-flex; align-items: center;
    color: inherit; text-decoration: none; flex-shrink: 0;
}
.brand-logo {
    height: 44px;
    width: auto;
    display: block;
    /* navbar her zaman koyu arka plan — logoyu beyaza çevir */
    filter: brightness(0) invert(1);
    transition: opacity .2s;
}
@media (max-width: 1120px) { .brand-logo { height: 36px; } }
.brand:hover .brand-logo { opacity: .85; }

/* Nav links */
.nav-menu {
    display: flex; align-items: center; gap: 22px; margin-left: auto;
}
.nav-link {
    position: relative;
    color: rgba(255,255,255,.82); font-size: 13px; font-weight: 700;
    white-space: nowrap; text-decoration: none;
    transition: color .2s;
}
.nav-link:hover { color: #fff; }
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -9px;
    height: 2px; background: #2C5F8D;
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: #fff; }

/* ── Dropdown ── */
.nav-dropdown { position: relative; }

.dropdown-trigger {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 0; font: inherit;
}
.dropdown-trigger .chevron {
    transition: transform .25s;
    margin-top: 1px;
}
.nav-dropdown.open .chevron { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute; top: calc(100% + 18px); left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 210px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 32px rgba(15,27,45,.16);
    padding: 6px;
    opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
    pointer-events: none;
    z-index: 200;
}
[data-theme="dark"] .dropdown-menu {
    background: #161C27;
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.nav-dropdown.open .dropdown-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Arrow indicator */
.dropdown-menu::before {
    content: "";
    position: absolute; top: -6px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px; height: 10px;
    background: #fff;
    border-left: 1px solid rgba(0,0,0,.08);
    border-top: 1px solid rgba(0,0,0,.08);
}
[data-theme="dark"] .dropdown-menu::before {
    background: #161C27;
    border-color: rgba(255,255,255,.1);
}

.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    font-size: 13px; font-weight: 600;
    color: #1A2942;
    text-decoration: none;
    transition: background .15s, color .15s;
    border-radius: 2px;
}
.dropdown-item:hover { background: #F5F7FA; color: #2C5F8D; }
.dropdown-item svg { flex-shrink: 0; color: #8A96A8; transition: color .15s; }
.dropdown-item:hover svg { color: #2C5F8D; }
[data-theme="dark"] .dropdown-item { color: #C8D0DC; }
[data-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,.06); color: #7BAFD4; }
[data-theme="dark"] .dropdown-item svg { color: #5A6478; }
[data-theme="dark"] .dropdown-item:hover svg { color: #7BAFD4; }

/* CTA button */
.nav-cta {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 10px 20px;
    background: #2C5F8D; color: #fff;
    font-size: 13px; font-weight: 700;
    text-decoration: none; white-space: nowrap;
    transition: background .2s;
}
.nav-cta:hover { background: #1A4A72; color: #fff; }

/* Right controls */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Language switch */
.lang-switch { display: flex; align-items: center; gap: 4px; }
.lang-btn {
    background: none; border: none; cursor: pointer; font: inherit;
    font-size: 12px; font-weight: 700; color: rgba(255,255,255,.5);
    padding: 4px 2px; transition: color .2s; letter-spacing: .5px;
}
.lang-btn:hover { color: rgba(255,255,255,.85); }
.lang-btn.active { color: #fff; }
.lang-sep { font-size: 11px; color: rgba(255,255,255,.25); }
.site-header.scrolled .lang-btn { color: rgba(15,27,45,.4); }
.site-header.scrolled .lang-btn.active { color: #0F1B2D; }
.site-header.scrolled .lang-btn:hover { color: #0F1B2D; }
.site-header.scrolled .lang-sep { color: rgba(15,27,45,.2); }
[data-theme="dark"] .site-header.scrolled .lang-btn { color: rgba(255,255,255,.4); }
[data-theme="dark"] .site-header.scrolled .lang-btn.active { color: #E5E9EF; }
[data-theme="dark"] .site-header.scrolled .lang-btn:hover { color: #E5E9EF; }
[data-theme="dark"] .site-header.scrolled .lang-sep { color: rgba(255,255,255,.15); }

/* Dark mode toggle */
.dm-toggle {
    width: 44px; height: 44px;
    border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
    background: transparent; color: #fff;
    cursor: pointer; display: grid; place-items: center;
    transition: background .2s; font: inherit;
}
.dm-toggle:hover { background: rgba(255,255,255,.1); }
.dm-icon-stack { display: grid; width: 18px; height: 18px; }
.dm-icon-stack svg { grid-area: 1/1; transition: opacity .2s, transform .3s; }
.icon-moon { opacity: 1; transform: scale(1); }
.icon-sun  { opacity: 0; transform: rotate(90deg) scale(.7); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(.7); }
[data-theme="dark"] .icon-sun  { opacity: 1; transform: none; }

/* Hamburger */
.menu-toggle {
    display: none;
    width: 44px; height: 44px;
    border: 1px solid rgba(255,255,255,.3);
    background: transparent; color: #fff;
    cursor: pointer; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
    font: inherit;
}
.menu-bar {
    display: block; width: 20px; height: 2px;
    background: currentColor;
    transition: transform .3s, opacity .2s;
}
.menu-toggle.open .menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Back to top button */
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 999;
    width: 44px; height: 44px;
    background: #2C5F8D; color: #fff;
    border: none; cursor: pointer;
    display: grid; place-items: center;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, visibility .25s, transform .25s, background .2s;
    font: inherit;
}
.back-to-top.visible {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover { background: #1A4A72; }
[data-theme="dark"] .back-to-top { background: #2C5F8D; }
[data-theme="dark"] .back-to-top:hover { background: #1A4A72; }

/* ── Mobile ── */
@media (max-width: 860px) {
    .nav-menu {
        position: fixed; inset: 86px 0 auto 0;
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        padding: 16px 24px 24px;
        background: #0F1B2D; border-top: 1px solid rgba(255,255,255,.1);
    }
    [data-theme="dark"] .nav-menu { background: #060E1C; }
    .nav-menu.open { display: flex; }
    .nav-link {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        color: rgba(255,255,255,.85);
    }
    .nav-link::after { display: none; }
    .nav-cta { margin-top: 16px; justify-content: center; }
    .menu-toggle { display: flex; }

    /* Dropdown — mobile: inline accordion */
    .nav-dropdown { width: 100%; }
    .dropdown-trigger {
        width: 100%; justify-content: space-between;
        padding: 14px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        color: rgba(255,255,255,.85);
    }
    .dropdown-menu {
        position: static; transform: none;
        box-shadow: none; border: none;
        background: rgba(255,255,255,.04);
        opacity: 1; visibility: visible;
        pointer-events: auto;
        padding: 0; min-width: 0;
        display: none;
    }
    .dropdown-menu::before { display: none; }
    .nav-dropdown.open .dropdown-menu { display: block; transform: none; }
    .dropdown-item {
        color: rgba(255,255,255,.7);
        padding: 11px 12px 11px 22px;
        border-bottom: 1px solid rgba(255,255,255,.05);
        border-radius: 0;
    }
    .dropdown-item:hover { background: rgba(255,255,255,.06); color: #fff; }
    .dropdown-item svg { color: rgba(255,255,255,.35); }
    .dropdown-item:hover svg { color: rgba(255,255,255,.8); }
}
