/*
Theme Name: Veng
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
*/

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

: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; }

html { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
}

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-top: 24px;
  padding-bottom: 24px;
}
@media (min-width: 1024px) {
  .layout { grid-template-columns: 1fr 320px; }
  /* Sidebar, sticky header'ın altında kalacak şekilde sayfa kaydırıldıkça birlikte kayar,
     ana içerik sütununun sonuna gelince normal akışa döner. */
  .layout > aside {
    position: sticky;
    top: 132px;
    align-self: start;
  }
}

#veng-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--theme);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
#veng-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 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; text-transform: lowercase; }
.categorynav a::first-letter { text-transform: uppercase; }

/* 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%;
  max-width: 100%;
  min-width: 0;
}
.mobile-info-ticker .ticker-viewport { height: 100%; overflow: hidden; position: relative; flex: 1 1 auto; min-width: 0; max-width: 100%; }
.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(3, 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; }

/* "Bugün Ne Oldu" — dikkat çekici sidebar kartı */
.digest-card {
  background: linear-gradient(165deg, color-mix(in srgb, var(--theme) 10%, var(--card)), var(--card) 55%);
  border: 1px solid color-mix(in srgb, var(--theme) 35%, var(--border));
  position: relative;
  overflow: hidden;
}
.digest-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--theme), color-mix(in srgb, var(--theme) 40%, transparent));
}
.digest-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.digest-heading { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--fg); flex: 1; }
.digest-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--theme);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme) 60%, transparent);
  animation: digest-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes digest-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.digest-refresh-btn {
  background: color-mix(in srgb, var(--theme) 12%, transparent);
  color: var(--theme);
  border: 1px solid color-mix(in srgb, var(--theme) 30%, transparent);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.digest-refresh-btn:hover { background: color-mix(in srgb, var(--theme) 20%, transparent); }
.digest-refresh-btn:disabled { opacity: .6; cursor: default; }
.digest-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.digest-item { display: flex; gap: 10px; align-items: flex-start; }
.digest-badge {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.digest-title { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--fg); }
.digest-title:hover { color: var(--theme); text-decoration: underline; }
.digest-blurb { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 3px; }
.digest-time { font-size: 11px; color: var(--muted); margin-top: 12px; text-align: right; }

/* Takvim / önemli günler */
.important-day-date { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.important-day-box { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.important-day-box strong { display: block; font-size: 14px; margin-bottom: 2px; }
.important-day-box p { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.important-day-upcoming .muted-label { display: block; font-size: 10px; font-weight: 800; color: var(--theme); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.important-day-upcoming .days-left { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Veng Radyo */
.radio-player { display: flex; align-items: center; gap: 10px; }
.radio-play-btn { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--theme); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.radio-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-left: auto; animation: veng-pulse 1.5s ease-in-out infinite; }
@keyframes veng-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Sosyal medya widget'ı */
.social-icons-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-icon-btn { width: 36px; height: 36px; border-radius: 8px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--fg); }
.social-icon-btn:hover { background: var(--theme); color: #fff; }

/* Haber altı paylaş bloğu */
.share-buttons-bottom { margin: 28px 0; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }

/* 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-more { margin-top: 4px; }
.footer-more summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--theme); list-style: none; }
.footer-more summary::-webkit-details-marker { display: none; }
.footer-more ul { margin-top: 8px; }
.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; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination .current { min-width: 36px; height: 36px; padding: 0 8px; 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); }
.pagination-nav { border-color: var(--border); }
.pagination-gap { padding: 0 4px; color: var(--muted); font-weight: 700; }

.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;
  }
}
