/* Top Bar (Üst Bilgi Çubuğu) */
.top-bar {
    background: linear-gradient(to right, #020617, #0f172a, #1e293b); /* Premium Gradient */
    color: #fff;
    font-size: 12px;
    padding: 0;
    height: 44px;
    line-height: 44px;
    position: fixed; /* Sabitlendi */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002; /* Hero veya diğer elementlerin altında kalmaması için */
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 500;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    height: 100%;
}

.top-left .info-item {
    margin-right: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    transition: all 0.3s ease;
    color: #fff;
    text-decoration: none;
}

.top-left .info-item:hover {
    opacity: 1;
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.top-right {
    opacity: 0.8;
}

/* Scroll edilince Top Bar yukarı saklansın */
body.is-scrolled .top-bar {
    transform: translateY(-100%);
}

/* Daktilo Efekti Kapsayıcısı */
.typewriter-effect {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    min-width: 250px; /* Metin değişirken kaymayı önlemek için */
}

/* Yazılan Metin ve İmleç */
.txt-type > .wrap {
    border-right: 2px solid var(--secondary-color); /* Yanıp sönen imleç */
    padding-right: 4px;
    animation: blink-cursor 0.7s step-end infinite;
    background: linear-gradient(to right, #ffffff, #7dd3fc); /* Hafif maviye çalan beyaz gradient */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@keyframes blink-cursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--secondary-color); }
}

@media (max-width: 1100px) {
    .muhasebe-link { display: none; } /* Orta ekranlarda muhasebeyi gizle */
}

@media (max-width: 992px) {
    .top-bar { display: none; }
    .top-bar { display: none !important; }
    
    .site-header { 
        top: 0; 
        /* Mobilde header arkasındaki cam efekti bazen saydam kalıp yazıları birbirine sokar. 
           Bu yüzden mobilde beyazlığı biraz daha artırıyoruz. */
        background-color: rgba(255, 255, 255, 0.95); 
        top: 0 !important; 
        left: 0;
        width: 100%;
        /* Mobilde 'top' animasyonunu kapatıyoruz ki zıplama yapmasın */
        transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
        transition: none !important;
        background-color: rgba(255, 255, 255, 0.98) !important; /* Daha net zemin */
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        box-shadow: 0 2px 15px rgba(0,0,0,0.08);
        padding: 0 !important;
    } 
    
    .header-inner {
        height: 80px; /* Mobilde header çok büyük olmasın, sabit 80px olsun */
        height: 70px !important; /* Mobilde daha kompakt (Standart Mobil Header) */
        padding: 0 15px;
    }
    
    .logo-img {
        height: 50px; /* Logoyu da mobilde sabitle */
        height: 40px !important; /* Logo taşmasını önle */
        width: auto;
    }

    
    /* Diğer mobil menü kodların aynı kalabilir... */
}

/* Header Alanı */
.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(200%); 
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    position: fixed; 
    top: 44px; 
    width: 100%;
    z-index: 9999; /* 1000'den 9999'a çıkar. Sitenin en üstünde olduğundan emin olalım */
    transition: padding 0.4s ease, top 0.4s ease; /* Top geçişini de yumuşat */
}

/* Yeni Arka Plan Katmanı (Efektler burada hapsolacak) */
.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Aurora efekti burada kesilecek */
    z-index: -1;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5); /* Glass edge look */
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

/* WOW Effect: Aurora Glow Background */
.header-bg::before {
    content: '';
    position: absolute;
    z-index: -2;
    top: 50%;
    left: 50%;
    width: 120%;
    padding-top: 120%;
    transform: translate(-50%, -50%);
    background-image: radial-gradient(circle at 20% 20%, hsla(210, 100%, 65%, 0.15), transparent 40%),
                      radial-gradient(circle at 80% 70%, hsla(195, 100%, 50%, 0.15), transparent 40%);
    filter: blur(80px);
    animation: aurora-glow 25s linear infinite;
}

@keyframes aurora-glow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll edildiğinde header küçülsün */
body.is-scrolled .site-header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    top: 0; /* En tepeye yapış */
}

body.is-scrolled .header-inner {
    height: 80px;
}

body.is-scrolled .logo-img {
    height: 50px; /* Scroll edilince logo biraz küçülür */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px; /* Başlangıçta daha ferah */
    transition: height 0.4s ease;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Pırıltı taşmasın */
    border-radius: 5px;
}

.logo-img {
    height: 65px; /* Logo yüksekliği - Görselin oranına göre ayarlanır */
    width: auto;
    transition: height 0.4s ease;
    display: block;
}

/* Logo Pırıltı Efekti */
.logo a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: logo-shine 6s infinite; /* 6 saniyede bir parlar */
}

@keyframes logo-shine {
    0% { left: -150%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

/* Navigasyon */
.main-nav > ul {
    display: flex;
    gap: 40px; /* Linkler arası daha fazla boşluk */
    align-items: center;
}

.main-nav > ul > li {
    position: relative;
    padding: 30px 0;
}

.main-nav > ul > li > a {
    font-weight: 600; /* Daha dolgun font */
    color: #334155; /* Slightly softer dark text */
    padding: 8px 0;
    font-size: 16px;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: -0.3px;
}

.main-nav > ul > li > a i {
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.4;
    transition: transform 0.3s ease;
}

/* UX İyileştirmesi: Menü ile Dropdown arasındaki boşluğu dolduran görünmez köprü */
.main-nav > ul > li::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px; /* Boşluk toleransı */
    background: transparent;
}

/* Modern Hover Efekti (Alt Çizgi Animasyonu) */
/* .btn-contact haricindeki linkler için geçerli olsun */
.main-nav > ul > li > a:not(.btn-contact):hover,
.main-nav > ul > li.active > a:not(.btn-contact) {
    /* Gradient Text on Hover */
    color: transparent;
    background: linear-gradient(90deg, var(--primary-color) 20%, var(--secondary-color) 80%);
    -webkit-background-clip: text;
    background-clip: text;
}

.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.main-nav > ul > li:hover > a::after {
    width: 100%;
}

/* Dropdown (Açılır Menü) */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: -20px;
    background: #ffffff; /* Net beyaz zemin - Premium okunabilirlik */
    min-width: 320px;
    box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.6); /* Çok katmanlı gölge */
    border: none;
    border-top: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Görünmezken tıklanmasın */
    transform: translateY(15px) scale(0.98);
    transform-origin: top left;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 12px;
    padding: 12px;
}

/* İki Sütunlu Dropdown (Premium Geniş Menü) */
.dropdown-menu.two-column {
    min-width: 700px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 25px;
}

.main-nav li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* İki Sütunlu Menü Araya Şık Çizgi */
.dropdown-menu.two-column::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 25px;
    bottom: 25px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #cbd5e1, transparent); /* Uçları silik şık çizgi */
    pointer-events: none;
}

/* Dropdown açıldığında okun dönmesi */
.main-nav li:hover > a i {
    transform: none; /* Dönme efekti kaldırıldı */
    color: var(--secondary-color);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px;
    margin-bottom: 2px;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 8px;
    background: transparent;
}

/* Dropdown İkon Stilleri */
.dropdown-menu a i {
    display: inline-block; /* Masaüstünde ikonlar görünsün */
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background-color: #f1f5f9; /* İkon arkasına yumuşak kutu */
    border-radius: 8px;
    color: var(--primary-color); /* Daha koyu ve kurumsal renk */
    margin-right: 15px;
    font-size: 13px;
    transition: all 0.3s ease;
    opacity: 1;
}

.dropdown-menu a:hover {
    background-color: #f8fafc;
    color: var(--text-dark);
    transform: translateX(4px);
}

/* Hover durumunda ikon hareketi */
.dropdown-menu a:hover i {
    background-color: #e0f2fe; /* Çok açık mavi zemin (Okunabilirlik için) */
    color: var(--secondary-color); /* İkon canlı mavi olur */
    transform: none;
}

/* Hoverda beliren ok ikonu */
.dropdown-menu a::after {
    content: '\f054'; /* FontAwesome chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    color: var(--secondary-color);
    margin-left: auto; /* Oku en sağa it */
}

.dropdown-menu a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Dropdown Linkleri için Sıralı Giriş Animasyonu (Staggered) */
.dropdown-menu li {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.main-nav li:hover .dropdown-menu li {
    opacity: 1;
    transform: translateX(0);
}

/* Her eleman biraz daha geç gelsin */
.main-nav li:hover .dropdown-menu li:nth-child(1) { transition-delay: 0.05s; }
.main-nav li:hover .dropdown-menu li:nth-child(2) { transition-delay: 0.1s; }
.main-nav li:hover .dropdown-menu li:nth-child(3) { transition-delay: 0.15s; }
.main-nav li:hover .dropdown-menu li:nth-child(4) { transition-delay: 0.2s; }
.main-nav li:hover .dropdown-menu li:nth-child(5) { transition-delay: 0.25s; }

/* Eski sol çizgi efektini kaldırıyoruz */
.dropdown-menu a::before {
    display: none;
}

/* İletişim Butonu Özel Stil */
.btn-contact {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0f172a 100%);
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 12px !important; /* Daha modern yuvarlaklık */
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4), 0 8px 10px -6px rgba(15, 23, 42, 0.1); /* Güçlü gölge */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    margin-left: 20px;
    font-weight: 500 !important;
    font-size: 15px !important;
    position: relative;
    overflow: hidden;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.1);
    /* Gradient text efektini ezmek için */
    background-clip: border-box !important;
}

.btn-contact:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1e293b 0%, var(--primary-color) 100%);
    box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.5), 0 10px 10px -5px rgba(15, 23, 42, 0.2);
}

/* Buton Parlama Efekti (Shine) */
.btn-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btn-shine 3s infinite;
}

@keyframes btn-shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Butonda alt çizgi olmasın */
.btn-contact::after {
    display: none !important;
}

/* Scroll Progress Bar Stilleri */
.scroll-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(226, 232, 240, 0.5);
    z-index: 1002;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--secondary-color);
}

/* Mobil Menü İkonu (Basitçe gizliyoruz, JS ile aktif edilebilir) */
.mobile-toggle {
    display: none;
    font-size: 24px;
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border-radius: 8px;
    background-color: #f1f5f9;
    color: var(--primary-color);
    z-index: 1001;
    transition: all 0.3s ease;
}

/* Masaüstünde mobil alt menü başlığını gizle */
.mobile-submenu-head {
    display: none;
}

/* Mobil Menü Başlığını Masaüstünde Kesin Olarak Gizle */
.mobile-nav-header {
    display: none !important;
}

@media (max-width: 992px) {
    .mobile-toggle {
        display: block;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Ekran dışına it */
        width: 80%;
        width: 85%;
        max-width: 350px;
        height: 100vh; /* Tam ekran yüksekliği */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: -20px 0 50px rgba(0,0,0,0.2);
        background: #ffffff;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 100px;
        z-index: 999;
        padding-top: 70px; /* Header yüksekliği (70px) kadar boşluk */
        z-index: 9998; /* Header'ın (9999) altında kalsın */
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .main-nav.active {
        right: 0; /* Ekrana getir */
    }

    /* Mobil Menü Başlığı (Logo ve Kapat) */
    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        display: flex !important; /* Mobilde görünür yap */
        padding: 20px;
        border-bottom: 1px solid #f1f5f9;
        background: #fff;
        height: 70px; /* Header ile aynı yükseklik */
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0; 
        width: 100%;
    }

    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        padding: 0;
    }

    .main-nav > ul > li:last-child {
        border-bottom: none;
        margin-top: 10px;
    }
    
    /* Masaüstü hover köprüsünü mobilde gizle */
    .main-nav > ul > li::before {
        display: none;
    }

    .main-nav > ul > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 25px;
        font-size: 16px;
        font-weight: 600;
        color: #334155;
        transition: background-color 0.2s;
    }

    .main-nav > ul > li > a:hover {
        background-color: #f1f5f9;
        color: var(--primary-color);
    }

    /* Aktif Dropdown Başlığı */
    .main-nav > ul > li.active-dropdown > a {
        color: var(--primary-color);
        background-color: #f0f9ff;
    }

    .main-nav > ul > li.active-dropdown > a i {
        color: var(--secondary-color);
    }

    /* Mobilde Dropdown Ayarları - Masaüstü stillerini sıfırla */
    /* DRILL-DOWN MENÜ YAPISI (Yeni Sayfa Gibi Açılma) */
    .dropdown-menu {
        position: static; /* Mobilde akışın içinde olsun */
        float: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        min-width: 100%;
        width: 100%; 
        height: 100%; /* Tam boy */
        display: block; /* Her zaman render edilsin ama ekran dışı olsun */
        background-color: #f8fafc; /* Hafif gri zemin (Derinlik için) */
        padding-left: 0;
        padding: 0;
        margin: 0;
        
        /* Pozisyonlama: Ana menünün üzerine tam otursun */
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
        transform: translateX(100%); /* Sağda gizli */
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Daha yumuşak geçiş */
        overflow-y: auto; /* İçerik uzunsa scroll olsun */
    }

    /* Mobilde iki sütun özelliğini sıfırla */
    .dropdown-menu.two-column {
        min-width: 100%;
        display: none;
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        display: block; /* Grid yerine blok */
    }

    .dropdown-menu.two-column::before {
        display: none; /* Mobilde çizgiyi gizle */
    }

    /* Menü Aktif Olduğunda (Slide In) */
    .dropdown-menu.active {
        transform: translateX(0);
    }

    /* --- YENİ MOBİL ALT MENÜ BAŞLIĞI (Geri + Kapat) --- */
    .mobile-submenu-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        background: #fff;
        border-bottom: 1px solid #f1f5f9;
        position: sticky;
        top: 0;
        z-index: 10;
        box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    }

    .mobile-submenu-back {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary-color);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 20px 10px 0; /* Tıklama alanını genişlet */
        user-select: none; /* Metin seçimini engelle */
    }
    
    .mobile-submenu-back i {
        color: var(--secondary-color);
        font-size: 1rem;
        pointer-events: none; /* Tıklamayı engelle, div yakalasın */
    }

    .mobile-submenu-close {
        font-size: 1.5rem;
        color: #94a3b8;
        cursor: pointer;
        padding: 10px; /* Tıklama alanını genişlet */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-submenu-close i {
        pointer-events: none; /* Tıklamayı engelle, div yakalasın */
    }

    .dropdown-menu a {
        padding: 20px 30px; /* DAHA BÜYÜK VE FERAH ALAN */
        font-size: 1.1rem; /* Yazı boyutu büyütüldü */
        display: flex; /* Mobilde de flex yapısı korunsun */
        align-items: center;
        border-radius: 0;
        background: transparent;
        color: #64748b;
        box-shadow: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .dropdown-menu a i {
        background: transparent;
        width: 30px;
        height: 30px;
        line-height: 30px;
        margin-right: 15px;
        font-size: 1.2rem; /* İkonlar büyütüldü */
    }

    .dropdown-menu a:hover {
        background-color: #e2e8f0;
        color: var(--primary-color);
        transform: translateX(5px);
        box-shadow: none;
    }

    .dropdown-menu a::after {
        display: none; /* Mobilde oku gizle */
    }

    .main-nav > ul > li.active-dropdown > a i {
        transform: none; /* Mobilde de dönme kaldırıldı */
        color: var(--secondary-color);
    }

    /* --- WOW EFFECT: SIRALI GİRİŞ ANİMASYONU --- */
    .dropdown-menu.active li {
        opacity: 0;
        transform: translateX(20px);
        animation: slideInStagger 0.4s forwards;
    }
    
    /* İlk 10 eleman için gecikme */
    .dropdown-menu.active li:nth-child(1) { animation-delay: 0.05s; }
    .dropdown-menu.active li:nth-child(2) { animation-delay: 0.1s; }
    .dropdown-menu.active li:nth-child(3) { animation-delay: 0.15s; }
    .dropdown-menu.active li:nth-child(4) { animation-delay: 0.2s; }
    .dropdown-menu.active li:nth-child(5) { animation-delay: 0.25s; }
    .dropdown-menu.active li:nth-child(6) { animation-delay: 0.3s; }
    .dropdown-menu.active li:nth-child(7) { animation-delay: 0.35s; }
    .dropdown-menu.active li:nth-child(8) { animation-delay: 0.4s; }
    .dropdown-menu.active li:nth-child(9) { animation-delay: 0.45s; }
    .dropdown-menu.active li:nth-child(10) { animation-delay: 0.5s; }

    @keyframes slideInStagger {
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Mobil İletişim Butonu */
    .btn-contact {
        margin: 20px !important;
        display: block !important;
        text-align: center;
        width: auto !important;
        background: var(--primary-color) !important;
        box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.2) !important;
    }

    .btn-contact::before {
        display: none; /* Mobilde animasyonu kapat */
    }
}