/**
 * Mobil Hamburger Menü Stilleri
 * Otohane - Premium Mobil Menü
 */

/* =====================================
   HAMBURGER İKONU ANİMASYONU
   ===================================== */

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Hamburger çizgileri */
.navbar-toggler-icon {
    background-image: none !important;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon,
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}

/* Açık durumda animasyon (X şekli) */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* =====================================
   MOBİL MENÜ STİLLERİ
   ===================================== */

@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        border-radius: 16px;
        margin-top: 1rem;
        padding: 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.1);
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .navbar-nav {
        gap: 0.5rem;
    }

    .nav-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 1rem !important;
        border-radius: 8px;
        display: flex;
        align-items: center;
        transition: all 0.3s ease;
        color: var(--dark) !important;
        font-weight: 500;
    }

    .nav-link:hover {
        background: rgba(13, 110, 253, 0.1);
        color: var(--primary) !important;
        transform: translateX(8px);
    }

    .nav-link.active {
        background: var(--primary) !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 1rem 1.25rem !important;
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        opacity: 1 !important;
    }

    .nav-link.active * {
        color: #ffffff !important;
    }

    .nav-link.active i {
        color: #ffffff !important;
        flex-shrink: 0;
        margin-right: 0.75rem !important;
    }

    .nav-link.active .menu-text {
        color: #ffffff !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* Tüm menu text span'ları için */
    .menu-text {
        display: inline-block;
        color: inherit;
    }

    .nav-link i {
        width: 24px;
        font-size: 1.1rem;
    }

    /* CTA Butonu mobilde */
    .nav-cta {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .nav-cta .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
        }
        50% {
            box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
        }
    }
}

/* =====================================
   OVERLAY ARKA PLAN (OPSİYONEL)
   ===================================== */

/* Menü açıkken arka plan karartma */
@media (max-width: 991px) {
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    #mainNav {
        z-index: 1000;
    }
}

/* =====================================
   DOKUNMATIK GELIŞTIRMELER
   ===================================== */

@media (max-width: 991px) {
    /* Daha büyük dokunma alanları */
    .nav-link {
        min-height: 48px;
        font-size: 1rem;
    }

    /* Smooth scrolling kapalıyken bile yumuşak geçiş */
    .navbar-collapse.collapsing {
        transition: height 0.35s ease;
    }
}

/* =====================================
   TABLET GÖRÜNÜMÜ
   ===================================== */

@media (min-width: 768px) and (max-width: 991px) {
    .navbar-collapse {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =====================================
   LOGO MOBİL AYARLARI
   ===================================== */

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .logo-img {
        max-height: 35px;
    }

    .brand-text {
        font-size: 1rem;
    }
}
