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

:root {
    /* Premium Arka Plan & Yazı Tonları */
    --bg-main: #f4f7f6;
    --text-dark: #0f172a;
    --text-muted: #475569;
    
    /* Canlı Kurumsal Gradyanlar */
    --grad-1: linear-gradient(135deg, #0ea5e9, #0284c7); /* İlkokul: Canlı Mavi */
    --grad-2: linear-gradient(135deg, #10b981, #047857); /* İHO: Canlı Zümrüt */
    --grad-3: linear-gradient(135deg, #8b5cf6, #6d28d9); /* İHL: Canlı Mor */
    --grad-4: linear-gradient(135deg, #f59e0b, #b45309); /* Seçmeli: Canlı Kehribar */
    --grad-5: linear-gradient(135deg, #ec4899, #be185d); /* Metin: Canlı Pembe/Yakut */
    
    /* Buton Renkleri (Sade & Profesyonel) */
    --btn-pdf: #be123c;
    --btn-audio: #2563eb;
    --btn-flip: #059669;
    --btn-portal: #7c3aed;
    --btn-test: #ea580c;
    --btn-soon: #cbd5e1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem; }

/* OPTİMİZE EDİLMİŞ HEADER / BANNER */
.header {
    text-align: center; 
    margin-bottom: 2rem; 
    padding: 2.5rem 1.5rem; /* Dikey boşluk (padding) azaltıldı */
    background: linear-gradient(135deg, #1e3a8a, #312e81); /* Çok daha canlı derin mavi */
    border-radius: 16px; 
    color: white;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
    position: relative; 
    overflow: hidden;
}

.header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.header-content { position: relative; z-index: 10; }
.title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 0.25rem; text-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.subtitle { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 400; opacity: 0.9; letter-spacing: 0.5px; }

/* EĞİTİCİ KAYNAKLAR & GEÇMİŞ YIL (YATAY DÜZEN) */
.flex-horizontal {
    display: flex; justify-content: space-between; align-items: center;
    background: white; border-radius: 12px; padding: 1.5rem 2rem; margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); border: 1px solid #e2e8f0;
    text-align: left;
}
.flex-horizontal .ed-text { flex: 1; margin-right: 2rem; }
.flex-horizontal h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-dark); display: flex; align-items: center; gap: 0.5rem; }
.flex-horizontal p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.text-blue { color: #2563eb; }
.text-purple { color: #8b5cf6; }

@media (max-width: 768px) {
    .flex-horizontal { flex-direction: column; text-align: center; padding: 1.5rem; gap: 1.5rem; }
    .flex-horizontal .ed-text { margin-right: 0; }
    .flex-horizontal h3 { justify-content: center; }
}

/* AKORDİYON & KATEGORİLER */
.category-section {
    background: white; border-radius: 16px; margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); 
    overflow: hidden; border: 1px solid #e2e8f0;
}
.category-header {
    padding: 1.25rem 2rem; cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; color: white; transition: filter 0.3s ease;
}
.category-header:hover { filter: brightness(1.1); }
.bg-gradient-1 { background: var(--grad-1); }
.bg-gradient-2 { background: var(--grad-2); }
.bg-gradient-3 { background: var(--grad-3); }
.bg-gradient-4 { background: var(--grad-4); }
.bg-gradient-5 { background: var(--grad-5); }

.category-title { font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; width: 100%; letter-spacing: -0.5px; }
.category-title i:not(.fa-chevron-down) { opacity: 0.9; margin-right: 0.75rem; font-size: 1.3rem; }
.toggle-icon { transition: transform 0.3s ease; }
.category-header.active .toggle-icon { transform: rotate(180deg); }

.category-content { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s; padding: 0 2rem; background: #fafafa; }
.category-content.active { max-height: 6000px; padding: 2.5rem 2rem; }

/* KİTAP GRID */
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (min-width: 1200px) { .grid-cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* KART TASARIMI VE YENİ KURDELASI */
.book-card {
    background: white; border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); 
    border: 1px solid #f1f5f9; display: flex; flex-direction: column; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-card:hover { transform: translateY(-6px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

.book-image {
    width: 100%; height: 320px; margin-bottom: 1.5rem; border-radius: 8px;
    overflow: hidden; background: #f1f5f9; display: flex; align-items: center; 
    justify-content: center; position: relative; /* YENİ etiketi için relative şart */
}
.book-image img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.book-card:hover .book-image img { transform: scale(1.04); }

/* YENİ ŞERİDİ (RİBBON) */
.ribbon-new {
    position: absolute;
    top: 20px;
    right: -35px;
    width: 140px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    transform: rotate(45deg);
    padding: 6px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 10;
}

/* AKSİYON BUTONLARI */
.book-actions { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.book-title { font-size: 1.1rem; font-weight: 700; text-align: center; color: var(--text-dark); margin-bottom: 1rem; line-height: 1.4; letter-spacing: -0.3px; }

.book-actions a, .educational-link, .previous-year-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.75rem 1rem; border-radius: 8px; color: white !important; font-size: 0.9rem;
    font-weight: 500; text-decoration: none !important; transition: all 0.2s ease;
}
.book-actions a:hover, .educational-link:hover, .previous-year-link:hover { transform: translateY(-1px); filter: brightness(1.15); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

.pdf-link { background: var(--btn-pdf); }
.audio-link { background: var(--btn-audio); }
.flipbook-link { background: var(--btn-flip); }
.portal-link { background: var(--btn-portal); }
.test-link { background: var(--btn-test); }
.presentation-link { background: #0f766e; }
.telegram-link { background: #0088cc; }

.educational-link, .previous-year-link { background: var(--text-dark); display: inline-flex; padding: 0.75rem 2rem; border-radius: 9999px; }
.soon-link { background: var(--btn-soon) !important; color: #475569 !important; cursor: not-allowed; pointer-events: none; box-shadow: none !important; }

/* BEYAZ LOGO İÇİN KOYU FOOTER TASARIMI */
.footer {
    background: #0f172a; 
    color: #94a3b8; 
    padding: 4rem 1.5rem 3rem 1.5rem; 
    margin-top: 3rem;
    border-top: 4px solid #1e3a8a;
}
.footer-container { max-width: 1280px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.footer-logo a { display: inline-flex; flex-direction: column; align-items: center; gap: 0.8rem; color: white; text-decoration: none; transition: opacity 0.3s; }
.footer-logo a:hover { opacity: 0.8; }
.footer-logo-img { height: 45px; object-fit: contain; }
.footer-text { font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; }
.footer-copyright { margin-top: 1.5rem; font-size: 0.9rem; font-weight: 400; }

/* YUKARI ÇIK BUTONU */
#scrollToTopBtn {
    display: none; /* JavaScript ile görünür olacak */
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    z-index: 99; 
    border: none; 
    outline: none; 
    background: linear-gradient(135deg, #3b82f6, #2563eb); 
    color: white; 
    cursor: pointer; 
    padding: 15px; 
    border-radius: 50%; 
    font-size: 18px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
    transition: background 0.3s, transform 0.3s;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}
#scrollToTopBtn:hover { transform: translateY(-4px); filter: brightness(1.1); }

/* MOBİL UYUM */
@media (max-width: 768px) {
    .container { padding: 1.5rem 1rem; }
    .header { padding: 2rem 1rem; border-radius: 12px; margin-bottom: 1.5rem; }
    .category-header { padding: 1.25rem 1.5rem; }
    .category-content.active { padding: 1.5rem 1rem; }
    .books-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .book-image { height: 260px; }
    .footer { padding: 3rem 1rem; margin-top: 2rem; }
    #scrollToTopBtn { bottom: 20px; right: 20px; width: 45px; height: 45px; font-size: 16px; padding: 0; }
}