/* =========================================
   1. GENEL AYARLAR & DEĞİŞKENLER
   ========================================= */
:root {
    --primary-color: #003399;   /* Ana Renk: Koyu Mavi */
    --secondary-color: #f8f9fa; /* İkincil Renk: Açık Gri */
    --accent-color: #dc3545;    /* Vurgu Rengi: Kırmızı */
    --text-dark: #333333;
    --text-light: #6c757d;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    overflow-x: hidden;
}

a { text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary-color); }

.bg-primary-custom { background-color: var(--primary-color) !important; }
.text-primary-custom { color: var(--primary-color) !important; }

/* =========================================
   2. DUYURU BANDI & TOP BAR
   ========================================= */
.notification-bar { font-size: 1.2rem; z-index: 1030; }
.notify-content p { margin: 0 !important; display: inline; }

.marquee-wrapper { overflow: hidden; white-space: nowrap; position: relative; }
.marquee-content { display: inline-block; padding-left: 100%; animation: marquee 20s linear infinite; }
.marquee-wrapper:hover .marquee-content { animation-play-state: paused; }

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

.top-bar { font-size: 0.85rem; }
.top-bar .container { padding-top: 10px; padding-bottom: 10px; }

.social-link, .phone-link { 
    opacity: 0.85; 
    transition: all 0.3s ease; 
    display: inline-flex;
    align-items: center;
}
.social-link:hover, .phone-link:hover { opacity: 1; transform: translateY(-1px); }

@media (max-width: 768px) {
    .top-bar .col-md-6:first-child { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* =========================================
   3. MODERN HEADER & NAV (DÜZELTİLMİŞ)
   ========================================= */
.main-header { 
    background: #ffffff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    border-bottom: 1px solid #f1f1f1; 
    padding: 20px 0;
    transition: all 0.4s ease-in-out;
}

/* Logo Ayarları */
.main-logo-img { 
    max-height: 65px; 
    width: auto; 
    transition: all 0.4s ease-in-out; 
}

/* Sticky Header (Kaydırınca Küçülme) */
.main-header.sticky-top.scrolled {
    padding: 5px 0 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}
.main-header.sticky-top.scrolled .main-logo-img {
    max-height: 45px !important;
    transform: scale(0.9);
}

/* Dikey Çizgi (Divider) */
.v-divider { 
    width: 1px; 
    height: 35px; 
    background: #e0e0e0; 
    margin: 0 15px; 
}

/* --- İKONLU MENÜ (Baskın CSS) --- */
.header-quick-link {
    display: flex !important;           /* Bootstrap flex'i ez */
    flex-direction: column !important;  /* Yan yana olmayı engelle, alt alta yap */
    align-items: center !important;     /* Ortala */
    justify-content: center;
    text-decoration: none !important;
    color: #555 !important;             /* Mavi link rengini ez */
    padding: 5px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    min-width: 90px;
    line-height: 1.2;
}

/* İkon Ayarları */
.header-quick-link i {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #4a4a4a;
    font-weight: 800 !important; /* İkonların kutu çıkmaması için ŞART */
}

/* Yazı Ayarları */
/* =========================================
   YENİ HEADER MODERNİZASYONU
   ========================================= */

/* Modern Menü Linkleri (Yan yana İkon + Yazı) */
.modern-nav-link {
    display: flex;
    align-items: center;
    gap: 8px; /* İkon ve yazı arası boşluk */
    padding: 10px 18px;
    color: #444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px; /* Kapsül görünümü */
    transition: all 0.3s ease;
}

.modern-nav-link i {
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.modern-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--primary-color);
}

.modern-nav-link:hover i {
    color: var(--primary-color) !important;
}

/* Bütünleşik Arama Çubuğu */
.modern-search-box {
    background-color: #f1f3f5;
    border-radius: 50px;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden; /* İçerdeki input köşelerden taşmasın */
}

.modern-search-box:focus-within {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.1);
}

.modern-search-box input {
    height: 48px;
    font-size: 0.95rem;
    color: #333;
}

.modern-search-box input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Hover Primary Genel Class */
.hover-primary {
    transition: color 0.3s ease;
}
.hover-primary:hover {
    color: var(--primary-color) !important;
}

/* --- ARAMA ALANI --- */
.search-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    width: 100%;
}

.search-box-header { 
    position: relative; 
    flex-grow: 1; 
}

.search-box-header input {
    height: 48px;
    border-radius: 25px !important;
    border: 1.5px solid #eee !important;
    padding-left: 20px !important;
    padding-right: 45px !important;
    background-color: #f8f9fa !important;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.search-box-header input:focus {
    background-color: #fff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s;
}
.search-box-header input:focus + .search-btn { color: var(--primary-color); }

/* Hamburger Buton */
.hamburger-btn {
    width: 48px;
    height: 48px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.hamburger-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Canlı Arama Sonuçları */
.search-results-dropdown {
    position: absolute;
    width: 100%;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    z-index: 1050;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Mobil Düzenlemeler */
@media (max-width: 991px) {
    .v-divider { display: none; }
    
    .header-quick-link { 
        min-width: auto; 
        flex: 1;
        padding: 8px 5px; 
        background-color: #f8f9fa;
        margin: 0 4px;
    }
    
    /* Mobilde ikon ve yazı alt alta olsun */
    .header-quick-link span { 
        display: block !important; 
        font-size: 9px;
        margin-top: 2px;
    } 
    .header-quick-link i { 
        font-size: 1.2rem; 
        margin-bottom: 2px; 
    }
    
    .main-header { padding: 15px 0; }
    .main-logo-img { max-height: 55px !important; }
}

/* =========================================
   37. KİTAP KATALOĞU (BOOK CARD)
   ========================================= */
.book-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; /* Taşmaları engelle */
}
.book-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important; 
}

/* GENEL (Mobil ve Tablet için Varsayılan) */
.book-card .card-img-top {
    padding: 0 !important;
    overflow: hidden;
    background-color: #f8f9fa; /* Görsel yüklenmezse gri fon */
    height: 260px; /* Mobilde çok yüksek olmasın */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.book-card .card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Boşluk bırakmadan doldur */
    transition: transform 0.5s ease;
}

/* --- MASAÜSTÜ ÖZEL AYARLARI (PC) --- */
@media (min-width: 992px) {
    .book-card .card-img-top {
        /* Bilgisayarda yüksekliği artırıyoruz ki yanlarda boşluk kalmasın */
        height: 370px !important; 
    }
}

/* Hover Efekti: Resim Büyümesi */
.book-card:hover .card-img-top img {
    transform: scale(1.08);
}

/* Turuncu Overlay (Kitap Özeti Alanı) */
.book-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(233, 84, 32, 0.96); /* Turuncu tonu ve opaklık */
    opacity: 0; 
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 10; 
    transform: translateY(10px);
}
.book-card:hover .book-overlay { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

/* (DİĞER TÜM STİLLERİNİZ - FOOTER, PROJELER, BLOG VB. DEVAM EDER) */

/* =========================================
   MOBİL ALT SABİT MENÜ (APP BAR)
   ========================================= */
/* =========================================
   MOBİL ALT MENÜ (APP BAR) MODERNİZASYONU
   ========================================= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px); /* Arka planı hafif buzlu gösterir */
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.05) !important;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone alt çizgisi (home indicator) için boşluk bırakır */
    border-top: 1px solid rgba(0,0,0,0.03);
    border-radius: 20px 20px 0 0; /* Üst köşeleri hafif yuvarlatır */
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    flex: 1;
    transition: all 0.3s ease;
    padding-top: 5px;
}

.nav-icon-wrapper {
    position: relative;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Aktif veya Üzerine Gelinen Menü Öğesi Efektleri */
.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary-color);
}

.mobile-nav-item.active .nav-icon-wrapper {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
}

/* Ortadaki Havada Asılı Arama Butonu */
.mobile-nav-center {
    position: relative;
    top: -25px; /* Butonu menünün üstüne çıkarır */
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.mobile-search-btn {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--primary-color), #ff6b6b); /* Temanıza uygun renk geçişi (Gerekirse değiştirebilirsiniz) */
    background-color: var(--primary-color); /* Fallback */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff !important;
    border: 5px solid #fff; /* Butonun etrafında beyaz bir halka oluşturarak arkadaki menüden koparır */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.mobile-search-btn:active {
    transform: scale(0.9);
}

.mobile-search-btn i {
    font-size: 1.3rem;
}

/* Sayfa İçeriği Alt Menü Arkasında Kalmasın Diye */
@media (max-width: 991px) {
    body {
        padding-bottom: 80px !important; /* Alt menü yüksekliği kadar boşluk */
    }
    
    /* Header'daki eski arama butonunu gizle (zaten altta var) */
    .btn.btn-light.border.rounded-circle.d-lg-none {
        display: none !important;
    }
}

/* =========================================
   8. ÇEREZ, POPUP ve BACK TO TOP
   ========================================= */
/* Cookie Banner (Düzeltilmiş) */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Varsayılan olarak ekranın altında gizli */
    left: 0;
    width: 100%;
    background-color: #212529;
    color: #fff;
    z-index: 1060; /* Modal'ın üzerinde görünsün */
    transition: bottom 0.5s ease-in-out;
    border-top: 1px solid #444;
    padding: 15px 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}

.cookie-banner.show {
    bottom: 0; /* show sınıfı eklenince görünür yap */
}

.cookie-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-text a:hover {
    color: #fff !important;
}

/* Back To Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    transform: translateY(20px);
    background-color: var(--primary-color) !important;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 50%;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-5px);
    background-color: #fff !important;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobil için Back To Top ve Cookie Banner Ayarı */
@media (max-width: 991px) {
    #backToTop {
        bottom: 80px; /* Alt menünün üstünde kalsın */
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .cookie-banner.show {
        bottom: 65px; /* Alt menünün hemen üstünde dursun */
    }
}

/* =========================================
   KİTAP DETAY SAYFASI MODERNİZASYONU
   ========================================= */

/* Transparan Hover Efektli Link Sınıfı */
.hover-primary { transition: color 0.3s ease; }
.hover-primary:hover { color: var(--primary-color) !important; border-color: var(--primary-color) !important; }

/* 3D Kitap Kapağı Efekti */
.modern-book-cover {
    display: inline-block;
    position: relative;
    perspective: 1000px;
}
.modern-book-cover img {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    border-radius: 4px 8px 8px 4px;
    box-shadow: 
        inset 4px 0 10px rgba(255,255,255,0.4), /* Kitap sırtı ışığı */
        inset -1px 0 2px rgba(0,0,0,0.1),
        5px 5px 20px rgba(0,0,0,0.15),
        15px 15px 40px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.modern-book-cover:hover img {
    transform: translateY(-5px) rotateY(-2deg);
    box-shadow: 
        inset 4px 0 10px rgba(255,255,255,0.5),
        10px 10px 25px rgba(0,0,0,0.2),
        20px 20px 45px rgba(0,0,0,0.1);
}

/* Teknik Detay Kartları (Grid) */
.tech-spec-card {
    transition: all 0.3s ease;
    border-color: rgba(0,0,0,0.05) !important;
}
.tech-spec-card:hover {
    background-color: #fff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Modern Çizgili Sekmeler (Line Tabs) */
.modern-line-tabs {
    border-bottom: 2px solid #e9ecef;
    gap: 30px;
    justify-content: flex-start;
}
.modern-line-tabs .nav-item {
    margin-bottom: -2px; /* Çizgiyi üst üste bindirmek için */
}
.modern-line-tabs .nav-link {
    color: var(--text-light);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 0;
    background: transparent !important;
    border-radius: 0;
    transition: all 0.3s ease;
}
.modern-line-tabs .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: rgba(var(--bs-primary-rgb), 0.3); /* Ufak bir iz */
}
.modern-line-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Buton Kaldırma Efekti */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* =========================================
   AYIN YAZARI MODERNİZASYONU
   ========================================= */

/* Cam Efekti (Glassmorphism) */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Yazar Görseli Çerçeve Hover Efekti */
.author-img-link:hover + #author-frame,
.author-img-wrapper:hover #author-frame {
    transform: translate(5px, -5px);
    opacity: 0.6 !important;
}

/* Slider İçi Temiz Kitap Kapağı Efekti */
.book-cover-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.group-hover-card:hover .book-cover-hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3) !important;
}

/* İncele Yazısı Hover Efekti */
.transition-all { transition: all 0.3s ease; }
.hover-text-white:hover {
    color: #fff !important;
    letter-spacing: 0.5px;
}

/* Ortak Buton Efekti */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-2px);
}

/* =========================================
   MARKA / REFERANSLAR (BRAND SLIDER)
   ========================================= */
.brand-item-card {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.brand-logo-img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.5; /* Varsayılan olarak yarı saydam ve siyah/beyaz */
    filter: grayscale(100%); 
    transition: all 0.4s ease;
}

/* Hover Efektleri */
.brand-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.08);
}

.brand-item-card:hover .brand-logo-img {
    opacity: 1; 
    filter: grayscale(0%); /* Renkli ve net hale getir */
    transform: scale(1.05);
}

/* Swiper Nokta Rengi (Markalar İçin Özel) */
.brandSwiper .swiper-pagination-bullet-active {
    background-color: var(--primary-color) !important;
    transform: scale(1.2);
}