/* =======================================================
   KAPIWEB HABER SİTESİ - CORE OPTIMIZED CSS (<25KB)
   Core Web Vitals & Discover 90+ Uyumlu
   ======================================================= */

:root {
  --bg-main: #0a0a0a;
  --bg-surface: #141414;
  --bg-card: #1a1a1a;
  --border-color: #262626;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-orange: #f57600;
  --accent-red: #E53935;
  --header-bg: rgba(10, 10, 10, 0.94);
}

[data-theme="light"] {
  --bg-main: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --text-main: #111827;
  --text-muted: #4b5563;
  --header-bg: rgba(255, 255, 255, 0.94);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Kapsayıcı */
.container {
  width: 100%;
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  max-width: 100vw;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-title {
  display: inline-flex;
  align-items: center;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--accent-orange, #f57600) !important;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.logo-name {
  color: var(--accent-orange, #f57600) !important;
  white-space: nowrap;
}

.logo-ext {
  color: #ffffff !important;
  white-space: nowrap;
}

/* Slider Butonları (1..25) Varsayılan Temel Stili */
.slider-btn {
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 0;
  flex: 1;
  min-width: 20px;
  transition: all 0.2s;
  border-radius: 4px;
}

.slider-btn:hover {
  color: #fff;
}

.logo-area img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Navigasyon */
.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-clock {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.header-live-btn {
  background: #E53935;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s;
}

.header-live-btn:hover {
  opacity: 0.9;
}

.header-theme-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Turuncu İlçe Bandı */
.district-bar {
  background: linear-gradient(90deg, #f57600, #e06800);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  max-width: 100vw;
}

.district-bar::-webkit-scrollbar {
  display: none;
}

.district-inner {
  display: flex;
  gap: 2px;
  min-width: max-content;
}

.district-link {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  transition: background 0.2s;
  white-space: nowrap;
}

.district-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==================== 2. SON DAKİKA BANDI (KAYAN YAZI) ==================== */
.breaking-bar {
  background: linear-gradient(90deg, #E53935, #D32F2F);
  padding: 6px 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100vw;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.breaking-badge {
  background: #ffffff;
  color: #E53935;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.breaking-scroll-container {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  position: relative;
  white-space: nowrap;
}

@keyframes breakingTickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.breaking-track {
  display: flex;
  animation: breakingTickerMove 75s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.breaking-track:hover {
  animation-play-state: paused;
}

.breaking-content {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.breaking-content a {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.breaking-content a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.sd-dot {
  margin: 0 14px;
  opacity: 0.7;
  color: rgba(255, 255, 255, 0.7);
}

/* ==================== 3. PİYASA & HAVA DURUMU TİCKER ==================== */
.market-ticker-bar {
  background: #111111;
  border-bottom: 1px solid #1e1e1e;
  padding: 8px 0;
  font-size: 12px;
  overflow: hidden;
}

.ticker-wrap {
  overflow: hidden;
  width: 100%;
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-inner {
  display: flex;
  animation: tickerMove 30s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker-inner:hover {
  animation-play-state: paused;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.ticker-label {
  color: #888888;
  font-weight: 600;
}

.ticker-val {
  color: #ffffff;
  font-weight: 800;
}

.ticker-up {
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
}

.ticker-down {
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
}

.ticker-sub {
  color: #9ca3af;
  font-size: 11px;
}

/* Grid Düzeni */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Kartlar */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Animasyonlar */
@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.live-pulse {
  animation: pulseDot 1.5s infinite;
}

/* Vitrin ve Manşet En-Boy Oranları (KapıWeb CMS) */
.aspect-slider { aspect-ratio: 16 / 9; }
.aspect-topheadline { aspect-ratio: 419 / 246; }
.aspect-fives { aspect-ratio: 1293 / 355; }
.aspect-featured { aspect-ratio: 419 / 503; }
.aspect-story { aspect-ratio: 9 / 16; }

/* Otantik Gazete 1. Sayfa Önizleme & Modal Stilleri */
.newspaper-preview-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.newspaper-preview-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}
.newspaper-preview-box:hover .paper-hover-overlay {
  opacity: 1 !important;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printablePaper, #printablePaper * {
    visibility: visible;
  }
  #printablePaper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* Vitrin Rozetleri */
.badge-flash { background: #FFB300; color: #000; font-weight: 900; font-size: 11px; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.badge-exclusive { background: #00bcd4; color: #fff; font-weight: 900; font-size: 11px; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.badge-advertorial { background: #4caf50; color: #fff; font-weight: 900; font-size: 10px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.badge-editor { background: #ab47bc; color: #fff; font-weight: 900; font-size: 11px; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }

@media (max-width: 992px) {
  .hero-layout-grid {
    grid-template-columns: 1fr !important;
  }
  .top-nav {
    display: none !important;
  }
}

/* ========================================================
   Haber Detay İçerik Tipografisi & Zengin Medya Stilleri
   ======================================================== */
#news-article-body {
  word-break: break-word;
  overflow-wrap: break-word;
}

#news-article-body p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

#news-article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-main, #ffffff);
  border-left: 4px solid var(--accent-orange, #f57600);
  padding-left: 10px;
}

#news-article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-main, #ffffff);
}

#news-article-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted, #adb5bd);
}

/* Görsel Hizalama ve Boyutlandırma */
#news-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

#news-article-body img.img-w100,
#news-article-body figure.img-w100 {
  width: 100% !important;
  max-width: 100% !important;
  margin: 22px auto !important;
  clear: both;
}

#news-article-body img.img-w75,
#news-article-body figure.img-w75 {
  width: 75% !important;
  max-width: 100% !important;
  margin: 22px auto !important;
  clear: both;
}

#news-article-body img.img-left,
#news-article-body figure.img-left {
  float: left !important;
  max-width: 48% !important;
  margin: 8px 24px 18px 0 !important;
}

#news-article-body img.img-right,
#news-article-body figure.img-right {
  float: right !important;
  max-width: 48% !important;
  margin: 8px 0 18px 24px !important;
}

#news-article-body figure {
  margin: 20px 0;
  display: block;
}

#news-article-body figcaption {
  font-size: 12px;
  color: var(--text-muted, #8e9bb0);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

/* Mobil Cihazlar & Akışkan Düzen (Responsive) */
@media (max-width: 768px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-top {
    padding: 8px 0;
    gap: 8px;
  }

  .logo-title {
    font-size: 20px !important;
    letter-spacing: -0.5px;
    white-space: nowrap !important;
  }

  .logo-name {
    font-size: 20px !important;
    white-space: nowrap !important;
  }

  .logo-ext {
    font-size: 18px !important;
    white-space: nowrap !important;
  }

  .logo-area img {
    max-height: 34px !important;
    max-width: 130px !important;
  }

  /* Mobilde canlı saat widget'ını üst çubuktan gizle: logoyla çakışmayı ve ekran taşmasını engeller */
  .header-clock {
    display: none !important;
  }

  .header-controls {
    gap: 8px !important;
  }

  .header-live-btn {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }

  .header-theme-btn {
    font-size: 15px !important;
    padding: 2px !important;
  }

  /* 25'li Manşet Numaraları: 2 satıra kırılıp darmadağın olmasını önle, yatay dokunmatik kaydırma */
  #sliderNav, .slider-nav-wrap {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 6px !important;
  }
  #sliderNav::-webkit-scrollbar, .slider-nav-wrap::-webkit-scrollbar {
    display: none;
  }
  #sliderNav .slider-btn, .slider-nav-wrap .slider-btn {
    flex: 0 0 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 11px !important;
    border-radius: 4px;
  }

  /* İlçe ve kategori bandı mobilde dokunmatik akıcılık */
  .district-inner {
    padding-left: 12px;
    padding-right: 12px;
  }
  .district-link {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Breaking News */
  .breaking-bar {
    font-size: 12px;
    padding: 4px 0;
  }
  .breaking-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  /* Makale İçi Görseller */
  #news-article-body img.img-left,
  #news-article-body figure.img-left,
  #news-article-body img.img-right,
  #news-article-body figure.img-right,
  #news-article-body img.img-w75,
  #news-article-body figure.img-w75 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px auto !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .logo-title {
    font-size: 19px !important;
  }
}

/* Alıntı / Spot Kutusu */
#news-article-body blockquote,
#news-article-body .news-quote {
  position: relative;
  margin: 24px 0;
  padding: 16px 20px 16px 24px;
  background: rgba(245, 118, 0, 0.06);
  border-left: 4px solid var(--accent-orange, #f57600);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: #fff;
  line-height: 1.7;
}

/* Uyarı ve Bilgi Kutuları */
#news-article-body .news-alert {
  margin: 20px 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}
#news-article-body .news-alert-info {
  background: rgba(33, 150, 243, 0.1);
  border-left: 4px solid #2196f3;
  color: #90caf9;
}
#news-article-body .news-alert-warning {
  background: rgba(255, 152, 0, 0.1);
  border-left: 4px solid #ff9800;
  color: #ffb74d;
}

/* Tablolar */
#news-article-body table,
#news-article-body .news-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
#news-article-body table th,
#news-article-body table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color, #232733);
  text-align: left;
}
#news-article-body table th {
  background: rgba(245, 118, 0, 0.12);
  color: #f57600;
  font-weight: 700;
}
#news-article-body table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Responsive Video Container (16:9) */
#news-article-body .video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 24px 0;
  border-radius: 8px;
}
#news-article-body .video-container iframe,
#news-article-body .video-container object,
#news-article-body .video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
