/* ====================================================
   header-custom.css - Premium Dark & Glassmorphism
   ==================================================== */

:root {
    --header-primary: #05a0d4;
    --header-bg: rgba(15, 23, 42, 0.9); /* Dark Blue/Slate */
    --header-text: #f8fafc;
    --header-text-hover: #ffffff;
    --header-border: rgba(255, 255, 255, 0.1);
    --header-mega-bg: rgba(30, 41, 59, 0.98);
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ====================================================
   1. STICKY DOKUSU VE ALT İNCE ÇİZGİ
   ==================================================== */
.header-outer-wrapper {
    z-index: 2000;
    background: var(--header-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    transition: all 0.3s ease;
}

/* ====================================================
   2. LOGO
   ==================================================== */
.main-logo-container {
    background-image: var(--logo-slogan-url);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    width: 220px;
    height: 55px;
    margin: 5px 0;
    transition: 0.3s ease;
    filter: brightness(0) invert(1); /* Makes logo white for dark theme */
}

/* ====================================================
   3. MASAÜSTÜ MENÜ LİNKLERİ
   ==================================================== */
@media (min-width: 992px) {
    .custom-navbar {
        padding: 0 !important;
        height: 75px; 
    }

    .custom-navbar .container-xl,
    #mainMenu,
    .modern-nav-links {
        height: 100% !important;
    }

    .modern-nav-links .nav-item {
        height: 100%;
        display: flex;
    }

    .modern-nav-links .nav-link {
        display: flex;
        align-items: center; 
        height: 100%; 
        font-weight: 500;
        font-size: 0.95rem;
        padding: 0 20px !important;
        margin: 0;
        border-radius: 0;
        transition: all 0.3s ease;
        color: rgba(248, 250, 252, 0.75) !important; /* Slightly muted white */
        letter-spacing: 0.5px;
        position: relative;
    }

    /* Alt Çizgi Animasyonu (Premium hissiyat) */
    .modern-nav-links .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background-color: var(--header-primary);
        transition: all 0.3s ease;
        transform: translateX(-50%);
        border-radius: 3px 3px 0 0;
    }

    .modern-nav-links .nav-link:hover,
    .modern-nav-links .nav-link.active,
    .mega-menu-wrapper:hover .nav-link {
        color: var(--header-text-hover) !important;
    }

    .modern-nav-links .nav-link:hover::after,
    .modern-nav-links .nav-link.active::after,
    .mega-menu-wrapper:hover .nav-link::after {
        width: 100%;
    }
}

/* ====================================================
   4. ARAMA ÇUBUĞU VE İKON HİZALAMASI
   ==================================================== */
.modern-search-form {
    position: relative;
    width: 100%;
}

@media (min-width: 992px) {
    .modern-search-form .search-input {
        height: 42px !important;
        padding-left: 20px !important;
        padding-right: 45px !important;
        font-size: 0.85rem !important;
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease;
    }

    .modern-search-form .search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .modern-search-form .search-input:focus {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: var(--header-primary) !important;
        box-shadow: 0 0 0 4px rgba(5, 160, 212, 0.2) !important;
        outline: none;
    }
}

.modern-search-form .search-submit,
#mobileSearchPanel .search-submit-always {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 6px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--header-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    padding: 0 !important;
    transition: 0.3s ease;
    z-index: 10;
}

.modern-search-form .search-submit:hover,
#mobileSearchPanel .search-submit-always:hover {
    filter: brightness(1.1);
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 0 10px rgba(5, 160, 212, 0.5);
}

/* ====================================================
   5. MEGA MENÜ (DARK & GLASS)
   ==================================================== */
.mega-menu-wrapper {
    position: static !important;
}

.mega-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0) !important;
    width: 85% !important;
    max-width: 1200px;
    background-color: var(--header-mega-bg) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--header-border) !important;
    border-top: 3px solid var(--header-primary) !important;
    border-radius: 0 0 15px 15px;
    margin-top: -2px !important; /* Hafifçe yukarı kaydırarak boşluğu kapatıyoruz */
    padding: 0 !important;
    display: none;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6) !important;
    z-index: 1000;
}

/* Mouse'un aradaki boşluğa düşüp menüyü kapatmasını engelleyen görünmez köprü */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: transparent;
}

.mega-menu-wrapper:hover .mega-menu {
    display: block;
    animation: megaFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.mega-menu .container-xl {
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
}

.mega-menu .row.g-0 {
    display: flex;
    align-items: stretch;
}

.mega-list {
    margin: 0;
    padding: 0;
}

.mega-list a {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    transition: 0.3s;
    font-weight: 400;
}

.mega-list a:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

.mega-cta-col {
    background-color: rgba(0,0,0,0.2) !important;
    margin-left: auto;
    min-height: 100%;
    border-left: 1px solid var(--header-border);
}

.mega-cta-col h6 {
    color: #ffffff !important;
}

@keyframes megaFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.btn-theme-primary {
    background-color: var(--header-primary) !important;
    color: #fff !important;
    border: none;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-theme-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(5, 160, 212, 0.4) !important;
}

/* ====================================================
   6. MOBİL UYUM (991px ve Altı)
   ==================================================== */
@media (max-width: 991px) {
    .custom-navbar {
        padding: 10px 0 !important;
    }

    .navbar-collapse {
        position: absolute !important;
        top: 100% !important;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(15px);
        z-index: 1080;
        padding: 0;
        box-shadow: 0 20px 40px rgba(0,0,0,0.5);
        border-top: 1px solid var(--header-border);
    }

    .modern-nav-links .nav-link {
        padding: 15px 25px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        color: rgba(255,255,255,0.8) !important;
        font-size: 1.1rem;
    }

    .modern-nav-links .nav-link.active,
    .modern-nav-links .nav-link:hover {
        background-color: rgba(255,255,255,0.05) !important;
        color: #ffffff !important;
    }

    .mobile-action-btn, .custom-toggler {
        color: #ffffff !important;
    }

    .mega-menu {
        display: none !important;
    }
    .modern-nav-links .dropdown-toggle::after {
        display: none !important;
    }
}

