/* ==========================================================================
   BGHaber — tasarım tokenları ve Tailwind dışı küçük bileşen stilleri
   Renkler burada CSS değişkeni olarak tanımlanır; sayfalardaki @theme bloğu
   bu değişkenleri Tailwind sınıflarına bağlar (bg-brand, text-ink …).
   ========================================================================== */

:root {
  --c-red: #D7141A;
  --c-red-ink: #B00F14;
  --c-navy: #0E2240;
  --c-navy-2: #183463;
  --c-paper: #FFFFFF;
  --c-smoke: #EEF1F5;
  --c-card: #FFFFFF;
  --c-ink: #141B26;
  --c-ink-2: #2B3443;
  --c-muted: #5B6575;
  --c-line: #DDE2EA;
  --c-up: #08794C;
  --c-down: #D7141A;
  --c-sky: #E7F0FA;
  --c-chart: #1E5BD8;
  --c-spark: #8A94A6;
  --makale-boyut: 20px;
  color-scheme: light;
}

html.dark {
  --c-navy: #081428;
  --c-navy-2: #12264A;
  --c-paper: #0B1628;
  --c-smoke: #12213A;
  --c-card: #0F1D33;
  --c-ink: #E9EEF6;
  --c-ink-2: #C8D1DE;
  --c-muted: #93A1B6;
  --c-line: #22355A;
  --c-up: #34C38A;
  --c-down: #FF5A5F;
  --c-sky: #132A47;
  --c-chart: #6EA0FF;
  --c-spark: #6F7F98;
  color-scheme: dark;
}

/* Katman sırası Tailwind ile aynı: utility sınıfları bileşen stillerini ezebilir */
@layer theme, base, components, utilities;

@layer base {
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-stretch: 100%;
  background: var(--c-paper);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { background: var(--c-smoke); }
:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; border-radius: 2px; }
}

@layer components {

/* --- Tipografi ----------------------------------------------------------- */
.hed {                       /* manşet ve büyük başlıklar: dar, ağır */
  font-stretch: 78%;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-wrap: balance;
}
.hed-2 {                     /* kart başlıkları: hafif dar, okunaklı */
  font-stretch: 90%;
  font-weight: 700;
  letter-spacing: -0.004em;
  line-height: 1.22;
  text-wrap: pretty;
}
.num { font-variant-numeric: tabular-nums; }

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* --- Menü bağlantısı: kategori rengiyle alt çizgi ---------------------- */
.navlink { position: relative; }
.navlink::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px;
  background: var(--cat, var(--c-red)); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.navlink:hover::after, .navlink[aria-current="page"]::after { transform: scaleX(1); }

/* --- Reklam alanı (yükseklik sabit: CLS olmaz) ------------------------- */
.ad {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--c-smoke) 0 10px, transparent 10px 20px);
  border: 1px dashed var(--c-line); border-radius: 4px;
  color: var(--c-muted); font-size: 12px; line-height: 1.4;
}

/* --- Manşet slider ------------------------------------------------------- */
.manset-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s; }
.manset-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.manset-num { position: relative; background: var(--c-smoke); color: var(--c-ink-2); }
.manset-num + .manset-num { border-left: 2px solid var(--c-paper); }
.manset-num:hover { color: var(--c-ink); }
.manset-num .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #fff; }
.manset-num.is-active, .manset-num.is-active:hover { background: var(--c-red); color: #fff; }
.manset-num.is-active .bar { animation: manset-bar var(--sure, 6s) linear forwards; }
.manset.is-paused .manset-num.is-active .bar { animation-play-state: paused; }
@keyframes manset-bar { to { width: 100%; } }

/* --- Son dakika şeridi -------------------------------------------------- */
[data-sd-item] { animation: sd-in .35s ease; }
@keyframes sd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Haber gövdesi ------------------------------------------------------ */
.haber-govde { font-family: "Source Serif 4", Georgia, serif; font-size: var(--makale-boyut); line-height: 1.7; color: var(--c-ink); }
.haber-govde > * + * { margin-top: 1.1em; }
.haber-govde h2 {
  font-family: "Archivo", sans-serif; font-stretch: 82%; font-weight: 800;
  font-size: 1.45em; line-height: 1.15; letter-spacing: -0.01em; margin-top: 1.6em;
}
.haber-govde a { color: var(--c-red); text-decoration: underline; text-underline-offset: 3px; }
.haber-govde blockquote {
  border-left: 4px solid var(--c-red); padding: .2em 0 .2em 1em;
  font-size: 1.12em; font-style: italic; color: var(--c-ink-2);
}
.haber-govde blockquote cite { display: block; margin-top: .5em; font-family: "Archivo", sans-serif; font-style: normal; font-size: .7em; font-weight: 600; color: var(--c-muted); }
.haber-govde ul { list-style: disc; padding-left: 1.25em; }
.haber-govde li + li { margin-top: .35em; }
.haber-govde li::marker { color: var(--c-red); }
.haber-govde .ilgili a { color: inherit; text-decoration: none; }
.haber-govde figure img { width: 100%; border-radius: 4px; }
.haber-govde figcaption { margin-top: .5em; font-family: "Archivo", sans-serif; font-size: 14px; color: var(--c-muted); }
.haber-govde table { width: 100%; border-collapse: collapse; font-family: "Archivo", sans-serif; font-size: 15px; }
.haber-govde caption { text-align: left; font-weight: 700; font-size: 16px; padding-bottom: .5em; }
.haber-govde th, .haber-govde td { padding: .6em .75em; border-bottom: 1px solid var(--c-line); text-align: left; font-variant-numeric: tabular-nums; }
.haber-govde th { font-weight: 600; color: var(--c-muted); font-size: 13px; }

/* --- Okuma çubuğu ------------------------------------------------------- */
#okuma-cubugu { position: fixed; left: 0; top: 0; height: 3px; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--c-red); z-index: 60; }

/* --- Grafik ipucu ------------------------------------------------------- */
.grafik-ipucu {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--c-ink); color: var(--c-paper); border-radius: 6px; padding: 4px 8px;
  font-size: 12px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums;
}

}

@media (prefers-reduced-motion: reduce) {
  .manset-slide, .navlink::after { transition: none; }
  .manset-num .bar { display: none; }
  [data-sd-item] { animation: none; }
}

@media print {
  header, footer, .ad, [data-yazdirma-gizle] { display: none !important; }
}
