/* =========================================
   MOBİL — Cyber Matrix Nav (2026)
   ========================================= */

/* Animated hamburger / close (X) */
.cyber-hamburger {
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 10px;
    box-shadow: none !important;
    z-index: 1050;
    position: relative;
    transition:
        background 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-hamburger:focus {
    outline: none;
}

.cyber-hamburger:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.35) !important;
}

.cyber-hamburger__box {
    width: 22px;
    height: 22px;
    position: relative;
    display: block;
}

.cyber-hamburger__line {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    background: linear-gradient(90deg, #eceff1 0%, #ffffff 100%);
    border-radius: 1px;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.35s ease,
        box-shadow 0.35s ease;
    transform-origin: center;
    box-shadow: none;
}

.cyber-hamburger__line:nth-child(1) {
    transform: translateY(-7px);
}

.cyber-hamburger__line:nth-child(3) {
    transform: translateY(7px);
}

.cyber-hamburger:hover .cyber-hamburger__line,
.cyber-hamburger:focus-visible .cyber-hamburger__line {
    box-shadow: 0 0 6px rgba(0, 229, 255, 0.45);
}

.cyber-hamburger[aria-expanded="true"] {
    background: rgba(11, 12, 16, 0.72) !important;
    border-color: rgba(0, 229, 255, 0.38) !important;
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.45),
        0 0 18px rgba(0, 229, 255, 0.12) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.cyber-hamburger[aria-expanded="true"] .cyber-hamburger__line {
    background: #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.55);
}

.cyber-hamburger[aria-expanded="true"] .cyber-hamburger__line:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.cyber-hamburger[aria-expanded="true"] .cyber-hamburger__line:nth-child(2) {
    opacity: 0;
    transform: translateY(0) scaleX(0);
}

.cyber-hamburger[aria-expanded="true"] .cyber-hamburger__line:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

/* Desktop — panel gizli */
@media (min-width: 992px) {
    .mobile-nav-panel {
        display: none !important;
    }
}

/* Mobil tam ekran panel — body altında, viewport'a sabit */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 10050;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(11, 12, 16, 0.92);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.45s;
}

.mobile-nav-panel.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition:
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s;
}

@media (max-width: 991px) {
    .site-navbar .container {
        position: relative;
    }

    body.mobile-nav-open .site-navbar {
        z-index: 10055;
    }

    body.mobile-nav-open .site-navbar .container {
        position: relative;
        z-index: 10056;
    }

    body.mobile-nav-open .site-navbar .brand-logo {
        position: relative;
        z-index: 10056;
    }

    body.mobile-nav-open .cyber-hamburger {
        position: relative;
        z-index: 10060;
    }

    .mobile-nav-panel {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-nav-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        padding: var(--mobile-nav-offset, 78px) 0 0;
        box-sizing: border-box;
    }

    .mobile-nav-split {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0.65rem 0 0;
        margin: 0;
        box-sizing: border-box;
    }

    .mobile-nav-links-col {
        flex: 0 0 58%;
        max-width: 58%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        align-self: stretch;
        height: 100%;
        min-height: 0;
        padding: 0 0.65rem 0.35rem 0.85rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav-groups {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 100%;
        flex: 1 1 auto;
        min-height: 100%;
        height: 100%;
        gap: 0;
    }

    .mobile-nav-visual-col {
        flex: 0 0 42%;
        max-width: 42%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        align-self: stretch;
        padding: 0 0.85rem 0.35rem 0.35rem;
        overflow: hidden;
        min-height: 0;
    }

    .mobile-nav-footer {
        flex: 0 0 auto;
        width: 100%;
        padding: 0.85rem 1rem max(0.85rem, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(0, 229, 255, 0.12);
        background: rgba(0, 0, 0, 0.35);
        box-sizing: border-box;
    }

    .mobile-nav-groups > .mobile-nav-group__label {
        flex: 0 0 auto;
        display: block;
    }

    .mobile-nav-group__label {
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.58rem;
        font-weight: 600;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: #6b7280;
        margin: 0;
        padding: 0 0 0 0.3rem;
    }

    .mobile-nav-link {
        display: block;
        position: relative;
        flex: 0 0 auto;
        padding: 0.35rem 0.35rem 0.35rem 1.25rem !important;
        margin-bottom: 0;
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 1rem;
        font-weight: 500;
        color: #e5e7eb !important;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: color 0.25s ease, padding-left 0.25s ease;
    }

    .mobile-nav-link::before {
        content: '';
        position: absolute;
        left: 0.15rem;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: transparent;
        box-shadow: none;
        transition: all 0.25s ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus,
    .mobile-nav-link.active {
        color: #00e5ff !important;
        padding-left: 1.55rem !important;
    }

    .mobile-nav-link:hover::before,
    .mobile-nav-link:focus::before,
    .mobile-nav-link.active::before {
        background: #00e5ff;
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
    }

    /* Visual — unified cyber radar column */
    .mobile-nav-cyber-panel {
        width: 100%;
        height: 100%;
        min-height: 100%;
        flex: 1 1 auto;
        align-self: stretch;
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        background:
            repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(0, 229, 255, 0.055) 11px, rgba(0, 229, 255, 0.055) 12px),
            repeating-linear-gradient(90deg, transparent, transparent 11px, rgba(0, 229, 255, 0.055) 11px, rgba(0, 229, 255, 0.055) 12px),
            radial-gradient(ellipse at 50% 20%, rgba(0, 229, 255, 0.08), transparent 55%),
            rgba(30, 41, 59, 0.2);
        border: 1px solid rgba(0, 229, 255, 0.12);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-sizing: border-box;
        transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-nav-cyber-panel .scan-line {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, transparent, #00e5ff, transparent);
        box-shadow: 0 0 10px #00e5ff;
        opacity: 0.8;
        z-index: 2;
        pointer-events: none;
        animation: cyberScan 7s ease-in-out infinite;
        will-change: top;
    }

    @keyframes cyberScan {
        0% {
            top: 0%;
        }
        50% {
            top: calc(100% - 2px);
        }
        100% {
            top: 0%;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .mobile-nav-cyber-panel .scan-line {
            animation: none;
            top: 50%;
        }
    }

    /* Footer */
    .mobile-nav-footer__row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
    }

    .mobile-nav-social {
        display: flex;
        gap: 0.65rem;
    }

    .mobile-nav-social a {
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        color: #d1d5db;
        font-size: 1rem;
        text-decoration: none;
        transition: all 0.25s ease;
    }

    .mobile-nav-social a:hover {
        color: #00e5ff;
        border-color: rgba(0, 229, 255, 0.45);
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
    }

    .mobile-nav-footer__lang {
        margin-top: 0.65rem;
        padding-top: 0.75rem;
        padding-left: 1rem;
        padding-right: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-nav-footer__lang .lang-switcher--mobile {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .lang-switcher--mobile .lang-switcher__label {
        margin-bottom: 0.5rem;
        color: #b0bec5;
        justify-content: center;
        width: 100%;
    }

    .lang-switcher--mobile .lang-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        max-width: 18rem;
        margin: 0 auto;
    }

    .lang-switcher--mobile .lang-flag-btn {
        display: inline-flex !important;
    }

    .lang-switcher--mobile .lang-flag-btn__img {
        width: 32px;
        height: 32px;
    }
}

/* Tactical split-screen — phones & small tablets */
@media (max-width: 767px) {
    .mobile-nav-layout {
        padding-top: var(--mobile-nav-offset, 82px);
    }

    .mobile-nav-split {
        align-items: stretch;
        flex: 1 1 auto;
        width: 100%;
        padding-top: 0.5rem;
    }

    .mobile-nav-links-col {
        flex: 0 0 58%;
        max-width: 58%;
        padding: 0 0.45rem 0.25rem 0.75rem;
    }

    .mobile-nav-visual-col {
        flex: 0 0 42%;
        max-width: 42%;
        padding: 0 0.75rem 0.25rem 0.25rem;
    }

    .mobile-nav-groups {
        justify-content: space-between;
        min-height: 100%;
        height: 100%;
    }

    .mobile-nav-group__label {
        font-size: 0.6rem;
    }

    .mobile-nav-link {
        font-size: 1.05rem;
        padding: 0 0.2rem 0 1.1rem !important;
        border-bottom: none;
        line-height: 1.35;
    }

    .mobile-nav-groups .mobile-nav-link:first-child {
        margin-top: 0;
    }

    .mobile-nav-footer__row {
        gap: 0.5rem;
    }

    .mobile-nav-social a {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .lang-switcher--mobile .lang-flag-btn__img {
        width: 28px;
        height: 28px;
    }
}

/* Very narrow — slightly tighter split, still side-by-side */
@media (max-width: 380px) {
    .mobile-nav-links-col {
        flex: 0 0 56%;
        max-width: 56%;
    }

    .mobile-nav-visual-col {
        flex: 0 0 44%;
        max-width: 44%;
    }

    .mobile-nav-link {
        font-size: 0.98rem;
    }

}

body.mobile-nav-open {
    overflow: hidden;
}
