/* ============================================
   İl / İlçe GDP Analiz – Profesyonel site tasarımı
   ============================================ */

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

:root {
  --bg: #fafbfc;
  --bg-alt: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --header-bg: #0f172a;
  --header-text: #f8fafc;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ---- Site header (sticky) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: var(--shadow-lg);
}

.site-header .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.site-header .brand a {
  color: inherit;
  text-decoration: none;
}

.site-header .brand a:hover {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* ---- Language switch ---- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.25rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.lang-switch a {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 252, 0.9);
  text-decoration: none;
}
.lang-switch a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  text-decoration: none;
}
.lang-switch a.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.lang-switch .sep {
  opacity: 0.55;
  font-size: 0.75rem;
  user-select: none;
}

.site-header nav a {
  color: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.site-header nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.site-header nav a.cta {
  background: var(--accent);
  color: #fff;
}

.site-header nav a.cta:hover {
  background: var(--accent-hover);
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--header-text);
  padding: 3rem 1.5rem;
  text-align: center;
}

.hero .inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero .lead {
  margin: 0;
  font-size: 1.0625rem;
  color: rgba(248, 250, 252, 0.85);
  line-height: 1.6;
}

/* ---- Main content ---- */
.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

section.content-section {
  margin-bottom: 2.5rem;
}

section.content-section:last-of-type {
  margin-bottom: 0;
}

.section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.card:last-child {
  margin-bottom: 0;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card p + p,
.card p + ul,
.card p + .figure-wrap,
.card p + .card-actions {
  margin-top: 0.75rem;
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.card li {
  margin-bottom: 0.35rem;
}

.card-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ---- Buttons / links ---- */
a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: #fff !important;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
  color: #fff !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---- Figures ---- */
.figure-wrap {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.figure-wrap img {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ---- Data tables ---- */
.table-caption {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.table-caption:first-of-type {
  margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.table-wrap.table-card {
  box-shadow: var(--shadow);
  border-color: var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  white-space: nowrap;
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.data-table th.num {
  text-align: right;
}

.data-table td.num {
  text-align: right;
  font-feature-settings: "tnum";
}

.data-table td.num--best {
  color: var(--accent);
  font-weight: 600;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(13, 148, 136, 0.04);
}

.data-table--striped tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.data-table--striped tbody tr:nth-child(even):hover,
.data-table tbody tr.row-selected:hover,
.data-table tbody tr.row-highlight:hover {
  background: rgba(13, 148, 136, 0.08);
}

.data-table tbody tr.row-selected,
.data-table tbody tr.row-highlight {
  background: rgba(13, 148, 136, 0.06);
}

.data-table tbody tr.row-selected td,
.data-table tbody tr.row-highlight td {
  border-bottom-color: rgba(13, 148, 136, 0.2);
}

.badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

.badge--success {
  background: rgba(13, 148, 136, 0.15);
  color: var(--accent-hover);
}

.table-note {
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}

.table-note strong {
  color: var(--text);
}

.table-eval {
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.04) 0%, rgba(15, 23, 42, 0.02) 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 148, 136, 0.12);
}

.table-eval strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.table-eval ul {
  margin: 0;
  padding-left: 1.25rem;
}

.table-eval li {
  margin-bottom: 0.4rem;
}

.table-eval li:last-child {
  margin-bottom: 0;
}

.figure-wrap a {
  display: block;
}

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

.figure-grid .figure-wrap {
  margin-top: 0;
}

/* Gömülü içerik (iframe) akışta */
.embed-wrap {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
}
.embed-wrap .embed-title {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.embed-wrap iframe {
  display: block;
  width: 100%;
  border: none;
  background: #fff;
}
.embed-wrap .embed-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--accent);
}
.flow-figure {
  margin-top: 1.5rem;
}
.flow-figure figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem 2rem;
  margin-top: 2rem;
}

.site-footer .inner {
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.site-footer code {
  background: var(--card-bg);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--border);
}

/* ---- Section alternation (optional) ---- */
section.content-section.alt {
  background: var(--bg-alt);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding: 2rem 1.5rem;
  border-radius: 0;
}

section.content-section.alt .card {
  margin-bottom: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .main-content {
    padding: 1.75rem 1rem 2rem;
  }

  section.content-section.alt {
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1.5rem 1rem;
  }
}
