@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    font-family: 'Inter', sans-serif;
    padding-top: 70px;
    /* header yüksekliği kadar boşluk aç */
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.70), rgba(124, 58, 237, 0.70));
    /* Royal Blue to Purple - More Transparent */
    display: flex;
    backdrop-filter: blur(16px);
    /* Strong glass effect */
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Space between image and text */
    text-decoration: none;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-img {
    height: 40px;
    /* Fixed height for consistency */
    width: 40px;
    /* Equal width for perfect circle */
    object-fit: cover;
    border-radius: 50%;
    /* Perfect circle */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* Subtle shadow for depth */
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Menu Container */
.nav-links {
    position: relative;
    display: flex;
    gap: 30px;
    transition: all 0.3s ease;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0);
    /* Transparent start */
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Mobil Menü Butonu */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown */
.dropdown {
    position: relative;
    margin: 0;
}

.dropbtn {
    display: flex;
    align-items: center;
    height: 100%;
}

.dropdown>a {
    display: flex;
    align-items: center;
    gap: 6px;
    /* Spacing between text and arrow */
    padding: 8px 12px;
}

/* Arrow Icon */
.dropdown>a::after {
    content: '\f107';
    /* FontAwesome Angle Down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Rotate Arrow on Hover */
.dropdown:hover>a::after {
    transform: rotate(180deg);
}

/* Dropdown Content */
.dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1000;
    padding: 8px;
    border: 1px solid #f1f5f9;
    margin-top: 10px;
    /* Offset for animation */
    list-style: none;
    /* Remove bullets for ul */
}

/* Show Dropdown on Hover */
.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
    /* Slide up effect */
}

/* Dropdown Links */
.dropdown-content li a {
    color: #1e293b;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    /* Prevent wrapping */
}

.dropdown-content li a:hover {
    background-color: #f8fafc;
    color: #4f46e5;
    padding-left: 20px;
}

/* Ana menü linklerinde de benzer padding */
.nav-links>li>a {
    display: inline-block;
}

/* Desktop: Hide mobile-only items */
.mobile-search-item,
.mobile-theme-item {
    display: none;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {

    /* Masaüstü elemanlarını gizle */
    .desktop-only {
        display: none !important;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background-color: rgba(15, 23, 42, 0.98);
        /* Slate 900 - More neutral & professional */
        backdrop-filter: blur(16px);
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
        animation: slideIn 0.3s ease-out forwards;
    }

    .nav-links li {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 15px 0;
        width: 100%;
    }

    .nav-links a {
        color: white;
        font-size: 18px;
        width: 100%;
        display: block;
        box-shadow: none;
    }

    /* Mobil Elemanları Görünür Yap */
    .mobile-search-item,
    .mobile-theme-item {
        display: flex !important;
    }

    /* Mobil Menü İçindeki Arama Çubuğu */
    .mobile-search-item form {
        background: rgba(255, 255, 255, 0.2);
        padding: 8px;
        border-radius: 8px;
    }

    .mobile-search-item input {
        background: rgba(255, 255, 255, 0.9);
        border: none;
    }

    /* Mobil Menü İçindeki Tema Butonu */
    .mobile-theme-item button {
        background: rgba(255, 255, 255, 0.2) !important;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    /* Mobile Dropdown Fix */
    .dropdown-content {
        position: static;
        /* Stack naturally in mobile menu */
        display: none;
        /* Hidden by default */
        background-color: rgba(255, 255, 255, 0.05);
        /* Slight contrast */
        box-shadow: none;
        border: none;
        width: 100%;
        padding: 0;
        margin-top: 5px;
        opacity: 1;
        /* Reset opacity for mobile toggle */
        visibility: visible;
        border-radius: 0;
    }

    /* Show when active class is added via JS */
    .dropdown.active .dropdown-content {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .dropdown-content li a {
        color: rgba(255, 255, 255, 0.8) !important;
        /* Light text for dark mobile menu */
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dropdown-content li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        padding-left: 12px;
        /* Reset padding shift */
        color: #fff !important;
    }

    /* Rotate arrow when active */
    .dropdown.active>a::after {
        transform: rotate(180deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   DARK MODE OVERRIDES (HEADER)
======================== */
body.dark-mode .dropdown-content {
    background: #1e293b;
    /* Slate 800 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-content li a {
    color: #cbd5e1;
    /* Slate 300 */
}

body.dark-mode .dropdown-content li a:hover {
    background-color: #334155;
    /* Slate 700 */
    color: #fff;
    padding-left: 25px;
}