/* YakitVeri — global stylesheet (5 dil + RTL destek + dark/light) */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --card2: #f8fafc;
  --border: #cbd5e1;
  --text: #1e293b;
  --muted: #64748b;
  --gold: #d4af37;
  --gold-deep: #b8941f;
  --green: #059669;
  --red: #dc2626;
  --blue: #2563eb;
  --orange: #ea580c;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --header-grad: linear-gradient(135deg, #1a3580 0%, #2563eb 100%);
  --footer-bg: #0f172a;
  --footer-fg: rgba(255,255,255,.7);
}

[data-theme="dark"] {
  --bg: #0a0e1a;
  --card: #111827;
  --card2: #141e2e;
  --border: #1e2d45;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --gold: #d4af37;
  --gold-deep: #b8941f;
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  --orange: #f97316;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  --header-grad: linear-gradient(135deg, #0d1b4b 0%, #1a3580 100%);
  --footer-bg: #050810;
  --footer-fg: rgba(255,255,255,.65);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  transition: background .2s, color .2s;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: -apple-system, "Tahoma", "Segoe UI", "Helvetica Neue", Arial, sans-serif; }

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-deep); }

img { max-width: 100%; height: auto; }

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

/* ── Header ────────────────────────────── */
.site-header {
  background: var(--header-grad);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;     /* explicit: wrap yok */
}
.brand { flex-shrink: 0; }
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.brand { color: #fff; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand span { color: var(--gold); }
.header-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.theme-toggle:hover { background: rgba(255,255,255,.2); border-color: var(--gold); }

/* Twemoji renderlanmış SVG bayrak/emoji boyut — ! önemli, doğal SVG boyutu çok büyük */
.emoji,
img.emoji {
  height: 1em !important;
  width: 1em !important;
  max-width: 1em !important;
  max-height: 1em !important;
  margin: 0 .05em 0 .1em !important;
  vertical-align: -0.1em !important;
  display: inline-block !important;
}
/* Bazı bağlamlarda (brand, h1, h2) emoji boyut korunsun */
.brand .emoji, h1 .emoji, h2 .emoji {
  height: 1em !important;
  width: 1em !important;
}

/* ── Lang toggle (dropdown) ────────────── */
.lang-toggle { position: relative; }
.lang-current {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.lang-current:hover { background: rgba(255,255,255,.2); border-color: var(--gold); }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-chevron { font-size: .7rem; opacity: .8; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  display: none;
  min-width: 180px;
  z-index: 200;
}
[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu.open { display: block; }
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.lang-item:last-child { border-bottom: none; }
.lang-item:hover { background: var(--card2); color: var(--gold); }
.lang-item.active { background: var(--card2); font-weight: 600; color: var(--gold); }

/* ── Nav ───────────────────────────────── */
.site-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;   /* menü ortalı */
}
.site-nav a {
  color: var(--text);
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--card2); color: var(--gold); }
.site-nav a.active { background: var(--gold); color: #fff; font-weight: 600; }

/* ── Hero ──────────────────────────────── */
.hero {
  text-align: center;
  padding: 48px 20px 36px;
  background: linear-gradient(180deg, var(--card) 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.15;
}
.hero .sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 24px;
  line-height: 1.55;
}
.hero .status-badge {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: .8rem;
  padding: 6px 14px;
  border-radius: 14px;
  font-weight: 600;
  margin-top: 16px;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .1s, box-shadow .15s;
  min-height: 48px;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #fff; }

/* ── Fuel grid ─────────────────────────── */
.fuel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.fuel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
  transition: border-color .15s, transform .1s;
}
.fuel-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.fuel-card .icon { font-size: 2.4rem; margin-bottom: 10px; }
.fuel-card .name { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.fuel-card .price { font-size: 1.5rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.fuel-card .price.placeholder { font-size: .9rem; color: var(--muted); font-weight: 500; }

/* Dağıtıcı bilgi tablosu (dagitici detay sayfası) */
.dist-info-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.dist-info-table th, .dist-info-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dist-info-table tr:last-child th, .dist-info-table tr:last-child td { border-bottom: none; }
.dist-info-table a { color: var(--gold); }

/* Dağıtıcı listesi grid */
.dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dist-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .1s; }
.dist-card:hover { border-color: var(--gold); transform: translateY(-1px); color: var(--text); }
.dist-info { flex: 1; min-width: 0; }
.dist-name { font-weight: 600; font-size: 1rem; }
.dist-meta { margin-top: 4px; font-size: .8rem; color: var(--muted); }
.dist-cat-badge { background: var(--accent-soft, var(--card2)); color: var(--gold); padding: 2px 8px; border-radius: 10px; font-size: .72rem; margin-right: 6px; }

/* Dağıtıcı detay — Türkiye geneli varlık */
.presence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.presence-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px; text-align: center; }
.presence-card .num { font-size: 1.6rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.presence-card .lbl { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* İstasyon tablosu (ilçe detay) */
.station-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.station-table thead {
  background: var(--card2);
  border-bottom: 2px solid var(--border);
}
.station-table th {
  padding: 12px 14px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.station-table td {
  padding: 10px 14px;
  font-size: .92rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.station-table tbody tr:hover { background: var(--card2); }
.station-table tbody tr:last-child td { border-bottom: none; }

/* İlçe chip grid (il detay sayfası) */
.ilce-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.ilce-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 14px;
  font-size: .85rem;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .1s;
  display: inline-block;
}
.ilce-chip:hover { border-color: var(--gold); background: var(--card2); color: var(--gold); transform: translateY(-1px); }

/* Veri kaynak rozeti (il detay sayfası) */
.src-badge { display: inline-block; padding: 5px 12px; border-radius: 14px; font-size: .8rem; font-weight: 600; }
.src-direct { background: var(--green); color: #fff; }
.src-fallback { background: var(--orange); color: #fff; }

/* ── Features ──────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 36px 0;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 22px;
}
.feature-card .icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}
.feature-card .title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card .desc {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

/* ── Section ───────────────────────────── */
.section { margin: 40px 0; }
.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}
[dir="rtl"] .section h2 { padding-left: 0; padding-right: 14px; border-left: none; border-right: 4px solid var(--gold); }
.section .desc {
  color: var(--muted);
  font-size: .96rem;
  margin-bottom: 20px;
}

/* ── City grid ─────────────────────────── */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.city-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s;
  font-size: .92rem;
}
.city-card:hover { border-color: var(--gold); background: var(--card2); }
.city-card .plaka { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Büyük şehir vurgu */
.section-big-cities .city-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.city-card-big {
  background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
  border-color: var(--gold);
  border-width: 1.5px;
  padding: 14px 16px;
  font-weight: 600;
}
.city-card-big:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.city-card-big:hover .plaka { color: rgba(255,255,255,.85); }
.city-card-big .city-name { font-size: 1rem; }

/* ── Footer ────────────────────────────── */
footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  margin-top: 60px;
  padding: 32px 20px;
  text-align: center;
}
.footer-line {
  margin-bottom: 8px;
  font-size: .88rem;
  line-height: 1.55;
}
.footer-line:first-child { font-size: .96rem; color: #fff; }
.footer-line a { color: rgba(255,255,255,.85); margin: 0 4px; }
.footer-line a:hover { color: var(--gold); }
.footer-line em { color: rgba(255,255,255,.55); font-style: italic; font-size: .82rem; }

/* ── Responsive ────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .brand { font-size: 1.05rem; }
  .header-right { gap: 8px; }
  .theme-toggle .toggle-text { display: none; }
  .hero h1 { font-size: 1.6rem; }
  .hero .sub { font-size: .95rem; }
  .nav-inner { gap: 6px; padding: 8px 12px; }
  .site-nav a { font-size: .82rem; padding: 5px 10px; }
}
