/* =============================================== */
/* BOOKS-CAROUSEL.CSS - KOMPAKT KİTAP KARTLARI */
/* KENAR BOŞLUKLARI ARTIRILMIŞ, TEMİZ TASARIM */
/* =============================================== */

.books-carousel-section {
    padding: 3rem 2rem;
    background: var(--background-white);
    width: 100%;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* SECTION HEADER */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================== */
/* CAROUSEL YAPISI - GENİŞ KENAR BOŞLUKLARI */
/* =============================================== */

.books-carousel-wrapper {
    position: relative;
    margin: 0 2rem;  /* Sol ve sağ geniş boşluk */
    padding: 0.5rem 0;
}

.books-carousel-track {
    display: flex;
    gap: 1.5rem;  /* Kartlar arası boşluk */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 2rem 1.5rem;  /* Üst, sağ-sol, alt */
    margin: 0 -1rem;  /* Track içindeki padding'i dengelemek için */
    
    /* Scrollbar stilleri */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--border-light);
}

/* Webkit scrollbar (Chrome, Safari, Edge) */
.books-carousel-track::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

.books-carousel-track::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 10px;
    margin: 0 2rem;  /* Scrollbar'ın kenarlarla arasına boşluk */
}

.books-carousel-track::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--border-light);
}

.books-carousel-track::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =============================================== */
/* KİTAP KARTI - KOMPAKT TASARIM */
/* =============================================== */

.book-card-compact {
    flex: 0 0 160px;  /* Sabit genişlik */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.book-card-compact:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(44, 85, 48, 0.12);
    border-color: var(--primary-light);
}

/* KİTAP KAPAĞI */
.book-cover-compact {
    aspect-ratio: 3/4;  /* 3:4 oranı (kitap kapağı standardı) */
    width: 100%;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    overflow: hidden;
}

.book-cover-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.book-card-compact:hover .book-cover-compact img {
    transform: scale(1.05);
}

.cover-placeholder-compact {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* DİL BADGE */
.language-badge-compact {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

/* KİTAP BİLGİLERİ */
.book-info-compact {
    padding: 1rem 0.8rem 0.8rem;
}

.book-title-compact {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    line-height: 1.4;
    
    /* 2 satır için */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5rem;
}

.book-author-compact {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
    
    /* 1 satır */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* İLERLEME ÇUBUĞU (giriş yapmış kullanıcılar için) */
.book-progress-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.progress-bar-compact {
    flex: 1;
    height: 4px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-compact {
    height: 100%;
    background: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text-compact {
    font-size: 0.65rem;
    color: var(--text-medium);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

/* OKUMA BUTONU (giriş yapmamış kullanıcılar için) */
.read-button-compact {
    width: 100%;
    padding: 0.5rem 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.read-button-compact i {
    font-size: 0.7rem;
}

.read-button-compact:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 85, 48, 0.2);
}

/* =============================================== */
/* CAROUSEL OKLARI - BELİRGİN TASARIM */
/* =============================================== */

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 6px 16px rgba(44, 85, 48, 0.2);
    transition: all 0.2s;
    color: var(--primary-color);
    font-size: 1rem;
}

.carousel-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.3);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow.left {
    left: -5px;  /* Daha dışarıda */
}

.carousel-arrow.right {
    right: -5px;  /* Daha dışarıda */
}

.carousel-arrow i {
    font-size: 1rem;
}

/* =============================================== */
/* BÖLÜM FOOTER - TÜM KİTAPLARI GÖR BUTONU */
/* =============================================== */

.section-footer {
    text-align: center;
    margin-top: 2.5rem;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.2);
}

.view-all-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.3);
}

.view-all-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.view-all-btn:hover i {
    transform: translateX(5px);
}

/* =============================================== */
/* YÜKLEME DURUMU */
/* =============================================== */

.books-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.books-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================== */
/* BOŞ DURUM */
/* =============================================== */

.books-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.books-empty i {
    font-size: 4rem;
    color: var(--border-light);
    margin-bottom: 1.2rem;
    opacity: 0.5;
}

.books-empty h3 {
    font-size: 1.3rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.books-empty p {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
    color: var(--text-light);
}

/* =============================================== */
/* RESPONSIVE TASARIM */
/* =============================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .books-carousel-section {
        padding: 2.5rem 1.5rem;
    }
    
    .books-carousel-wrapper {
        margin: 0 1.5rem;
    }
    
    .book-card-compact {
        flex: 0 0 150px;
    }
    
    .carousel-arrow {
        width: 36px;
        height: 36px;
    }
}

/* Küçük tablet ve büyük mobil (480px - 768px) */
@media (max-width: 768px) {
    .books-carousel-section {
        padding: 2rem 1rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .books-carousel-wrapper {
        margin: 0 0.5rem;
    }
    
    .books-carousel-track {
        gap: 1rem;
        padding: 0.5rem 1rem 1.2rem;
    }
    
    .book-card-compact {
        flex: 0 0 130px;
    }
    
    .carousel-arrow {
        display: none; /* Mobilde okları gizle, kaydırarak geçilsin */
    }
    
    .view-all-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Mobil (480px ve altı) */
@media (max-width: 480px) {
    .books-carousel-section {
        padding: 1.5rem 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .books-carousel-wrapper {
        margin: 0 0.3rem;
    }
    
    .books-carousel-track {
        gap: 0.8rem;
        padding: 0.5rem 0.8rem 1rem;
    }
    
    .book-card-compact {
        flex: 0 0 110px;
    }
    
    .book-info-compact {
        padding: 0.7rem 0.5rem 0.6rem;
    }
    
    .book-title-compact {
        font-size: 0.8rem;
        min-height: 2.2rem;
    }
    
    .book-author-compact {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
    }
    
    .read-button-compact {
        padding: 0.4rem 0;
        font-size: 0.7rem;
    }
    
    .progress-text-compact {
        font-size: 0.6rem;
        min-width: 30px;
    }
    
    .language-badge-compact {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
    
    .section-footer {
        margin-top: 2rem;
    }
    
    .view-all-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Çok küçük ekranlar (360px ve altı) */
@media (max-width: 360px) {
    .book-card-compact {
        flex: 0 0 100px;
    }
    
    .book-title-compact {
        font-size: 0.75rem;
        min-height: 2rem;
    }
}