/* ═══════════════════════════════════════════
   BarajTR — Shared Design System
   Tema: Açık, temiz, su gibi berrak
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Renkler */
  --bg:          #f0f7ff;        /* çok açık buz mavisi arka plan */
  --bg2:         #e8f3fc;        /* hafif daha koyu, kart hover için */
  --surface:     #ffffff;        /* kart yüzeyleri */
  --surface2:    #f7fbff;        /* alternatif yüzey */
  --border:      #d0e8f5;        /* çizgiler */
  --border-soft: #e4f1fa;        /* çok ince çizgiler */

  --primary:     #0ea5e9;        /* ana su mavisi */
  --primary-dark:#0284c7;        /* hover durumu */
  --teal:        #14b8a6;        /* su yeşili, ikincil accent */
  --teal-light:  rgba(20,184,166,0.12);

  --good:        #0d9488;        /* iyi durum — koyu teal */
  --good-bg:     rgba(13,148,136,0.08);
  --warn:        #d97706;        /* orta durum — amber */
  --warn-bg:     rgba(217,119,6,0.08);
  --danger:      #dc2626;        /* kritik — kırmızı */
  --danger-bg:   rgba(220,38,38,0.08);

  --text:        #0c2340;        /* ana metin — koyu lacivert */
  --text-2:      #3d6080;        /* ikincil metin */
  --text-muted:  #7aaec8;        /* soluk metin */
  --text-light:  #a8cde0;        /* çok soluk */

  /* Gölgeler */
  --shadow-sm:   0 1px 4px rgba(14,165,233,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 20px rgba(14,165,233,0.10), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg:   0 12px 40px rgba(14,165,233,0.14), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-card: 0 2px 12px rgba(14,165,233,0.08), 0 1px 4px rgba(0,0,0,0.04);

  /* Tipografi */
  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Geçişler */
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET & BASE ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  /* Su gibi hafif doku */
  background-image:
    radial-gradient(ellipse 100% 60% at 70% -10%, rgba(14,165,233,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 0% 80%, rgba(20,184,166,0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ── HEADER ── */
.site-header {
  background: rgba(240,247,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px,5vw,64px);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.logo-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}
.nav-live {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--good);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--good-bg);
  padding: 5px 12px;
  border-radius: 100px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--good);
  animation: livepulse 2s ease infinite;
}
@keyframes livepulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.6); }
}
.nav-time { font-size: 0.78rem; color: var(--text-muted); }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-light); }

/* ── HERO ── */
.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(48px,8vw,88px) clamp(20px,5vw,64px) 36px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.72rem; font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem,5vw,3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}
.page-title .accent {
  color: var(--primary);
}
.page-subtitle {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 1rem;
  max-width: 480px;
  font-weight: 400;
}
.update-meta {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── STATS BAR ── */
.stats-bar {
  max-width: 1280px;
  margin: 32px auto 0;
  padding: 0 clamp(20px,5vw,64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-unit { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; margin-left: 2px; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }

/* ── SECTION ── */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px clamp(20px,5vw,64px);
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* ── FILTER TABS ── */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: all .18s;
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}

/* ── CITY CARD (anasayfa) ── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: 16px;
}
.city-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all .22s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.city-card.clickable { cursor: pointer; }
.city-card.clickable:hover {
  border-color: rgba(14,165,233,0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.city-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  opacity: 0;
  transition: opacity .22s;
}
.city-card.clickable:hover::before { opacity: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.card-city-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.status-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-good   { background: var(--good-bg);   color: var(--good);   }
.pill-warn   { background: var(--warn-bg);   color: var(--warn);   }
.pill-bad    { background: var(--danger-bg); color: var(--danger); }

/* Su dolu bar */
.water-bar-wrap {
  position: relative;
  height: 68px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft);
}
.water-bar-fill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  border-radius: 0 0 11px 11px;
  transition: height 1.4s var(--ease);
  overflow: hidden;
}
.water-bar-fill::before {
  content: '';
  position: absolute;
  top: -8px; left: -50%;
  width: 200%; height: 18px;
  background: rgba(255,255,255,0.4);
  border-radius: 40%;
  animation: wv 3s linear infinite;
}
.water-bar-fill::after {
  content: '';
  position: absolute;
  top: -5px; left: -50%;
  width: 200%; height: 12px;
  background: rgba(255,255,255,0.25);
  border-radius: 40%;
  animation: wv 4.5s linear infinite reverse;
}
@keyframes wv { from{transform:translateX(0)} to{transform:translateX(50%)} }
.fill-good { background: linear-gradient(180deg, rgba(20,184,166,0.5), rgba(13,148,136,0.85)); }
.fill-warn { background: linear-gradient(180deg, rgba(251,191,36,0.55), rgba(217,119,6,0.85)); }
.fill-bad  { background: linear-gradient(180deg, rgba(252,165,165,0.6), rgba(220,38,38,0.8)); }
.water-bar-pct {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
  z-index: 2;
  letter-spacing: -0.03em;
}
/* Düşük dolulukta metin rengini koyulaştır */
.water-bar-pct.dark-text { color: var(--text); text-shadow: none; }

.detail-arrow {
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 8px;
  opacity: 0;
  transition: opacity .2s;
  font-weight: 500;
}
.city-card.clickable:hover .detail-arrow { opacity: 1; }

.fake-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 0.65rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 9px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── DAM CARD (şehir sayfası) ── */
.dam-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dam-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  transition: box-shadow .2s, border-color .2s;
}
.dam-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(14,165,233,0.2);
}
.dam-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.dam-progress-wrap {
  height: 8px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.dam-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1.4s var(--ease);
}
.prog-good { background: linear-gradient(90deg, var(--teal), var(--good)); }
.prog-warn { background: linear-gradient(90deg, #fbbf24, var(--warn)); }
.prog-bad  { background: linear-gradient(90deg, #fca5a5, var(--danger)); }
.dam-meta-row {
  display: flex; gap: 20px; margin-top: 9px; flex-wrap: wrap;
}
.dam-meta-item { font-size: 0.75rem; color: var(--text-muted); }
.dam-meta-item strong { color: var(--text-2); font-weight: 500; }
.dam-pct-display {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.pct-good { color: var(--good); }
.pct-warn { color: var(--warn); }
.pct-bad  { color: var(--danger); }

/* ── INFO BOX ── */
.info-box {
  background: rgba(14,165,233,0.05);
  border: 1px solid rgba(14,165,233,0.18);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.65;
}
.info-box strong { color: var(--primary); }
.info-box a { color: var(--primary); }

/* ── CHART ── */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.chart-area { height: 180px; position: relative; overflow: hidden; }
.chart-area svg { width: 100%; height: 100%; }
.chart-x-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── SUMMARY ROW (şehir sayfası üst özet) ── */
.city-summary {
  max-width: 1280px;
  margin: 24px auto 0;
  padding: 0 clamp(20px,5vw,64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px,1fr));
  gap: 12px;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px clamp(20px,5vw,64px);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-inner a { color: var(--primary); text-decoration: none; font-size: 0.78rem; }
.footer-inner a:hover { text-decoration: underline; }

/* ── UTILS ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px,5vw,64px); }
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }

@media (max-width: 640px) {
  .city-grid { grid-template-columns: 1fr; }
  .dam-card { grid-template-columns: 1fr; gap: 10px; }
  .dam-pct-display { text-align: left; font-size: 1.6rem; }
  .filter-row { flex-direction: column; align-items: flex-start; }
}

/* ── REKLAM ALANLARI ── */
.ad-slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--bg2),
    var(--bg2) 4px,
    var(--bg) 4px,
    var(--bg) 16px
  );
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

/* Leaderboard — hero ile içerik arası, sayfa sonu */
.ad-leaderboard {
  height: 90px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px,5vw,64px);
}
.ad-leaderboard-inner {
  height: 90px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--bg2), var(--bg2) 4px, var(--bg) 4px, var(--bg) 16px
  );
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* In-feed — kart grid içine girer */
.ad-infeed {
  background: repeating-linear-gradient(
    45deg,
    var(--bg2), var(--bg2) 4px, var(--bg) 4px, var(--bg) 16px
  );
  border: 1px dashed var(--border);
  border-radius: 20px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Mobilde leaderboard gizle (728px sığmaz) */
@media (max-width: 768px) {
  .ad-leaderboard { display: none; }
}

/* ── İÇERİK SAYFALARI ────────────────────────────────────────────────── */

.article-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.article-wrap h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.2rem 0 0.7rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--border);
}

.article-wrap h2:first-of-type {
  border-top: none;
  margin-top: 1rem;
}

.article-wrap p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 1rem;
}

.article-wrap ul, .article-wrap ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.article-wrap li {
  margin-bottom: 0.4rem;
}

.article-wrap strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}

.article-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.article-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.article-stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.tip-box {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 1.5rem 0;
}

.tip-box p { margin: 0; color: var(--text-primary); }

.faq-list {
  margin: 1rem 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: var(--surface);
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q:hover { background: var(--border); }

.faq-icon {
  font-size: 1.1rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a {
  display: none;
  padding: 0 20px 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.92rem;
}

.faq-item.open .faq-a { display: block; }

.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}

.related-link {
  display: block;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.related-link:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(14,165,233,0.15);
}

.related-link .rel-icon { margin-right: 6px; }

/* ── NAV MENU ─────────────────────────────────────────────────────────── */

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  margin-left: 24px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-link:hover { background: var(--border); color: var(--text-primary); }

.nav-drop-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.nav-dropdown { position: relative; }

.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 8px;
  min-width: 200px;
  z-index: 200;
}

.nav-drop-panel.open { display: block; }

.drop-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.87rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}

.drop-link:hover { background: var(--surface); }

@media (max-width: 640px) {
  .nav-menu { display: none; }
}

/* ── FOOTER GÜNCELLEMESİ ─────────────────────────────────────────────── */

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--accent); }
