/* ============================================================
   style/site.css
   Canbay İngilizce — Sınıf / Kategori / Tema-Ünite hiyerarşisi
   için ortak tasarım sistemi. Mevcut sayfaların inline stilleriyle
   aynı görsel dili kullanır (color-bar, .page, kart sistemi).
   Yeni oluşturulan tüm sayfalar (index.html'deki yeni bölüm dâhil)
   bu dosyayı kullanır; eski sayfalara dokunulmamıştır.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #e8edf2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 40px;
}

a { color: inherit; }

/* ── Renk şeridi ── */
.color-bar, .color-bar-bottom, .page {
  width: calc(100% - 20px);
  max-width: 1900px;
}
.color-bar, .color-bar-bottom { display: flex; height: 13px; overflow: hidden; }
.color-bar { border-radius: 8px 8px 0 0; }
.color-bar-bottom { border-radius: 0 0 8px 8px; margin-top: -1px; }
.cb1 { background: #ff5757; flex: 1; }
.cb2 { background: #ff5757; flex: 1; }
.cb3 { background: #ff5757; flex: 1; }
.cb4 { background: #ff5757; flex: 1; }

/* ── Sayfa kapsayıcı ── */
.page {
  background: #fff;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.13);
  overflow: hidden;
}

/* ── Üst menü / breadcrumb ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 2px solid #f0f0f0;
  gap: 10px;
  flex-wrap: wrap;
}
.header-logo { height: 48px; width: auto; flex-shrink: 0; }
.brand-block { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.brand-tagline {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
  color: #777; text-align: center; line-height: 1.3;
  max-width: 163px;
}
.nav-links {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; font-weight: 700; color: #aaa; flex-shrink: 0;
}
.nav-links a { color: #1565C0; text-decoration: none; font-weight: 700; transition: color 0.15s; }
.nav-links a:hover { color: #FF5722; }
.nav-links a:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; border-radius: 3px; }
.nav-sep { color: #ccc; font-size: 15px; }
.page-title { text-align: center; flex: 1; }
.page-title .unit-label { font-size: 13px; font-weight: 700; color: #aaa; letter-spacing: 1px; text-transform: uppercase; }
.page-title h1 { font-size: 26px; font-weight: 900; color: #0a0f4a; line-height: 1.2; }
.canbay-btn {
  font-size: 13px; font-weight: 800; color: #E53935;
  text-decoration: none; background: #fff;
  border: 2px solid #E53935; border-radius: 8px;
  padding: 6px 14px; transition: all 0.18s;
  white-space: nowrap; flex-shrink: 0;
}
.canbay-btn:hover { background: #FFEBEE; transform: translateY(-1px); }
.canbay-btn:focus-visible { outline: 2px solid #E53935; outline-offset: 2px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fs-toggle-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid #E53935; border-radius: 8px; background: #fff;
  color: #E53935; font-size: 17px; cursor: pointer; transition: all 0.18s;
  flex-shrink: 0; padding: 0;
}
.fs-toggle-btn:hover { background: #FFEBEE; transform: translateY(-1px); }
.fs-toggle-btn:focus-visible { outline: 2px solid #E53935; outline-offset: 2px; }

.subtitle {
  text-align: center;
  padding: 8px 16px 4px;
  font-size: 15px;
  color: #666;
  font-weight: 500;
}

/* ── Bilgi notu (opsiyonel) ── */
.info-note {
  margin: 10px 16px 0;
  background: #fff;
  border: 2px solid #E53935;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13.5px; font-weight: 600; color: #333;
  line-height: 1.6;
}

/* ============================================================
   Kart sistemi — hem ana sayfadaki "sınıf" kartları hem de
   sınıf sayfalarındaki "kategori" kartları için ortak.
   ============================================================ */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 16px;
}
.hub-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.hub-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.hub-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.hub-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.hub-grid.hub-grid-single { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); justify-content: center; }

.hub-card {
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
}
.hub-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 12px 36px rgba(0,0,0,0.18); }
.hub-card:active { transform: translateY(-2px) scale(1.01); }
.hub-card:focus-visible { outline: 3px solid #1565C0; outline-offset: 3px; }

.hub-card .card-top {
  padding: 28px 16px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1;
}
.hub-card .card-icon { font-size: 44px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15)); }
.hub-card .card-title { font-size: 18px; font-weight: 900; text-align: center; line-height: 1.3; }
.hub-card .card-desc { font-size: 13px; font-weight: 600; opacity: 0.85; text-align: center; }
.hub-card .card-bottom {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 800; letter-spacing: 0.3px;
}
.hub-card .card-arrow { font-size: 18px; transition: transform 0.2s; }
.hub-card:hover .card-arrow { transform: translateX(5px); }

/* ── Kart renk temaları (9 pastel tema, tutarlı köşe/gölge/kontrast) ── */
.card-red    .card-top { background: #FFEBEE; color: #4d4d4d; } .card-red    .card-bottom { background: #FFCDD2; color: #4d4d4d; }
.card-green  .card-top { background: #E8F5E9; color: #4d4d4d; } .card-green  .card-bottom { background: #C8E6C9; color: #4d4d4d; }
.card-blue   .card-top { background: #E3F2FD; color: #4d4d4d; } .card-blue   .card-bottom { background: #BBDEFB; color: #4d4d4d; }
.card-orange .card-top { background: #FFF3E0; color: #4d4d4d; } .card-orange .card-bottom { background: #FFE0B2; color: #4d4d4d; }
.card-purple .card-top { background: #F3E5F5; color: #4d4d4d; } .card-purple .card-bottom { background: #E1BEE7; color: #4d4d4d; }
.card-teal   .card-top { background: #E0F2F1; color: #4d4d4d; } .card-teal   .card-bottom { background: #B2DFDB; color: #4d4d4d; }
.card-yellow .card-top { background: #FFFDE7; color: #4d4d4d; } .card-yellow .card-bottom { background: #FFF9C4; color: #4d4d4d; }
.card-peach  .card-top { background: #FFE5B4; color: #4d4d4d; } .card-peach  .card-bottom { background: #FFCC80; color: #4d4d4d; }
.card-cyan   .card-top { background: #E0F7FA; color: #4d4d4d; } .card-cyan   .card-bottom { background: #B2EBF2; color: #4d4d4d; }

/* ============================================================
   Tema / Ünite kutuları (kategori sayfaları)
   ============================================================ */
.unit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 6px 16px 24px;
}

.unit-box {
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.06);
  display: flex; flex-direction: column; gap: 10px;
}
.unit-box h2 {
  font-size: 16.5px; font-weight: 900; color: #B71C1C;
  border-bottom: 2px solid #FFCDD2; padding-bottom: 8px; margin-bottom: 2px;
}
.unit-box.unit-box-general h2 { color: #4A148C; border-bottom-color: #E1BEE7; }

.unit-box-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.content-item { display: flex; flex-direction: column; }
.content-item a {
  color: #0D47A1; font-weight: 700; font-size: 14.5px; line-height: 1.4;
  text-decoration: none;
}
.content-item a:hover { color: #E53935; text-decoration: underline; }
.content-item a:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; border-radius: 3px; }
.author-tag { font-size: 12px; font-style: italic; color: #888; margin-top: 2px; }

.content-subheading {
  margin-top: 6px; padding-top: 12px; border-top: 1px dashed #e0e0e0;
  font-size: 12px; font-weight: 800; color: #999;
  text-transform: uppercase; letter-spacing: .05em;
}

.empty-state { font-size: 13.5px; color: #999; font-style: italic; padding: 4px 0 2px; }

/* ============================================================
   Düz metin içerik sayfaları (Gizlilik, Hakkımızda vb.)
   ============================================================ */
.content-body {
  padding: 10px 24px 26px;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}
.content-body h2 {
  font-size: 19px; font-weight: 900; color: #B71C1C;
  margin: 24px 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid #FFCDD2;
}
.content-body h2:first-child { margin-top: 0; }
.content-body p { margin-bottom: 14px; }
.content-body a { color: #1565C0; font-weight: 700; text-decoration: none; }
.content-body a:hover { text-decoration: underline; color: #E53935; }
.content-body a:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; border-radius: 3px; }
.content-body strong, .content-body b { color: #1a1a1a; }

/* Metin içinde link gibi görünen buton (örn. "buraya tıklayabilirsiniz") */
.link-btn {
  background: none; border: none; padding: 0;
  color: #1565C0; font-weight: 700; font-size: inherit; font-family: inherit;
  text-decoration: underline; cursor: pointer;
}
.link-btn:hover { color: #E53935; }
.link-btn:focus-visible { outline: 2px solid #1565C0; outline-offset: 2px; border-radius: 3px; }

/* ============================================================
   Onay penceresi (modal) — örn. ilerlemeyi sıfırlama onayı
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  z-index: 1000;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 26px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.modal-box p { font-size: 14.5px; line-height: 1.6; color: #333; margin-bottom: 12px; }
.modal-box p:last-of-type { margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-btn {
  min-height: 42px;
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}
.modal-btn-danger { background: #E53935; color: #fff; }
.modal-btn-danger:hover { background: #C62828; }
.modal-btn-cancel { background: #f0f0f0; color: #333; }
.modal-btn-cancel:hover { background: #e0e0e0; }
.modal-btn:focus-visible { outline: 3px solid #1565C0; outline-offset: 2px; }

/* ── Alt bilgi ── */
.copyright {
  text-align: center;
  padding: 14px 14px 10px;
  font-size: 12px;
  color: #9E9E9E;
  font-weight: 600;
  border-top: 1px solid #f0f0f0;
  line-height: 1.8;
}
.copyright a { color: #9E9E9E; }

/* ============================================================
   Duyarlı tasarım — masaüstü: çok sütun / tablet: 2 sütun /
   mobil: 1 sütun (tüm grid'lerde tutarlı 3 kademeli davranış)
   ============================================================ */
@media (max-width: 1000px) {
  .hub-grid, .hub-grid.cols-3, .hub-grid.cols-4, .hub-grid.cols-5, .hub-grid.cols-6,
  .unit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  body { padding: 8px 6px 20px; }
  .color-bar, .color-bar-bottom, .page { width: calc(100% - 12px); }
  .page-header { padding: 10px 12px 8px; gap: 6px; }
  .header-logo { height: 38px; }
  .brand-tagline { font-size: 8px; max-width: 119px; }
  .page-title { order: 2; flex: 1 1 auto; }
  .page-title h1 { font-size: 19px; }
  .page-title .unit-label { font-size: 12px; }
  .nav-links { font-size: 11px; order: 1; flex: 1 1 100%; }
  .canbay-btn { font-size: 11px; padding: 5px 10px; order: 3; }
  .subtitle { font-size: 13px; padding: 6px 12px 2px; }

  .hub-grid, .hub-grid.cols-3, .hub-grid.cols-4, .hub-grid.cols-5, .hub-grid.cols-6,
  .unit-grid {
    grid-template-columns: 1fr;
    gap: 10px; padding: 12px 12px 18px;
  }
  .hub-card .card-icon { font-size: 34px; }
  .hub-card .card-title { font-size: 15px; }
  .hub-card .card-top { padding: 18px 10px 12px; gap: 6px; }
  .hub-card .card-bottom { font-size: 14px; padding: 10px; }
  .unit-box { padding: 14px 16px 16px; }
  .content-body { padding: 8px 16px 20px; font-size: 14px; }
  .content-body h2 { font-size: 17px; margin: 20px 0 8px; }
}
