/* Soldan açılan mobil menü — masaüstü menüsünden tamamen ayrı */

.mobile-nav-overlay,
.mobile-nav-close,
.mobile-nav-panel {
    display: none;
}

@media (max-width: 900px) {
    /* Masaüstü menü mobilde asla görünmesin (FOUC önleme) */
    header nav > .nav-links,
    header .nav-links#nav-links,
    .nav-links,
    .nav-links.open {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: none !important;
        clip: rect(0, 0, 0, 0) !important;
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1002;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        border: none;
        padding: 0;
        cursor: pointer;
    }

    .mobile-nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-close {
        display: flex;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 1004;
        width: 44px;
        height: 44px;
        border: none;
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
        font-size: 1.75rem;
        line-height: 1;
        border-radius: 50%;
        cursor: pointer;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .mobile-nav-close.open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-panel {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: min(88vw, 340px);
        max-width: 340px;
        height: 100vh;
        height: 100dvh;
        background: #15202b;
        z-index: 1003;
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
        visibility: hidden;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        box-sizing: border-box;
        /* Alt Telefon/WhatsApp çubuğunun üstünde kalsın */
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-nav-panel.open {
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-nav-head {
        flex-shrink: 0;
        padding: 1.35rem 1.5rem 1.5rem;
        background: linear-gradient(135deg, #c62828 0%, #e65100 55%, #f57c00 100%);
    }

    .mobile-nav-label {
        display: block;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        color: rgba(255, 255, 255, 0.85);
        margin-bottom: 0.35rem;
        text-transform: uppercase;
    }

    .mobile-nav-brand {
        display: block;
        font-size: 1.35rem;
        font-weight: 800;
        color: #fff;
        letter-spacing: 0.02em;
        line-height: 1.2;
    }

    .mobile-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-nav-list > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-nav-list > li > a {
        display: flex;
        align-items: center;
        width: 100%;
        color: #fff;
        font-size: 1.05rem;
        font-weight: 700;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        padding: 1rem 1.5rem;
        background: none;
        border: none;
        text-align: left;
        box-sizing: border-box;
    }

    .mobile-nav-list > li > a:active {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-nav-group {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-nav-section-title {
        display: block;
        padding: 1rem 1.5rem 0.35rem;
        color: #fff;
        font-size: 1.05rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .mobile-nav-sub {
        list-style: none;
        margin: 0;
        padding: 0 0 0.35rem;
        display: block;
        background: rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-sub li {
        border-bottom: none;
    }

    .mobile-nav-sub a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.7rem 1.5rem 0.7rem 2rem;
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.95rem;
        font-weight: 500;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-transform: none;
        letter-spacing: 0;
    }

    .mobile-nav-sub a::before {
        content: '›';
        color: #f5c518;
        font-size: 1.1rem;
        font-weight: 700;
        flex-shrink: 0;
    }

    .mobile-nav-sub a.mobile-nav-all {
        color: #f5c518;
        font-weight: 700;
        border-bottom: none;
        padding-bottom: 0.85rem;
    }

    .mobile-nav-sub a.mobile-nav-all::before {
        color: #f5c518;
    }

    .mobile-nav-phone {
        flex-shrink: 0;
        padding: 1.1rem 1.5rem 1.25rem;
        background: rgba(0, 0, 0, 0.25);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-phone-label {
        display: block;
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 0.35rem;
        text-transform: uppercase;
    }

    .mobile-nav-phone a {
        font-size: 1.35rem;
        font-weight: 800;
        color: #fff;
        text-decoration: none;
        letter-spacing: 0.02em;
    }

    .hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 5px;
        cursor: pointer;
        z-index: 1005;
        padding: 4px;
        box-sizing: border-box;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        min-height: 3px;
        background: #2c3e50;
        border-radius: 2px;
        margin: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
