﻿/* --- NAV KONTEYNER VE CAM EFEKTİ --- */
.nav-floating {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 9999;
}

.nav-glass-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 8px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- LOGO VE BUTONLAR --- */
.nav-logo img {
    height: 35px;
    width: auto;
    transition: 0.3s;
}

.btn-login {
    color: #3a7bd5 !important;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 15px;
}

.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

/* --- MASAÜSTÜ AYARLAR (min-width: 992px) --- */
@media (min-width: 992px) {
    .nav-toggle-btn, .mobile-only-cta {
        display: none !important;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        gap: 15px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        color: #2d3436;
        text-decoration: none;
        padding: 10px;
    }

    /* Dropdown */
    .dropdown-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 200px;
        padding: 15px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        display: none;
        list-style: none;
    }

    .nav-item.dropdown:hover .dropdown-submenu {
        display: block;
    }
}

/* --- MOBİL AYARLAR (max-width: 991px) --- */
@media (max-width: 991px) {
    .nav-actions-desktop {
        display: none !important;
    }

    .nav-toggle-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .bar {
        width: 25px;
        height: 3px;
        background: #333;
        border-radius: 2px;
    }

    .nav-menu {
        position: fixed;
        top: 85px;
        right: -100%;
        width: 85%;
        background: white;
        border-radius: 25px;
        flex-direction: column;
        padding: 30px;
        transition: 0.4s ease-in-out;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        list-style: none;
    }

        .nav-menu.active {
            right: 7.5%;
        }

    .nav-item {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        padding: 10px 0;
    }

    .dropdown-submenu {
        display: none;
        list-style: none;
        padding-left: 15px;
        background: #fafafa;
    }

    .nav-item.active .dropdown-submenu {
        display: block;
    }

    .mobile-only-cta {
        display: flex !important;
        flex-direction: row;
        gap: 10px;
        border: none;
        margin-top: 20px;
    }
}
/* --- KONTEYNER VE TEMEL --- */
.nav-floating {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 9999;
}

.nav-glass-container {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- BUTONLAR --- */
.btn-login {
    color: #3a7bd5 !important;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 0.9rem;
}

.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    transition: 0.3s;
}

    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
    }

/* --- MASAÜSTÜ MENÜ --- */
@media (min-width: 992px) {
    .nav-toggle-btn, .mobile-only-cta {
        display: none !important;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        gap: 10px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-link {
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.82rem;
        color: #2d3436;
        text-decoration: none;
        padding: 10px 12px;
        transition: 0.3s;
    }

        .nav-link:hover {
            color: #3a7bd5;
        }

    .dropdown-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 260px;
        padding: 15px;
        border-radius: 20px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.12);
        display: none;
        list-style: none;
        margin-top: 10px;
        border: 1px solid #f0f0f0;
    }

    .nav-item:hover .dropdown-submenu {
        display: block;
    }
}

/* --- DROPDOWN İÇERİK --- */
.sub-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #444;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.2s;
}

    .sub-link:hover {
        background: #f8faff;
        color: #3a7bd5;
        transform: translateX(5px);
    }

    .sub-link i {
        color: #3a7bd5;
        width: 18px;
        text-align: center;
        font-size: 1rem;
    }

    .sub-link .badge {
        font-size: 0.65rem;
        background: #f0f0f0;
        padding: 2px 8px;
        border-radius: 8px;
        margin-left: auto;
        color: #777;
    }

.divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* --- MOBİL MENÜ --- */
@media (max-width: 991px) {
    .nav-actions-desktop {
        display: none !important;
    }

    .nav-toggle-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .bar {
        width: 25px;
        height: 3px;
        background: #333;
        border-radius: 2px;
    }

    .nav-menu {
        position: fixed;
        top: 85px;
        right: -100%;
        width: 85%;
        background: white;
        border-radius: 30px;
        flex-direction: column;
        padding: 25px;
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        box-shadow: 0 15px 50px rgba(0,0,0,0.15);
        list-style: none;
    }

        .nav-menu.active {
            right: 7.5%;
        }

    .nav-item {
        border-bottom: 1px solid #f8f8f8;
        width: 100%;
    }

    .dropdown-submenu {
        display: none;
        list-style: none;
        padding: 10px 0 10px 15px;
        background: #fafafa;
        border-radius: 15px;
    }

    .nav-item.active .dropdown-submenu {
        display: block;
    }

    .mobile-only-cta {
        display: flex !important;
        gap: 10px;
        margin-top: 20px;
        border: none !important;
    }
}
/* --- CSS'TE BU KISMI GÜNCELLE --- */

@media (min-width: 992px) {
    /* 1. Kural: Menü ile Dropdown arasındaki boşluğu fiziksel olarak dolduran görünmez alan */
    .nav-item.dropdown::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 25px; /* Menü ile dropdown arasındaki o kritik boşluk miktarı */
        display: block;
    }

    /* 2. Kural: Dropdown'ın konumunu biraz daha yukarı çekiyoruz veya margin-top'ı yönetiyoruz */
    .dropdown-submenu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 10px; /* Boşluğu 10px'e sabitledik, yukarıdaki 25px'lik köprü bunu hayli hayli kapatır */
        display: none;
        /* ... diğer mevcut stillerin ... */
    }

    /* 3. Kural: Hover durumunda hem menü hem de o görünmez alan üzerinden tetikleme devam etsin */
    .nav-item.dropdown:hover .dropdown-submenu,
    .nav-item.dropdown:hover::after {
        display: block;
    }
}