/* ==========================================================================
   MODERN NAVBAR - FUTURISTIC GLASSMORPHISM DESIGN
   ========================================================================== */

.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md) var(--spacing-lg);
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--spacing-md);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   ISLAND COMPONENTS - GLASSMORPHISM CONTAINERS
   ========================================================================== */

.island {
    background: var(--brand-primary);
    border: 1px solid rgba(33, 40, 66, 0.15);
    border-radius: var(--radius-full);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all var(--transition-base);
    position: relative;
}

/* Animated border glow */
.island::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--brand-light);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
    filter: blur(8px);
}

.island:hover::before {
    opacity: 0.5;
}

.island:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    border-color: rgba(33, 40, 66, 0.25);
}

.center-island {
    grid-column: 2;
    padding: 8px 12px;
}

.right-island {
    grid-column: 3;
    justify-self: end;
    padding: 8px 12px;
}

/* ==========================================================================
   USER PROFILE DROPDOWN (Giriş Yapmış Kullanıcı Kartı)
   ========================================================================== */

.user-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Ana Profil Butonu */
.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 14px 2px 2px;
    /* Sol tarafı avatar için dar tutuyoruz */
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform var(--transition-base);
    color: rgba(255, 255, 255, 0.6);
    margin-left: 4px;
}

/* Hover durumunda ok işaretini döndür */
.user-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Açılır Menü (Beyaz Kart) */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    background: #ffffff;
    min-width: 220px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(33, 40, 66, 0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid rgba(33, 40, 66, 0.05);
}

/* Menünün fare ile üstüne gidene kadar kapanmasını engelleyen görünmez köprü */
.user-dropdown::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

/* Hover tetikleyicisi: Ana kapsayıcıya gelindiğinde menüyü göster */
.user-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menü İçi Öğeler */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.dropdown-item i {
    font-size: 1.1rem;
    color: var(--accent-blue);
    width: 20px;
    /* İkonların dikey hizada düzgün durması için */
    text-align: center;
}

/* Sadece link olan (tıklanabilir) öğelerin hover efekti */
a.dropdown-item:hover {
    background: rgba(33, 40, 66, 0.03);
}

/* Tıklanmayan Bilgi Satırları (ID, Student) */
.user-info-item {
    cursor: default;
}

/* Ayırıcı Çizgi */
.dropdown-divider {
    height: 1px;
    background: rgba(33, 40, 66, 0.06);
}

/* Kırmızı Çıxış (Logout) Özel Stili */
.logout-item {
    color: #e53e3e;
}

.logout-item i {
    color: #e53e3e;
}

a.logout-item:hover {
    background: rgba(229, 62, 62, 0.04);
}

/* ==========================================================================
   NAVIGATION ITEMS - MODERN PILL DESIGN
   ========================================================================== */

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.nav-item {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    display: block;
    border: 1px solid transparent;
    overflow: hidden;
    z-index: 1;
}

/* Hover background effect */
.nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
    border-radius: var(--radius-full);
}

.nav-item:hover {
    color: #ffffff;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-item:hover::after {
    opacity: 1;
}

/* Active state */
.nav-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--glass-border);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

/* Shine sweep effect */
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
}

.nav-item:hover::before {
    animation: shine-sweep 0.6s forwards;
}

@keyframes shine-sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* Primary action button */
.nav-item.primary-action {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-primary);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-item.primary-action:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 8px 24px rgba(33, 40, 66, 0.2);
    background: #ffffff;
}

.nav-item.primary-action::after {
    display: none;
}



/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 968px) {
    .navbar-wrapper {
        grid-template-columns: 1fr;
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .center-island {
        grid-column: 1;
        width: 100%;
        overflow-x: auto;
    }

    .right-island {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        justify-content: center;
    }

    .nav-list {
        overflow-x: auto;
        padding: 4px;
    }
}

@media (max-width: 640px) {
    .nav-item {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .navbar-wrapper {
        top: 0;
        padding: var(--spacing-xs);
    }
}