/* ============================================================
   Pazar Payı — Design System
   Tek dosya, framework yok. CSS custom properties ile
   light/dark tema; sistem font stack; mobile-first.
   ============================================================ */

:root {
  --color-bg: #faf7f2;
  --color-bg-elevated: #ffffff;
  --color-bg-subtle: #f3ecf9;
  --color-border: #e8dff2;
  --color-text: #241a33;
  --color-text-muted: #5c4e70;
  --color-text-faint: #9585ab;
  --color-accent: #7c3aed;
  --color-accent-hover: #6d28d9;
  --color-accent-soft: #efe4fd;
  --color-accent-text: #6d28d9;
  --color-gold: #b8860b;
  --color-link: #7c3aed;
  --color-danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(88, 28, 135, 0.08);
  --shadow-md: 0 4px 12px rgba(88, 28, 135, 0.1);
  --shadow-lg: 0 12px 32px rgba(88, 28, 135, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-width: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --color-bg: #170f28;
  --color-bg-elevated: #221934;
  --color-bg-subtle: #2b2042;
  --color-border: #3c2d55;
  --color-text: #f1e9fb;
  --color-text-muted: #baa8d4;
  --color-text-faint: #7c6a97;
  --color-accent: #c9a4f7;
  --color-accent-hover: #dcc2ff;
  --color-accent-soft: #382a56;
  --color-accent-text: #dcc2ff;
  --color-gold: #f0c869;
  --color-link: #dcc2ff;
  --color-danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #170f28;
    --color-bg-elevated: #221934;
    --color-bg-subtle: #2b2042;
    --color-border: #3c2d55;
    --color-text: #f1e9fb;
    --color-text-muted: #baa8d4;
    --color-text-faint: #7c6a97;
    --color-accent: #c9a4f7;
    --color-accent-hover: #dcc2ff;
    --color-accent-soft: #382a56;
    --color-accent-text: #dcc2ff;
    --color-gold: #f0c869;
    --color-link: #dcc2ff;
    --color-danger: #f87171;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s ease, color 0.15s ease;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: var(--font-serif);
}

p {
  margin: 0 0 1em;
}

ul, ol {
  padding-left: 1.25em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
}
.brand:hover {
  text-decoration: none;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #fff;
  font-size: 1.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-categories {
  display: none;
  gap: 4px;
  overflow-x: auto;
}

@media (min-width: 900px) {
  .nav-categories {
    display: flex;
  }
}

.nav-categories a {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-categories a:hover {
  background: var(--color-bg-subtle);
  text-decoration: none;
  color: var(--color-text);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  color: var(--color-text);
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--color-accent-soft);
}
.theme-toggle:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.icon-only-dark { display: none; }
:root[data-theme="dark"] .icon-only-dark { display: inline; }
:root[data-theme="dark"] .icon-only-light { display: none; }
:root:not([data-theme]) .icon-only-dark { display: none; }

/* ---------- Mobile nav toggle ---------- */
.menu-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
}
@media (min-width: 900px) {
  .menu-toggle { display: none; }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 20px 16px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}
.mobile-nav.is-open {
  display: flex;
}
.mobile-nav a {
  padding: 10px 4px;
  color: var(--color-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Hero / search ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin: 0 0 12px;
}
.hero p.lead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

.search-box {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}
.search-box input[type="search"] {
  width: 100%;
  padding: 15px 48px 15px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}
.search-box input[type="search"]:focus {
  outline: none;
  border-color: var(--color-accent);
}
.search-box__icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  text-align: left;
  z-index: 50;
  display: none;
}
.search-results.is-open { display: block; }
.search-results a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover {
  background: var(--color-bg-subtle);
  text-decoration: none;
}
.search-results .result-cat {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-faint);
  margin-top: 2px;
}
.search-results .empty {
  padding: 16px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 8px;
}
@media (min-width: 640px) {
  .trust-strip { grid-template-columns: repeat(4, 1fr); }
}
.trust-strip__item {
  background: var(--color-bg-elevated);
  padding: 18px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trust-strip__item strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-accent-text);
}
.trust-strip__item span {
  font-size: 0.78rem;
  color: var(--color-text-faint);
}

/* ---------- Sections ---------- */
.section {
  padding: 40px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-size: 1.4rem;
  margin: 0;
}
.section-head .see-all {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Category cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .category-grid { grid-template-columns: repeat(5, 1fr); }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px 12px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  text-decoration: none;
}
.category-card__emoji {
  font-size: 1.8rem;
}
.category-card__name {
  font-weight: 700;
}
.category-card__count {
  font-size: 0.78rem;
  color: var(--color-text-faint);
}

/* ---------- Content / question cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.q-card {
  display: block;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%;
}
.q-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  text-decoration: none;
}
.q-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.q-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.q-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  margin: 18px 0;
  overflow-x: auto;
  white-space: nowrap;
}
.breadcrumb a {
  color: var(--color-text-muted);
}
.breadcrumb .sep {
  margin: 0 6px;
}
.breadcrumb .current {
  color: var(--color-text);
}

/* ---------- Question page ---------- */
.q-header h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  margin: 0 0 8px;
}
.q-meta {
  color: var(--color-text-faint);
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.q-meta__sep {
  margin: 0 6px;
}

/* ---------- Table of contents ---------- */
.toc {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 0 0 32px;
}
.toc__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: 10px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc li {
  counter-increment: toc;
}
.toc li::before {
  content: counter(toc) ".";
  color: var(--color-text-faint);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}
.toc a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.92rem;
}

.short-answer {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 0 0 32px;
  font-size: 1.08rem;
  font-weight: 500;
}
.short-answer .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-text);
  margin-bottom: 8px;
}

.q-section {
  margin: 0 0 36px;
}
.q-section h2 {
  font-size: 1.3rem;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.causes-list,
.q-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.causes-list li,
.q-section ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.causes-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

.solutions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.solutions-list li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.solutions-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.solutions-list h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.solutions-list p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

.help-box {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px dashed var(--color-border);
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  border-top: 1px solid var(--color-border);
}
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
}
.faq-item__q .chevron {
  transition: transform 0.15s ease;
  flex-shrink: 0;
  color: var(--color-text-faint);
}
.faq-item.is-open .chevron {
  transform: rotate(180deg);
}
.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.faq-item__a__inner {
  padding: 0 4px 16px;
  color: var(--color-text-muted);
}
.faq-item.is-open .faq-item__a {
  max-height: 800px;
}

/* ---------- Related ---------- */
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
  padding: 40px 0 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  background: var(--color-bg-subtle);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-bottom: 32px;
}
.site-footer__brand {
  display: flex;
  gap: 12px;
  max-width: 320px;
}
.site-footer__brand strong {
  color: var(--color-text);
  font-size: 1.05rem;
}
.site-footer__brand p {
  margin: 4px 0 0;
  font-size: 0.85rem;
}
.site-footer__cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.site-footer__cols h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin: 0 0 12px;
}
.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer a {
  color: var(--color-text-muted);
}
.site-footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px 0 24px;
}
.disclaimer {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
  font-size: 0.8rem;
  color: var(--color-text-faint);
}

/* ---------- Static pages (prose) ---------- */
.static-page {
  max-width: 760px;
  padding-bottom: 60px;
}
.prose h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}
.prose p {
  color: var(--color-text-muted);
  line-height: 1.7;
}
.prose ul {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 1em;
}
.prose a {
  font-weight: 600;
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 80px 0;
}
.error-page h1 {
  font-size: 4rem;
  margin: 0;
  color: var(--color-accent);
}

/* ---------- Utility ---------- */
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
