/* ============================================================
   HESAPLIYOO — Ana Stil Dosyası
   Modern, sade, mobil uyumlu. Açık & koyu tema destekli.
   ============================================================ */

:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-light:  #dbeafe;
  --accent:       #10b981;
  --bg:           #f6f8fb;
  --surface:      #ffffff;
  --surface-2:    #f1f5f9;
  --text:         #0f172a;
  --text-soft:    #475569;
  --text-mute:    #94a3b8;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 2px rgba(15,23,42,.06);
  --shadow:       0 4px 16px rgba(15,23,42,.08);
  --shadow-lg:    0 12px 32px rgba(15,23,42,.12);
  --radius:       14px;
  --radius-sm:    9px;
  --maxw:         1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b1120;
    --surface:   #131c2e;
    --surface-2: #1c2740;
    --text:      #e8edf6;
    --text-soft: #b3c0d6;
    --text-mute: #7688a5;
    --border:    #26324b;
    --brand-light: #1e2b4a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow:    0 4px 16px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); margin: 0 0 .5em; font-weight: 700; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- HEADER ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; gap: 16px; padding: 12px 18px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo__icon { font-size: 1.5rem; }
.logo__text { letter-spacing: -.5px; }
.logo__text::after { content: ""; }

.site-search { display: flex; flex: 1; max-width: 460px; margin-left: auto; }
.site-search input {
  flex: 1; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 11px 14px; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: .95rem; outline: none;
}
.site-search input:focus { border-color: var(--brand); }
.site-search button {
  border: none; background: var(--brand); color: #fff; padding: 0 16px; cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1rem;
}
.site-search button:hover { background: var(--brand-dark); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--text); }

/* ---------- KUR TİCKER (header) ---------- */
.rate-ticker { display: flex; gap: 6px; flex-shrink: 0; }
.rate-chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 10px; font-size: .78rem; font-weight: 700; color: var(--text-soft); white-space: nowrap;
}
.rate-chip .rate-chip__flag { font-size: .9rem; }
.rate-chip .rate-chip__val { color: var(--text); }
.rate-chip .rate-chip__up { color: #dc2626; }
.rate-chip .rate-chip__down { color: #16a34a; }
@media (max-width: 900px) { .rate-ticker { display: none; } }

.site-nav { border-top: 1px solid var(--border); background: var(--surface); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 6px 0; justify-content: center; }
.site-nav li { flex: 0 0 auto; }
.site-nav a {
  display: inline-block; padding: 7px 12px; border-radius: 999px; color: var(--text-soft);
  font-size: .87rem; font-weight: 600; white-space: nowrap;
}
.site-nav a:hover { background: var(--brand-light); color: var(--brand-dark); text-decoration: none; }

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 46px 0 30px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: .3em; }
.hero p { color: var(--text-soft); font-size: 1.1rem; max-width: 620px; margin: 0 auto 24px; }
.hero__search { max-width: 560px; margin: 0 auto; }

/* ---------- SECTION ---------- */
.section { margin: 40px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section__head h2 { font-size: 1.4rem; margin: 0; }
.section__head a { font-size: .9rem; font-weight: 600; }

/* ---------- CATEGORY CARDS ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cat-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); text-decoration: none; }
.cat-card__icon { font-size: 1.9rem; display: block; margin-bottom: 8px; }
.cat-card__title { font-weight: 700; color: var(--text); font-size: 1.08rem; margin-bottom: 4px; }
.cat-card__desc { color: var(--text-soft); font-size: .88rem; }
.cat-card__count { color: var(--brand); font-size: .8rem; font-weight: 700; margin-top: 8px; display: inline-block; }

/* ---------- CALCULATOR CARDS (list) ---------- */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.calc-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-weight: 600; color: var(--text); box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s, background .15s;
}
.calc-card:hover { border-color: var(--brand); transform: translateX(3px); text-decoration: none; background: var(--brand-light); }
.calc-card__name { font-size: .96rem; }
.calc-card__arrow { color: var(--brand); font-weight: 700; }
.calc-card--soon { opacity: .6; cursor: not-allowed; }
.calc-card--soon:hover { transform: none; border-color: var(--border); background: var(--surface); }
.calc-card__badge { font-size: .68rem; background: var(--surface-2); color: var(--text-mute); padding: 3px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; }

/* ---------- BREADCRUMB ---------- */
.breadcrumb { margin: 18px 0 6px; font-size: .85rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; color: var(--text-mute); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 6px; color: var(--text-mute); }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb li[aria-current] { color: var(--text); font-weight: 600; }

/* ---------- CALCULATOR PAGE ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 28px; align-items: start; margin: 10px 0 40px; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }

.calc-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.calc-header .lead { color: var(--text-soft); font-size: 1.05rem; margin-top: -.3em; }

.calc-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin: 20px 0;
}
.calc-box h2 { font-size: 1.15rem; }

/* Form elemanları */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; color: var(--text); }
.field .hint { font-weight: 400; color: var(--text-mute); font-size: .82rem; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-size: 1rem; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus { border-color: var(--brand); background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.input-group { display: flex; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .suffix {
  display: inline-flex; align-items: center; padding: 0 14px; background: var(--surface);
  border: 1px solid var(--border); border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft); font-weight: 600; font-size: .9rem;
}

/* Segmentli seçim (KDV oranı gibi) */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented button {
  flex: 1; min-width: 64px; padding: 10px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-soft); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .95rem;
  transition: all .12s;
}
.segmented button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 20px; background: var(--brand); color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: scale(.99); }
.btn--ghost { background: var(--surface-2); color: var(--text); }

/* Sonuç kutusu */
.result {
  margin-top: 20px; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; display: none;
}
.result.show { display: block; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.result__main { font-size: 2rem; font-weight: 800; margin: 4px 0 2px; }
.result__label { font-size: .9rem; opacity: .9; }
.result__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 12px; margin-top: 16px; }
.result__item { background: rgba(255,255,255,.14); border-radius: var(--radius-sm); padding: 12px 14px; }
.result__item b { display: block; font-size: 1.15rem; }
.result__item span { font-size: .8rem; opacity: .9; }

/* Tablo (amortisman vb.) */
.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 480px; }
table.data th, table.data td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); }
table.data th { background: var(--surface-2); color: var(--text-soft); font-weight: 700; position: sticky; top: 0; }
table.data td:first-child, table.data th:first-child { text-align: center; }
table.data tr:last-child td { border-bottom: none; }

/* İçerik / makale (SEO metni) */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin: 22px 0; }
.article h2 { font-size: 1.3rem; margin-top: 1.2em; }
.article h3 { font-size: 1.1rem; margin-top: 1.2em; }
.article p, .article li { color: var(--text-soft); }
.article ul, .article ol { padding-left: 20px; }

/* SSS (FAQ) */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; font-size: 1.3rem; color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-soft); margin-top: 0; }

/* Sidebar */
.sidebar { position: sticky; top: 130px; }
.sidebar__box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.sidebar__box h3 { font-size: 1rem; margin-bottom: 12px; }
.sidebar__list { list-style: none; padding: 0; margin: 0; }
.sidebar__list li { border-bottom: 1px solid var(--border); }
.sidebar__list li:last-child { border-bottom: none; }
.sidebar__list a { display: block; padding: 9px 0; color: var(--text-soft); font-size: .92rem; font-weight: 500; }
.sidebar__list a:hover { color: var(--brand); text-decoration: none; }

/* Reklam */
.ad-container { margin: 22px 0; text-align: center; min-height: 90px; }
.ad-placeholder {
  margin: 22px 0; min-height: 90px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-mute); font-size: .82rem; background: var(--surface-2);
}

/* ---------- FOOTER ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 0 24px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 2fr; gap: 30px; }
.site-footer__brand p { color: var(--text-soft); font-size: .9rem; max-width: 360px; }
.site-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.site-footer__cols ul { list-style: none; padding: 0; margin: 0; }
.site-footer__cols li { margin-bottom: 8px; }
.site-footer__cols a { color: var(--text-soft); font-size: .9rem; }
.site-footer__cols a:hover { color: var(--brand); }
.site-footer__bottom { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; text-align: center; color: var(--text-mute); font-size: .85rem; }
.site-footer__links { list-style: none; display: flex; gap: 18px; justify-content: center; padding: 0; margin: 10px 0; flex-wrap: wrap; }
.site-footer__links a { color: var(--text-soft); }
.site-footer__disclaimer { max-width: 640px; margin: 12px auto 0; font-size: .78rem; opacity: .8; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .site-header__inner { flex-wrap: wrap; }
  .site-search { order: 3; max-width: 100%; width: 100%; margin-left: 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; overflow: visible; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Yardımcı sınıflar */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-mute); }
.tag { display: inline-block; background: var(--brand-light); color: var(--brand-dark); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
