/*
  Modern Kitap Platformu Teması
  Renk Paleti:
  - Primary (Vurgu): #4A90E2 (Canlı Mavi)
  - Secondary (İkincil Vurgu): #50E3C2 (Mint Yeşili)
  - Background (Arka Plan): #F8F9FA (Açık Gri/Kirli Beyaz)
  - Surface (Kartlar, Navbar vb.): #FFFFFF (Beyaz)
  - Text (Ana Metin): #343A40 (Koyu Gri)
  - Muted Text (İkincil Metin): #6C757D (Orta Gri)
  - Border (Kenarlıklar): #DEE2E6 (Çok Açık Gri)
*/

/* Remove unnecessary spacing from empty containers */
.container.mt-4:empty,
.container.mt-5:empty,
.container.my-4:empty,
.container.my-5:empty {
    display: none !important;
}

/* Remove excessive margins from containers */
.container.mt-4 {
    margin-top: 1rem !important;
}

.container.mt-5 {
    margin-top: 1.5rem !important;
}

.container.my-4 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.container.my-5 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

/* Additional mobile spacing fixes */
@media (max-width: 767.98px) {
    .container.my-5 {
        margin-top: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .container.mt-4 {
        margin-top: 0.5rem !important;
    }
    
    .container.mt-5 {
        margin-top: 0.5rem !important;
    }
    
    /* Ensure author card header is completely centered */
    .author-card-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .author-card-header .author-image {
        margin: 0 auto !important;
        order: 1 !important;
    }
    
    .author-card-header .author-info {
        order: 2 !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .author-card-header .ms-auto {
        order: 3 !important;
        margin: 0 auto !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    .author-card-header .ms-auto .text-muted {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Announcement Bar Styles */
.announcement-bar {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: #FFFFFF;
    padding: 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 1050;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.announcement-bar .announcement-text {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.announcement-bar .announcement-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.announcement-bar .btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.3rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.announcement-bar .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    color: #4A90E2;
    border-color: rgba(255, 255, 255, 0.9);
}

.announcement-bar .btn-light:hover {
    background-color: #FFFFFF;
    color: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.announcement-bar .btn-outline-light {
    background-color: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.7);
}

.announcement-bar .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-1px);
}

.announcement-bar .close-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.announcement-bar .close-btn:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments for announcement bar */
@media (max-width: 768px) {
    .announcement-bar {
        padding: 1rem 0;
        position: relative;
    }
    
    .announcement-bar .container {
        flex-direction: column;
        gap: 0.75rem;
        position: relative;
    }
    
    .announcement-bar .announcement-text {
        text-align: center;
        min-width: auto;
        padding-right: 2rem; /* Space for close button */
    }
    
    .announcement-bar .close-btn {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 10 !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .announcement-bar .close-btn:hover {
        background: rgba(255, 255, 255, 0.3) !important;
    }
}

/* Hide announcement bar when dismissed */
.announcement-bar.hidden {
    display: none;
}

/* Genel Stil Ayarları */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobilde yatay scroll önleme */
@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Renk Paleti Değişkenleri */
:root {
    --bs-primary: #4A90E2;
    --bs-primary-rgb: 74, 144, 226;
    --bs-secondary: #B8860B; /* Koyu Altın Rengi */
    --bs-secondary-rgb: 184, 134, 11;

    /* Bootstrap mavi renklerini override et */
    --bs-blue: #4A90E2;
    --bs-indigo: #4A90E2;
    --bs-cyan: #4A90E2;
    --bs-info: #4A90E2;
    --bs-info-rgb: 74, 144, 226;
    --bs-link-color: #4A90E2;
    --bs-link-color-rgb: 74, 144, 226;
    --bs-link-hover-color: #357ABD;
    --bs-link-hover-color-rgb: 53, 122, 189;

    /* Bootstrap focus ring renkleri */
    --bs-focus-ring-color: rgba(74, 144, 226, 0.25);
    
    /* Bootstrap form kontrol renkleri */
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;

    --theme-bg: #F8F9FA;
    --theme-surface: #FFFFFF;
    --theme-text: #343A40;
    --theme-text-muted: #6C757D;
    --theme-border: #DEE2E6;
    --theme-shadow: rgba(0, 0, 0, 0.05);
}

/* Link ve Buton Stilleri */
a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: #357ABD; /* Primary rengin biraz koyusu */
}

/* Bootstrap mavi renklerini override et */
.text-info, .link-info {
    color: #4A90E2 !important;
}

.text-info:hover, .link-info:hover {
    color: #357ABD !important;
}

.bg-info {
    background-color: #4A90E2 !important;
}

.border-info {
    border-color: #4A90E2 !important;
}

.btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4A90E2;
    --bs-btn-border-color: #4A90E2;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #357ABD;
    --bs-btn-hover-border-color: #357ABD;
    --bs-btn-focus-shadow-rgb: 74, 144, 226;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #357ABD;
    --bs-btn-active-border-color: #357ABD;
}

.btn-outline-info {
    --bs-btn-color: #4A90E2;
    --bs-btn-border-color: #4A90E2;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4A90E2;
    --bs-btn-hover-border-color: #4A90E2;
    --bs-btn-focus-shadow-rgb: 74, 144, 226;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4A90E2;
    --bs-btn-active-border-color: #4A90E2;
}

.alert-info {
    --bs-alert-color: #055160;
    --bs-alert-bg: rgba(74, 144, 226, 0.1);
    --bs-alert-border-color: rgba(74, 144, 226, 0.2);
    --bs-alert-link-color: #055160;
}

.table-info {
    --bs-table-color: #000;
    --bs-table-bg: rgba(74, 144, 226, 0.1);
    --bs-table-border-color: rgba(74, 144, 226, 0.2);
    --bs-table-striped-bg: rgba(74, 144, 226, 0.05);
    --bs-table-striped-color: #000;
    --bs-table-active-bg: rgba(74, 144, 226, 0.2);
    --bs-table-active-color: #000;
    --bs-table-hover-bg: rgba(74, 144, 226, 0.15);
    --bs-table-hover-color: #000;
}

.list-group-item-info {
    --bs-list-group-color: #055160;
    --bs-list-group-bg: rgba(74, 144, 226, 0.1);
    --bs-list-group-border-color: rgba(74, 144, 226, 0.2);
    --bs-list-group-action-hover-color: var(--bs-emphasis-color);
    --bs-list-group-action-hover-bg: rgba(74, 144, 226, 0.2);
    --bs-list-group-action-active-color: var(--bs-emphasis-color);
    --bs-list-group-action-active-bg: rgba(74, 144, 226, 0.2);
    --bs-list-group-active-color: rgba(74, 144, 226, 0.1);
    --bs-list-group-active-bg: #055160;
    --bs-list-group-active-border-color: #055160;
}

.progress-bar {
    background-color: #4A90E2 !important;
}

.badge.bg-info {
    background-color: #4A90E2 !important;
}

/* Nav pills ve tabs için mavi renkler */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: #4A90E2 !important;
    color: #FFFFFF !important;
}

.nav-pills .nav-link.active:hover,
.nav-pills .show > .nav-link:hover {
    background-color: #357ABD !important;
    color: #FFFFFF !important;
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
    border-color: rgba(74, 144, 226, 0.2) rgba(74, 144, 226, 0.2) var(--bs-border-color) !important;
    color: #4A90E2 !important;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background-color: #4A90E2 !important;
    color: #FFFFFF !important;
    border-color: #4A90E2 #4A90E2 transparent !important;
}

.nav-tabs .nav-item.show .nav-link:hover,
.nav-tabs .nav-link.active:hover {
    background-color: #357ABD !important;
    color: #FFFFFF !important;
    border-color: #357ABD #357ABD transparent !important;
}

/* Dropdown menü aktif öğeler */
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: #4A90E2 !important;
}

/* Pagination */
.pagination .page-link {
    color: #4A90E2 !important;
}

.pagination .page-link:hover {
    color: #357ABD !important;
    background-color: rgba(74, 144, 226, 0.1) !important;
}

.pagination .page-item.active .page-link {
    background-color: #4A90E2 !important;
    border-color: #4A90E2 !important;
    color: #FFFFFF !important;
}

.pagination .page-item.active .page-link:hover {
    background-color: #357ABD !important;
    border-color: #357ABD !important;
    color: #FFFFFF !important;
}

/* Form kontrolleri focus durumu */
.form-control:focus,
.form-select:focus {
    border-color: #4A90E2 !important;
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Checkbox ve radio butonlar */
.form-check-input:checked {
    background-color: #4A90E2 !important;
    border-color: #4A90E2 !important;
}

.form-check-input:focus {
    border-color: #4A90E2 !important;
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Range slider */
.form-range::-webkit-slider-thumb {
    background-color: #4A90E2 !important;
}

.form-range::-moz-range-thumb {
    background-color: #4A90E2 !important;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px #fff, 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Accordion */
.accordion-button:focus {
    border-color: #4A90E2 !important;
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Modal */
.modal-header .btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Offcanvas */
.offcanvas-header .btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

/* Toast */
.toast-header .btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25) !important;
}

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px var(--theme-shadow);
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #FFFFFF;
}
.btn-primary:hover {
    background-color: #357ABD;
    border-color: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.2);
}

/* Form Kontrolleri */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--theme-border);
    padding: 0.75rem 1rem;
    padding-right: 2.5rem; /* Ok için ekstra boşluk */
    background-color: var(--theme-surface);
    color: var(--theme-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.25);
    background-color: var(--theme-surface);
    color: var(--theme-text);
}
.form-control::placeholder {
    color: var(--theme-text-muted);
    opacity: 0.7;
}

/* Kart Stilleri */
.card {
    border: 1px solid var(--theme-border);
    border-radius: 0.75rem;
    background-color: var(--theme-surface);
    box-shadow: 0 4px 12px var(--theme-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar-custom {
    background-color: var(--theme-surface) !important;
    padding: 1rem 0;
    border-bottom: 1px solid var(--theme-border);
    box-shadow: 0 2px 8px var(--theme-shadow);
}
.navbar-custom .navbar-brand,
.navbar-custom .nav-link,
.navbar-custom .dropdown-item {
    color: var(--theme-text) !important;
    font-weight: 500;
}
.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--bs-primary) !important;
}
.navbar-custom .dropdown-menu {
    background-color: var(--theme-surface);
    border-color: var(--theme-border);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px var(--theme-shadow);
}
.navbar-custom .dropdown-item:hover {
    background-color: var(--theme-bg); /* Açık gri arka plan */
}

/* Bölüm Başlıkları */
.section-title {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--theme-text);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--bs-primary);
    border-radius: 2px;
}

/* Kitap Kartları */
.book-card .card-img-top {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 0.7rem 0.7rem 0 0;
    border-bottom: 1px solid var(--theme-border);
}
.book-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.book-card .book-title-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-primary); /* Kitap başlıkları için ana mavi renk */
    margin-bottom: 0.25rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-card .book-title-link:hover {
    color: var(--bs-primary);
}
.book-card .book-author {
    font-size: 0.9rem;
    color: var(--theme-text-muted);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.book-card .book-category {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25em 0.6em;
    background-color: var(--bs-secondary);
    color: #FFFFFF;
    border-radius: 0.3rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}
.book-card .rating-stars {
    color: var(--bs-secondary); /* Altın rengi yıldızlar */
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.book-card .book-stats {
    font-size: 0.85rem;
    color: var(--theme-text-muted);
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--theme-border);
}

/* Kitap Detay Sayfası */
.book-detail-cover {
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.book-detail-info h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--theme-text);
}
.book-detail-info .author-link {
    font-size: 1.3rem;
    color: var(--bs-primary);
    font-weight: 500;
}
.book-detail-info .category-badge {
    font-size: 0.9rem;
    padding: 0.4em 0.8em;
    background-color: var(--bs-secondary);
    color: #FFFFFF;
    border-radius: 0.4rem;
    font-weight: 500;
}
.book-detail-info .rating-stars {
    color: var(--bs-secondary);
    font-size: 1.2rem;
}
.book-detail-info .book-meta {
    font-size: 1rem;
    color: var(--theme-text-muted);
}
.book-detail-info .book-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--theme-text);
}

/* Footer */
.footer {
    background-color: var(--theme-surface);
    color: var(--theme-text-muted);
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--theme-border);
    box-shadow: 0 -2px 8px var(--theme-shadow);
}
.footer h5 {
    color: var(--theme-text);
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.footer a {
    color: var(--theme-text-muted);
}
.footer a:hover {
    color: var(--bs-primary);
}

/* Diğer Bileşenler */
.alert {
    border-radius: .5rem;
    border-width: 1px;
    box-shadow: 0 2px 8px var(--theme-shadow);
}
.alert-success {
    background-color: #D4EDDA;
    color: #155724;
    border-color: #C3E6CB;
}
.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
    border-color: #F5C6CB;
}
.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
    border-color: #BEE5EB;
}
.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
    border-color: #FFEBA8;
}

.nav-pills .nav-link, .nav-tabs .nav-link {
    color: var(--theme-text-muted);
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}
.nav-pills .nav-link.active, .nav-tabs .nav-link.active {
    background-color: var(--bs-primary) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}
.nav-pills .nav-link:hover:not(.active), .nav-tabs .nav-link:hover:not(.active) {
    color: var(--bs-primary) !important;
    background-color: var(--theme-bg);
}

/* Genel Yardımcı Sınıflar */
.text-primary { color: var(--bs-primary) !important; }
.text-secondary { color: var(--bs-secondary) !important; }
.bg-primary { background-color: var(--bs-primary) !important; }
.bg-secondary { background-color: var(--bs-secondary) !important; }
.bg-theme-surface { background-color: var(--theme-surface) !important; }
.text-theme-text { color: var(--theme-text) !important; }
.text-theme-muted { color: var(--theme-text-muted) !important; }

/* Ekstra Stil Ayarlamaları */
.container {
    max-width: 1200px;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* Hero Bölümü için özel stil */
.hero-section {
    background: linear-gradient(rgba(74, 144, 226, 0.8), rgba(74, 144, 226, 0.6)), url('https://source.unsplash.com/1600x900/?library,books,reading') no-repeat center center;
    background-size: cover;
    color: #FFFFFF;
    padding: 6rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.page-hero-section {
    background: linear-gradient(rgba(74, 144, 226, 0.8), rgba(74, 144, 226, 0.6));
    color: #FFFFFF;
    padding: 3rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}
.hero-section .btn {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 0.6rem;
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(var(--bs-secondary-rgb), 0.3);
}
.hero-section .btn:hover {
    background-color: #A57C0A; /* Koyu Altın Rengi Hover */
    border-color: #A57C0A;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(184, 134, 11, 0.4);
}

.editor-note-text,
.tab-pane p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Modern Comment System Styles */
.comments-section {
    max-width: 100%;
    overflow-x: hidden;
}

.comment-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    transition: all 0.2s ease;
}

.comment-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

/* Reply indicator for nested comments */
.comment-card.is-reply {
    background: #f8f9fa;
    border-left: 4px solid var(--bs-primary);
    margin-left: 0;
}

.comment-card.is-reply::before {
    content: '';
    position: absolute;
    left: -1px;
    top: -1rem;
    width: 2px;
    height: 1rem;
    background: var(--bs-primary);
    opacity: 0.3;
}

/* Reply badge */
.reply-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bs-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
}

.reply-indicator i {
    font-size: 0.6rem;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--bs-primary), #357ABD);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

.comment-meta {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--theme-text);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--theme-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.comment-date::before {
    content: '•';
    color: var(--bs-primary);
    font-weight: bold;
}

.comment-body {
    color: var(--theme-text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-size: 0.95rem;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f3f4;
}

.comment-actions .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

/* Flat reply system - all comments at same level */
.comment-replies {
    margin-top: 0;
    padding-left: 0;
    border-left: none;
    max-width: 100%;
    overflow-x: hidden;
}

.comment-replies .comment-card {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    position: relative;
}

/* Connection line for replies */
.comment-replies .comment-card::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    width: 1rem;
    height: 2px;
    background: var(--bs-primary);
    opacity: 0.3;
    border-radius: 1px;
}

/* Mobile optimizations */
@media (max-width: 767.98px) {
    .comment-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .comment-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .user-name {
        font-size: 0.9rem;
    }
    
    .comment-date {
        font-size: 0.75rem;
    }
    
    .comment-body {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .reply-indicator {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .comment-actions {
        gap: 0.5rem;
        padding-top: 0.4rem;
    }
    
    .comment-actions .btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* Remove connection lines on mobile for cleaner look */
    .comment-replies .comment-card::before {
        display: none;
    }
}

/* Very small screens */
@media (max-width: 575.98px) {
    .comment-card {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .comment-header {
        gap: 0.4rem;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .comment-date {
        font-size: 0.7rem;
    }
    
    .comment-body {
        font-size: 0.85rem;
    }
}

/* Mobile Filter Toggle */
@media (max-width: 767.98px) {
    /* Filter section mobile styling */
    .filter-section-mobile {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .filter-toggle-btn {
        width: 100%;
        background: linear-gradient(135deg, var(--bs-primary), #357ABD);
        color: white;
        border: none;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
        transition: all 0.3s ease;
    }
    
    .filter-toggle-btn:hover {
        background: linear-gradient(135deg, #357ABD, #2c6aa0);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    }
    
    .filter-toggle-btn i {
        transition: transform 0.3s ease;
    }
    
    .filter-toggle-btn.active i {
        transform: rotate(180deg);
    }
    
    .filter-content {
        background: white;
        border: 1px solid #e9ecef;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        overflow: visible !important; /* Dropdown'ların dışarı çıkmasına izin ver */
        transition: all 0.3s ease;
        position: relative;
        z-index: 1000;
    }
    
    .filter-content.collapsed {
        display: none !important;
    }
    
    .filter-content {
        display: block;
    }
    
    .filter-content .card-header {
        display: none;
    }
    
    .filter-content .card-body {
        padding: 1rem;
        overflow: visible !important;
    }
    
    /* Dropdown menüler için mobil düzeltmeleri */
    .filter-content .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        width: 100% !important;
        max-width: 300px !important;
        max-height: 200px !important;
        overflow-y: auto !important;
        z-index: 1050 !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 0.375rem !important;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
        background-color: white !important;
        margin-top: 0.125rem !important;
    }
    
    .filter-content .dropdown-toggle::after {
        display: inline-block !important;
    }
    
    .filter-content .dropdown {
        position: relative !important;
    }
    
    .filter-content .dropdown-item {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        color: #212529 !important;
        text-decoration: none !important;
        background-color: transparent !important;
        border: 0 !important;
        display: block !important;
        width: 100% !important;
        clear: both !important;
        font-weight: 400 !important;
        line-height: 1.5 !important;
        white-space: nowrap !important;
    }
    
    .filter-content .dropdown-item:hover,
    .filter-content .dropdown-item:focus {
        background-color: #f8f9fa !important;
        color: #1e2125 !important;
    }
    
    /* Hide filter section on desktop */
    .col-md-3 .card {
        display: block;
    }
}

/* Desktop - hide mobile filter toggle */
@media (min-width: 768px) {
    .filter-section-mobile {
        display: none;
    }
}

/* Tab content container */
.tab-content {
    max-width: 100%;
    overflow-x: hidden;
}

.tab-pane {
    max-width: 100%;
    overflow-x: hidden;
}

/* Author section mobile optimization */
@media (max-width: 767.98px) {
    .author-card {
        padding: 1rem;
        margin-bottom: 1rem !important;
    }
    
    .author-card-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .author-image {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto !important;
        order: 1 !important;
    }
    
    .author-info {
        text-align: center !important;
        order: 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .author-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem !important;
        text-align: center !important;
    }
    
    .author-info p {
        text-align: center !important;
        margin-bottom: 0 !important;
    }
    
    .author-bio {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }
    
    /* Author social links mobilde ortalama */
    .ms-auto {
        margin: 0 auto !important;
        text-align: center !important;
        order: 3 !important;
        width: 100% !important;
    }
    
    .ms-auto .text-muted {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }
    
    .author-social-links {
        display: flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        margin-top: 0.5rem !important;
        width: 100% !important;
    }
    
    .author-social-links a {
        font-size: 1.2rem !important;
        color: var(--bs-primary) !important;
        transition: color 0.2s ease !important;
    }
    
    .author-social-links a:hover {
        color: var(--bs-secondary) !important;
    }
    
    /* Author's other books - 2 columns on mobile */
    .author-card + hr + h5 + .row .col-6 {
        width: 50% !important;
        padding: 0 0.25rem;
    }
    
    /* Remove unnecessary spacing from containers on mobile */
    .container.my-5 {
        margin-top: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .container.mt-4 {
        margin-top: 0.5rem !important;
    }
    
    .container.mt-5 {
        margin-top: 0.5rem !important;
    }
}

/* Mobile Navbar Düzeltmeleri */
@media (max-width: 991.98px) {
    /* Navbar toggler görünür olsun */
    .navbar-toggler {
        display: block !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
    
    /* Mobilde arama çubuğu düzeni */
    .navbar-collapse .mx-auto {
        max-width: 100% !important;
        margin: 1rem 0 !important;
    }
    
    /* Mobilde menü öğeleri */
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* Mobile Kitap Kartları - 2'li Düzen */
@media (max-width: 767.98px) {
    /* Genel mobil yazı boyutları küçültme */
    h1, .display-4 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Hero section mobil */
    .hero-section h1, .page-hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section p, .page-hero-section p {
        font-size: 0.9rem !important;
    }
    
    /* Container padding mobilde artır - bitişiklik sorunu çözümü */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Ana sayfa kitap grid'i - mobilde 2'li, boşlukları düzenle */
    .row-cols-1.row-cols-sm-2.row-cols-md-3.row-cols-lg-4 {
        --bs-gutter-x: 1rem;
    }
    
    .row-cols-1.row-cols-sm-2.row-cols-md-3.row-cols-lg-4 > .col {
        flex: 0 0 auto;
        width: calc(50% - 0.5rem);
        margin-bottom: 0.75rem;
        padding: 0 0.25rem;
    }
    
    /* Tüm kitaplar, popüler kitaplar, kategori sayfaları - mobilde 2'li */
    .col-md-4.mb-4 {
        flex: 0 0 auto;
        width: calc(50% - 0.5rem) !important;
        margin-bottom: 0.75rem !important;
        padding: 0 0.25rem !important;
    }
    
    /* Kitap kartı mobil optimizasyonu */
    .book-card {
        margin-bottom: 0.5rem;
        border-radius: 0.4rem;
        border: 1px solid #e9ecef;
    }
    
    .book-card .card-img-top {
        aspect-ratio: 2 / 3;
        object-fit: contain;
        border-radius: 0.4rem 0.4rem 0 0;
        height: 100%;
        max-height: 160px;
        background-color: #f8f9fa;
    }
    
    .book-card .card-body {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    /* Kitap başlıkları - tek satırda en az 25 karakter, taşarsa ... */
    .book-card .card-title {
        font-size: 0.6rem !important;
        line-height: 1.2;
        margin-bottom: 0.2rem !important;
        height: auto;
        overflow: hidden !important;
        display: block !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        width: 100%;
        max-width: 100%;
    }
    
    .book-card .book-title-link {
        font-size: 0.6rem !important;
        line-height: 1.2;
        margin-bottom: 0.2rem !important;
        height: auto;
        overflow: hidden !important;
        display: block !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        width: 100%;
        max-width: 100%;
    }
    
    .book-card .book-author {
        font-size: 0.7rem;
        margin-bottom: 0.2rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Kategori badge ve yıldızlar - mobilde alt alta */
    .book-card .d-flex.justify-content-between.align-items-center {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.2rem;
        margin-bottom: 0.2rem !important;
    }
    
    .book-card .book-category {
        font-size: 0.65rem !important;
        padding: 0.3em 0.6em !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        align-self: flex-start !important;
        height: auto !important;
        min-height: 1.5em !important;
        box-sizing: border-box !important;
    }
    
    /* Yıldızlar mobilde kategorinin altında */
    .book-card .rating-stars {
        font-size: 0.7rem !important;
        margin-bottom: 0 !important;
        display: flex !important;
        align-items: center !important;
        align-self: flex-start !important;
        order: 2;
    }
    
    .book-card .rating-stars i {
        margin-right: 1px;
    }
    
    /* Kitap istatistikleri mobil */
    .book-card .book-stats {
        font-size: 0.65rem !important;
        margin-top: 0.2rem !important;
        padding-top: 0.2rem !important;
        display: flex;
        justify-content: space-between;
        gap: 0.1rem;
    }
    
    .book-card .book-stats span {
        display: flex;
        align-items: center;
        white-space: nowrap;
    }
    
    .book-card .book-stats i {
        font-size: 0.6rem;
        margin-right: 0.15rem;
    }
    
    /* Kategori sayfası AJAX yüklenen kitaplar için */
    #book-list-container .col-md-4 {
        flex: 0 0 auto;
        width: calc(50% - 0.5rem) !important;
        margin-bottom: 0.75rem !important;
        padding: 0 0.25rem !important;
    }
    
    /* Row gutter mobilde düzenle */
    .row {
        --bs-gutter-x: 1rem;
        margin-left: calc(-0.5rem);
        margin-right: calc(-0.5rem);
        max-width: 100% !important;
        overflow-x: hidden !important;
        justify-content: center !important;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100% !important;
    }
    
    /* Kitap kartları mobilde ortalama */
    .row.row-cols-1.row-cols-sm-2.row-cols-md-3.row-cols-lg-4 {
        justify-content: center !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    /* Section başlıkları mobilde küçült */
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Card başlıkları mobilde küçült */
    .card-header {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
    
    /* Form elemanları mobilde küçült */
    .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .form-control, .form-select {
        font-size: 0.85rem !important;
        padding: 0.6rem 0.75rem !important;
    }
    
    /* Kategori ikonu mobilde küçült */
    .category-icon-wrapper {
        width: 80px !important;
        height: 80px !important;
    }
    
    .category-icon-wrapper i {
        font-size: 40px !important;
    }
    
    /* Kategori sayfası ikonu mobilde küçült */
    .col-md-3 .category-icon-wrapper {
        width: 100px !important;
        height: 100px !important;
    }
    
    .col-md-3 .category-icon-wrapper i {
        font-size: 50px !important;
    }
    
    /* Kitap detay sayfası kapak görseli mobilde küçült */
    .book-cover-wrapper {
        max-width: 250px !important;
        margin: 0 auto 1.5rem auto !important;
    }
    
    .book-cover {
        width: 100% !important;
        height: auto !important;
        max-height: 350px !important;
        object-fit: contain !important;
    }
    
    /* Section title wrapper mobilde tek satırda ve ortalı */
    .section-title-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
        text-align: center !important;
    }
    
    .section-title-wrapper h2 {
        font-size: 1.2rem !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .section-title-wrapper i {
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Section header mobilde alt alta düzenleme */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 .btn {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
        align-self: center !important;
        white-space: nowrap !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.3rem !important;
        text-align: center !important;
    }
    
    .d-flex.justify-content-between.align-items-center.mb-4 p {
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
        text-align: center !important;
    }
    
    /* Kitap istatistikleri mobil optimizasyonu */
    .book-statistics .d-flex {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .book-statistics .stat-item {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
        flex: none !important;
    }
    
    .book-statistics .stat-label {
        font-size: 0.65rem !important;
        margin-bottom: 0.2rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .book-statistics .stat-number {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }
}

/* Çok küçük ekranlar için ek optimizasyon */
@media (max-width: 575.98px) {
    .book-card .card-img-top {
        height: 100%;
        max-height: 140px;
        object-fit: contain;
        background-color: #f8f9fa;
    }
    
    .book-card .card-body {
        padding: 0.4rem;
    }
    
    .book-card .card-title {
        font-size: 0.75rem !important;
        width: 100%;
        max-width: 100%;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .book-card .book-title-link {
        font-size: 0.75rem !important;
        width: 100%;
        max-width: 100%;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .book-card .book-author {
        font-size: 0.65rem;
    }
    
    .book-card .rating-stars {
        font-size: 0.65rem !important;
    }
    
    .book-card .book-stats {
        font-size: 0.6rem !important;
    }
    
    /* Çok küçük ekranlarda yazıları daha da küçült */
    h1, .display-4 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.3rem !important;
    }
    
    .container {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

/* Mobile Select Dropdown Fix */
@media (max-width: 767.98px) {
    /* Mobile category select dropdown fix */
    #mobile_category_id,
    .form-select {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }
    
    /* Mobile select option text fix */
    #mobile_category_id option,
    .form-select option {
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Ensure select dropdown doesn't extend beyond container */
    .filter-content .form-select,
    .filter-section-mobile .form-select {
        max-width: calc(100vw - 2rem) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Mobile filter form controls */
    .filter-content .row .col-12,
    .filter-content .row .col-md-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Prevent horizontal overflow in filter section */
    .filter-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    .filter-content .card-body {
        padding: 0.75rem !important;
        overflow-x: hidden !important;
    }
    
    /* Mobile form labels */
    .filter-content .form-label {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
    }
}
