/* MODERN HEADER CSS (Z-INDEX ULTIMATE FIX) */

:root {
    --header-height: 80px;
    --nav-text-color: #333;
    --nav-hover-color: var(--header-hover-color, #c59d5f);
    --font-heading: 'Inter', sans-serif;
}

/* Spacer */
.header-spacer {
    height: var(--header-height);
    width: 100%;
    display: block;
    background: transparent;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--header-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    display: flex;
    justify-content: flex-start;
    /* Changed from space-between to allow margin control */
    align-items: center;
}

/* LOGO */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1001;
    margin-right: 0;
    /* Logo stays left */
}

#ustlogo img {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* NAVIGATION (DESKTOP DEFAULT) */
.main-nav {
    height: 100%;
    margin-left: var(--nav-margin-left, auto);
    margin-right: var(--nav-margin-right, 0);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav ul li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--header-text, #333);
    font-weight: 500;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 5px;
    cursor: pointer;
}

/* Hover Efekti */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nav-hover-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--nav-hover-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link i {
    font-size: 11px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
    opacity: 1;
}

/* DROPDOWN MENU (DESKTOP) */
.dropdown {
    position: relative;
}

.dp-icerik {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #fff;
    min-width: 240px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: block;
}

.dp-icerik::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 1px solid rgba(0, 0, 0, 0.04);
}

.dropdown:hover .dp-icerik {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dp-icerik a {
    display: block;
    padding: 12px 24px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dp-icerik a:hover {
    background: #f9f9f9;
    color: var(--nav-hover-color);
    border-left-color: var(--nav-hover-color);
    padding-left: 30px;
}

/* HAMBURGER TOGGLE (GLOBAL) */
.menu-toggle {
    display: none;
    background: #fcfcfc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    z-index: 999999;
    /* MAX Z-INDEX */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    border-radius: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.menu-toggle span:nth-child(1) {
    top: 16px;
    width: 24px;
}

.menu-toggle span:nth-child(2) {
    top: 23px;
    width: 16px;
    margin-left: 4px;
}

.menu-toggle span:nth-child(3) {
    top: 30px;
    width: 24px;
}

/* Active (X) */
.menu-toggle.active {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.menu-toggle.active span:nth-child(1) {
    top: 23px;
    transform: translateX(-50%) rotate(45deg);
    background-color: var(--nav-hover-color);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.menu-toggle.active span:nth-child(3) {
    top: 23px;
    transform: translateX(-50%) rotate(-45deg);
    background-color: var(--nav-hover-color);
}

/* OVERLAY */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 999998;
    /* MAX - 1 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

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

/* RESPONSIVE CSS (MOBILE) */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    .header-container {
        justify-content: flex-start !important;
        position: relative;
    }

    .logo-link {
        position: absolute !important;
        left: 50%;
        transform: translateX(-50%);
    }

    .menu-toggle {
        display: flex !important;
        margin-right: 0;
    }

    /* Sidebar Fix */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        padding: 90px 20px 40px;
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        overflow-y: auto;
        z-index: 99999 !important;
        /* SIDEBAR MAX */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        height: 100dvh;
    }

    #header.active {
        left: 0 !important;
    }

    .main-nav ul {
        flex-direction: column !important;
        width: 100%;
        height: auto;
        gap: 0;
        display: flex !important;
    }

    .main-nav ul li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid #f9f9f9;
        display: block;
        position: relative;
    }

    .nav-link {
        padding: 16px 0;
        width: 100%;
        justify-content: space-between;
        font-size: 16px;
        color: #333 !important;
        display: flex !important;
    }

    .nav-link::after {
        display: none;
    }

    /* DROPDOWN & ACCORDION CSS */
    .dropdown {
        display: block !important;
    }

    .dp-icerik {
        display: none;
        /* JS ile açılacak */
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 5px 0 15px 0;
        min-width: auto;
        background: transparent;
        margin-left: 15px;
        border-left: 1px solid #eee;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .dropdown.open .dp-icerik {
        display: block !important;
        animation: mobileDropdownAnim 0.3s ease;
    }

    .dropdown.open>.nav-link {
        color: var(--nav-hover-color) !important;
    }

    .dropdown.open>.nav-link i {
        transform: rotate(180deg);
    }

    @keyframes mobileDropdownAnim {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dp-icerik::before {
        display: none;
    }

    .dp-icerik a {
        padding: 10px 15px;
        font-size: 14px;
        color: #666;
        display: block;
    }
}