/*
Theme Name: Veng Haber
Theme URI: https://venghaber.com
Author: Veng Haber
Description: Google News, BİK ve SEO uyumlu haber sitesi teması. Onemsoft Haber Yazılımı analizinden esinlenerek geliştirilmiştir.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: veng-haber
*/

:root {
  --bg: #f7f8fa;
  --fg: #14181f;
  --card: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --theme: #5b21b6;
}

html.dark {
  --bg: #0b0f16;
  --fg: #e5e7eb;
  --card: #131a24;
  --border: #232b38;
  --muted: #9199a8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 24px 0;
}
@media (min-width: 1024px) {
  .layout { grid-template-columns: 1fr 320px; }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.topbar-social { display: flex; align-items: center; gap: 12px; }
.topbar-social a { display: flex; }
.brandbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.logo span { color: var(--theme); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { border: none; background: transparent; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--fg); display: flex; }
.icon-btn:hover { background: var(--bg); }

.categorynav { display: flex; align-items: center; gap: 2px; overflow-x: auto; padding: 0 16px; max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--border); list-style: none; min-height: 38px; }
.categorynav li { list-style: none; display: inline-block; }
.categorynav a { padding: 8px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; display: inline-block; }

/* Son Dakika kayan yazı — yükseklik kilitli, hiçbir içerik onu büyütemez */
.breaking-ticker { display: flex; flex-wrap: nowrap; align-items: stretch; background: var(--theme); border-top: 1px solid var(--border); overflow: hidden; height: 34px; max-height: 34px; min-height: 34px; width: 100%; }
.breaking-label { flex: 0 0 auto; display: flex; align-items: center; padding: 0 14px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: rgba(0,0,0,.18); text-transform: uppercase; white-space: nowrap; height: 100%; }
.ticker-viewport { flex: 1 1 auto; overflow: hidden; position: relative; height: 100%; min-width: 0; }
.ticker-track { display: flex; flex-wrap: nowrap; width: max-content; height: 100%; align-items: center; animation: veng-ticker-scroll 45s linear infinite; }
.ticker-group { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 0 16px; white-space: nowrap; height: 100%; }
.ticker-group a, .ticker-group .ticker-rate { color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ticker-group .ticker-rate { font-weight: 800; opacity: .95; }
.ticker-sep { opacity: .5; font-size: 8px; margin: 0 4px; color: #fff; white-space: nowrap; }
.breaking-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes veng-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 767px) {
  .breaking-ticker { height: 30px; max-height: 30px; min-height: 30px; }
  .breaking-label { padding: 0 10px; font-size: 10px; }
  .ticker-group { padding: 0 12px; }
}

/* Mobil hava durumu + piyasa şeridi — yalnızca mobilde görünür, masaüstünde tamamen kapalı */
.mobile-info-ticker {
  display: none;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 32px;
  max-height: 32px;
  min-height: 32px;
  width: 100%;
}
.mobile-info-ticker .ticker-viewport { height: 100%; overflow: hidden; position: relative; }
.mobile-info-ticker .ticker-track { display: flex; flex-wrap: nowrap; width: max-content; height: 100%; align-items: center; animation: veng-ticker-scroll 30s linear infinite; }
.mobile-info-ticker .ticker-group { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 0 16px; white-space: nowrap; height: 100%; }
.mobile-info-ticker .ticker-rate { color: var(--fg); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mobile-info-ticker .ticker-sep { opacity: .4; font-size: 8px; margin: 0 4px; color: var(--muted); white-space: nowrap; }

@media (max-width: 767px) {
  .mobile-info-ticker { display: flex; }
  .sidebar-hide-mobile { display: none; }
}

/* Bölge hava durumu */
.region-weather-list { display: flex; flex-direction: column; gap: 6px; }
.region-weather-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.categorynav a:hover { color: var(--theme); }

.searchbox { padding: 0 16px 12px; max-width: 1200px; margin: 0 auto; }
.searchbox input { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); padding: 8px 12px; color: var(--fg); }

/* Cards */
.hero { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .hero { grid-template-columns: 1.4fr 1fr; } }
.hero-main { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/10; display: block; background: var(--card); }
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.1) 60%, transparent); display: flex; align-items: flex-end; padding: 20px; }
.hero-overlay h2 { color: #fff; font-size: 24px; font-weight: 800; margin: 8px 0 0; line-height: 1.2; }
.badge { display: inline-block; background: var(--theme); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }

.hcard { display: flex; gap: 12px; }
.hcard-thumb { width: 112px; height: 80px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--card); }
.hcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hcard h3 { margin: 2px 0; font-size: 15px; font-weight: 700; line-height: 1.3; }
.hcard .cat { font-size: 11px; font-weight: 700; color: var(--theme); }
.hcard .meta { font-size: 12px; color: var(--muted); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 16px; }
.section-title h2 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0; }
.section-title .bar { width: 6px; height: 20px; border-radius: 4px; background: var(--theme); }
.section-title a { font-size: 13px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.gcard-thumb { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--card); margin-bottom: 8px; }
.gcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard h3 { font-size: 15px; font-weight: 700; margin: 4px 0 2px; line-height: 1.3; }

.card { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 16px; }
.widget-title { font-size: 12px; font-weight: 800; color: var(--muted); margin: 0 0 10px; letter-spacing: .03em; }

.compact-list a { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.compact-list a:last-child { border-bottom: none; }
.compact-list .idx { font-size: 22px; font-weight: 800; color: var(--muted); opacity: .5; width: 24px; }

/* Article */
.article-header .badge { margin-bottom: 12px; }
.article-title { font-size: 30px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; }
.article-summary { font-size: 18px; color: var(--muted); margin: 0 0 16px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.author-box { display: flex; align-items: center; gap: 10px; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.article-cover { border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.article-content { font-size: 17px; line-height: 1.8; }
.article-content p { margin: 0 0 1em; }
.veng-auto-link { color: var(--theme); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.share-buttons { display: flex; align-items: center; gap: 8px; }
.share-buttons a, .share-buttons button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; background: transparent; cursor: pointer; color: var(--fg); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag-list a { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); }

.comments { margin-top: 32px; }
.comment-item { border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); padding: 8px 12px; color: var(--fg); margin-bottom: 10px; font-family: inherit; }
.btn { display: inline-block; border: none; border-radius: 8px; padding: 10px 20px; font-weight: 700; font-size: 14px; color: #fff; background: var(--theme); cursor: pointer; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--card); }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 40px 16px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: 13px; font-weight: 800; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--border); padding: 14px 16px; max-width: 1200px; margin: 0 auto; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Poll */
.poll-option { position: relative; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: transparent; cursor: pointer; overflow: hidden; margin-bottom: 8px; font-family: inherit; font-size: 14px; }
.poll-option-fill { position: absolute; inset: 0 auto 0 0; background: var(--theme); opacity: .15; }
.poll-option-row { position: relative; display: flex; justify-content: space-between; padding: 8px 12px; }

/* Weather / market */
.weather-row { display: flex; align-items: center; justify-content: space-between; }
.market-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); font-size: 14px; font-weight: 700; }
.pagination .current { background: var(--theme); color: #fff; border-color: var(--theme); }

.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; }

/* Sonraki haber otomatik yükleme (infinite scroll) */
#veng-infinite-feed { margin-top: 8px; }
.veng-next-divider { display: flex; align-items: center; gap: 12px; margin: 40px 0 24px; }
.veng-next-divider span { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.veng-next-divider::before, .veng-next-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.veng-loaded-article .article-title { cursor: pointer; }
.veng-loaded-article .article-title:hover { color: var(--theme); }
.veng-infinite-spinner { display: flex; justify-content: center; padding: 24px 0; }
.veng-infinite-spinner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--theme); margin: 0 4px; animation: veng-bounce 1s infinite ease-in-out; display: inline-block; }
.veng-infinite-spinner .dot:nth-child(2) { animation-delay: .15s; }
.veng-infinite-spinner .dot:nth-child(3) { animation-delay: .3s; }
@keyframes veng-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

/* Reklam alanı (yapısal yer tutucu) */
.veng-ad-slot { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--card); text-transform: uppercase; }

@media (max-width: 767px) {
  .topbar { display: none; }
  .categorynav { padding: 0 12px; }
  .categorynav a { padding: 8px 8px; font-size: 12px; }

  /* Mobilde haber görsellerinde köşe yuvarlatma istenmiyor */
  .hero-main,
  .hcard-thumb,
  .gcard-thumb,
  .article-cover,
  .region-weather-list img {
    border-radius: 0;
  }
}
