/* assets/tema.css
 * Ana site (antalyaisabet.k12.tr) ile uyumlu tema: Poppins, lacivert + altın, açık gri yüzeyler, 10 px köşe, hap düğmeler.
 * Tüm genel sayfalar bunu yükler; sayfaya özel stiller (canli.css, kitap.css) bundan sonra gelir ve buradaki değişkenleri kullanır.
 * Kırmızı (--canli) yalnız "şu an canlı" anlamında kullanılır. Altın zemin üstünde yazı lacivert olur (beyaz okunmaz).
 */

/* Poppins (SIL OFL 1.1, @fontsource/poppins 5.0.8): latin + latin-ext (ğ ş İ Ğ Ş); tarayıcı yalnız sayfada geçen aralığı indirir */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/poppins-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/poppins-400-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/poppins-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/poppins-500-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/poppins-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/poppins-600-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --lacivert: #0C0F5B;
  --lacivert-koyu: #101A3D;
  --metin: #171F32;
  --metin-2: #4A5468;
  --soluk: #8590A6;
  --altin: #FEAD02;
  --altin-acik: #FFC44D;
  --altin-koyu: #8F6001;
  --cizgi: #E3E8F0;
  --yuzey: #F4F6FB;
  --zemin: #fff;
  --canli: #d9534f;
  --canli-koyu: #b52b27;
  --kose: 10px;
  --golge: 0 1px 2px rgba(16, 26, 61, .06), 0 6px 18px rgba(16, 26, 61, .06);
  --golge-ust: 0 4px 10px rgba(16, 26, 61, .10), 0 16px 32px rgba(16, 26, 61, .12);
  --yazi-tipi: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sayfa-en: 1320px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--zemin);
  color: var(--metin);
  font: 400 15px/1.55 var(--yazi-tipi);
}
img { max-width: 100%; }
a { color: var(--lacivert); }
:focus-visible { outline: 3px solid var(--altin); outline-offset: 2px; }

.kapsayici { width: 100%; max-width: var(--sayfa-en); margin: 0 auto; padding: 0 16px; }

/* ---------- Üst bar ---------- */
.ust-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--cizgi);
  backdrop-filter: saturate(1.4) blur(6px);
}
.ust-bar .kapsayici { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; flex-shrink: 0; color: var(--lacivert); text-decoration: none; }
.logo img { display: block; height: 56px; width: auto; }
.logo-yazi { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }
.logo-yazi b { color: var(--altin); font-weight: 600; }
.ust-menu-site { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ust-menu-site a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--metin);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.ust-menu-site a:hover { background: var(--yuzey); }
.ust-menu-site a[aria-current] { color: var(--lacivert); box-shadow: inset 0 -3px 0 var(--altin); border-radius: 9px 9px 0 0; }
.ust-menu-site .okul-link { color: var(--metin-2); }
@media (max-width: 640px) {
  .ust-bar .kapsayici { min-height: 60px; gap: 8px; }
  .logo img { height: 44px; }
  .logo-yazi { font-size: 16px; }
  .ust-menu-site { gap: 0; }
  .ust-menu-site a { padding: 0 8px; font-size: 13.5px; }
  .ust-menu-site .okul-link span { display: none; } /* dar ekranda yalnız ↗ */
}

/* ---------- Alt bilgi ---------- */
.alt-bilgi { margin-top: 48px; padding: 28px 0 32px; background: var(--yuzey); color: var(--metin-2); font-size: 14px; }
.alt-bilgi .kapsayici { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.alt-bilgi a { color: var(--lacivert); font-weight: 500; text-decoration: none; }
.alt-bilgi a:hover { text-decoration: underline; }

/* ---------- Düğmeler ve rozetler ---------- */
.dugme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 15px/1 var(--yazi-tipi);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.dugme-altin { background: var(--altin); color: var(--lacivert-koyu); }
.dugme-altin:hover { background: var(--altin-acik); }
.dugme-cizgi { border-color: rgba(255, 255, 255, .5); color: #fff; background: transparent; }
.dugme-cizgi:hover { background: rgba(255, 255, 255, .1); }
.dugme-acik { border-color: var(--cizgi); background: #fff; color: var(--lacivert); }
.dugme-acik:hover { border-color: var(--lacivert); }

.rozet-k {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.rozet-altin { background: var(--altin); color: var(--lacivert-koyu); }
.rozet-k-canli { background: var(--canli); color: #fff; }
.rozet-k-canli::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: tema-nabiz 1.4s ease-in-out infinite; }
.rozet-lacivert { background: var(--lacivert); color: #fff; }
.rozet-koyu { background: rgba(16, 26, 61, .82); color: #fff; }
@keyframes tema-nabiz { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Yaklaşan / canlı yayın duyurusu (kitap ve liste sayfaları) */
.duyuru {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: var(--kose);
  background: var(--yuzey);
  border: 1px solid var(--cizgi);
  color: var(--lacivert);
  text-decoration: none;
  font-size: 14.5px;
}
.duyuru:hover { border-color: var(--lacivert); }
.duyuru .serit-metin { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duyuru .serit-git { font-weight: 600; white-space: nowrap; }
.duyuru.serit-canli { background: var(--canli); border-color: var(--canli); color: #fff; }

/* ---------- Vitrin üst kartı (kahraman) ---------- */
.kahraman {
  position: relative;
  margin-top: 20px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse at 85% 0%, rgba(254, 173, 2, .14), transparent 55%), linear-gradient(135deg, var(--lacivert) 0%, var(--lacivert-koyu) 100%);
  color: #fff;
}
.kahraman-ic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 32px; padding: 36px; }
.kahraman-ic.kitap-turu { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.kahraman-gorsel { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.kahraman-gorsel img { display: block; width: 100%; height: auto; }
.kitap-turu .kahraman-gorsel { aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; box-shadow: inset 6px 0 10px -6px rgba(0, 0, 0, .4), 0 18px 40px rgba(0, 0, 0, .35); background: #fff; }
.kitap-turu .kahraman-gorsel img { height: 100%; object-fit: cover; object-position: top; }
.yayin-turu .kahraman-gorsel { aspect-ratio: 16 / 9; }
.yayin-turu .kahraman-gorsel img { height: 100%; object-fit: cover; }
.kahraman-yazi { display: grid; gap: 14px; justify-items: start; }
.kahraman h1 { margin: 0; font-size: clamp(24px, 3.4vw, 38px); font-weight: 600; line-height: 1.2; letter-spacing: -.3px; }
.kahraman-aciklama {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 15.5px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kahraman-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: rgba(255, 255, 255, .7); font-size: 14px; }
.kahraman-dugmeler { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (max-width: 760px) {
  .kahraman { border-radius: 12px; margin-top: 12px; }
  .kahraman-ic, .kahraman-ic.kitap-turu { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
  .kitap-turu .kahraman-gorsel { width: min(62%, 240px); justify-self: center; }
}

/* ---------- Raf (Netflix tarzı yatay şerit) ---------- */
.raf { margin-top: 36px; }
.raf-ust { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.raf-ust h2 { margin: 0; font-size: 21px; font-weight: 600; color: var(--metin); }
.raf-ust a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lacivert); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.raf-ust a:hover { text-decoration: underline; }
.raf-kaydir { position: relative; }
.raf-liste {
  display: grid;
  grid-auto-flow: column;
  gap: 18px;
  margin: 0;
  padding: 4px 2px 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.raf-liste > li { scroll-snap-align: start; }
.raf-kitap .raf-liste { grid-auto-columns: 176px; }
.raf-yayin .raf-liste { grid-auto-columns: 300px; }
@media (max-width: 640px) {
  .raf-kitap .raf-liste { grid-auto-columns: 42%; gap: 12px; }
  .raf-yayin .raf-liste { grid-auto-columns: 78%; gap: 12px; }
}
.raf-ok {
  position: absolute;
  top: 38%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid var(--cizgi);
  border-radius: 50%;
  background: #fff;
  color: var(--lacivert);
  box-shadow: var(--golge);
  cursor: pointer;
  transition: opacity .15s;
}
.raf-ok:hover { border-color: var(--lacivert); }
.raf-ok[disabled] { opacity: 0; pointer-events: none; }
.raf-ok-sol { left: -14px; }
.raf-ok-sag { right: -14px; }
@media (hover: none), (max-width: 640px) { .raf-ok { display: none; } }

/* ---------- Izgara ("Tümünü gör") ---------- */
.izgara { display: grid; gap: 24px 18px; margin: 0; padding: 0; list-style: none; }
.izgara-kitap { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.izgara-yayin { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 640px) {
  .izgara-kitap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}
.sayfa-baslik { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 28px 0 20px; }
.sayfa-baslik h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
.sayfa-baslik p { margin: 0; color: var(--metin-2); }
.bos-durum { padding: 48px 16px; border: 1px dashed var(--cizgi); border-radius: var(--kose); background: var(--yuzey); color: var(--metin-2); text-align: center; }

/* ---------- Kartlar ---------- */
.kart { display: grid; gap: 10px; align-content: start; color: var(--metin); text-decoration: none; }
.kart-gorsel { position: relative; display: block; overflow: hidden; background: var(--yuzey); transition: transform .2s ease, box-shadow .2s ease; }
.kart-gorsel img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kart:hover .kart-gorsel, .kart:focus-visible .kart-gorsel { transform: translateY(-4px); box-shadow: var(--golge-ust); }
.kart-kitap .kart-gorsel {
  aspect-ratio: 3 / 4;
  border-radius: 3px 9px 9px 3px;
  background: #fff;
  box-shadow: inset 5px 0 8px -5px rgba(0, 0, 0, .35), 0 2px 6px rgba(16, 26, 61, .14), 0 10px 22px rgba(16, 26, 61, .10);
}
.kart-kitap .kart-gorsel img { object-position: top; }
.kart-kitap .kart-gorsel::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent); pointer-events: none; }
.kart-yayin .kart-gorsel { aspect-ratio: 16 / 9; border-radius: var(--kose); }
.kart-rozetler { position: absolute; top: 8px; left: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.kart-alt-rozet { position: absolute; right: 8px; bottom: 8px; }
.kart-baslik {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kart-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: -4px; color: var(--soluk); font-size: 13px; }
.kart-meta .canli-yazi { color: var(--canli); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .kart:hover .kart-gorsel { transform: none; }
}
