/* =========================================================
   turkiyedetehsil.com — daxili (bələdçi) səhifə üslubu
   Bu fayl yalnız `doc` şablonunda yüklənir.
   ⚠ style.css-dən SONRA gəlir: eyni çəkili qaydalar buradan qazanır.
   ========================================================= */

/* ---------- səhifə başlığı ---------- */
.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(168deg, #1A1A2E 0%, #262641 100%);
  color: #fff;
  padding: 42px 0 52px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 340px at 92% 0%, rgba(200, 16, 46, .32), transparent 64%);
}
.page-hero > .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .lead {
  margin-top: 17px; font-size: 1.05rem; line-height: 1.62;
  color: rgba(255, 255, 255, .76); max-width: 62ch;
}

/* çörək qırıntıları */
.crumbs { margin-bottom: 22px; font-size: .84rem; }
.crumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  list-style: none; margin: 0; padding: 0;
}
.crumbs li { display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .55); }
.crumbs li + li::before { content: "/"; color: rgba(255, 255, 255, .3); }
.crumbs a { color: rgba(255, 255, 255, .75); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current="page"] { color: rgba(255, 255, 255, .55); }

/* faktlar zolağı */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  list-style: none; margin: 34px 0 0; padding: 0;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .13); border-radius: var(--r-md); overflow: hidden;
}
.facts li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 20px; background: rgba(26, 26, 46, .55);
}
.facts b { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.facts span { font-size: .79rem; color: rgba(255, 255, 255, .58); line-height: 1.35; }

/* son yenilənmə */
.page-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 20px; font-size: .82rem; color: rgba(255, 255, 255, .5);
}
.page-meta svg { width: 14px; height: 14px; flex: none; }

/* ---------- gövdə: mündəricat + mətn ---------- */
.doc { padding: 54px 0 78px; }
.doc-inner { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 52px; align-items: start; }

.toc { position: sticky; top: calc(var(--head-h) + 20px); }
.toc h2 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .11em;
  color: var(--muted); font-weight: 600; margin-bottom: 13px;
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; counter-reset: toc; }
.toc a {
  display: block; padding: 8px 12px; border-radius: var(--r-xs);
  font-size: .89rem; line-height: 1.4; color: var(--ink-600); text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.toc a:hover { background: var(--sand-2); color: var(--ink); }
.toc a.active { color: var(--red); background: var(--red-50); border-left-color: var(--red); font-weight: 600; }

/* ---------- mətn (prose) ---------- */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 20px; }

.prose h2 {
  font-size: clamp(1.42rem, 2.5vw, 1.85rem);
  margin-top: 48px; padding-top: 4px;
  scroll-margin-top: calc(var(--head-h) + 20px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.15rem; margin-top: 32px;
  scroll-margin-top: calc(var(--head-h) + 20px);
}
.prose p { color: var(--ink-600); }
.prose strong { color: var(--ink); font-weight: 600; }
/* ⛔ `:not(.btn)` MÜTLƏQDİR. Bu qayda `.btn-primary`-dən daha çəkilidir
   (0,1,1 > 0,1,0) və page.css sonra yükləndiyi üçün onsuz da qazanır:
   nəticədə `.prose` içindəki düymə QIRMIZI fonda QIRMIZI mətnlə,
   üstəlik alt-xətli çıxırdı — yəni tamamilə oxunmaz. */
.prose a:not(.btn) {
  color: var(--red); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.prose a:not(.btn):hover { text-decoration-thickness: 2px; }

.prose ul, .prose ol { margin: 0; padding-left: 22px; color: var(--ink-600); display: grid; gap: 9px; }
.prose li::marker { color: var(--red); font-weight: 600; }
.prose li > ul, .prose li > ol { margin-top: 9px; }

.prose figure { margin: 0; }
.prose img { border-radius: var(--r-md); border: 1px solid var(--line); }
.prose figcaption { margin-top: 9px; font-size: .84rem; color: var(--muted); }

/* xəbərdarlıq / məsləhət blokları */
.callout {
  padding: 18px 20px; border-radius: var(--r-sm);
  background: var(--sand-2); border: 1px solid var(--line);
  border-left: 3px solid var(--red);
}
.callout p { color: var(--ink-600); font-size: .95rem; }
.callout p + p { margin-top: 9px; }
.callout b { color: var(--ink); }
.callout.warn { background: #FFF8E8; border-color: rgba(184, 134, 11, .3); border-left-color: var(--gold); }
.callout.ok { background: #F1FBF5; border-color: rgba(22, 145, 78, .22); border-left-color: #16914E; }

/* yoxlama siyahısı */
.check { list-style: none; padding-left: 0; display: grid; gap: 11px; }
.check li { position: relative; padding-left: 30px; color: var(--ink-600); }
.check li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--red-50);
}
.check li::after {
  content: ""; position: absolute; left: 5px; top: 11px;
  width: 7px; height: 4px;
  border-left: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* nömrəli mini addımlar */
.mini-steps { list-style: none; padding-left: 0; counter-reset: ms; display: grid; gap: 14px; }
.mini-steps li {
  position: relative; padding: 18px 20px 18px 62px;
  border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line);
}
.mini-steps li::before {
  counter-increment: ms; content: counter(ms, decimal-leading-zero);
  position: absolute; left: 18px; top: 17px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
}
.mini-steps h3 { margin: 0 0 5px; font-size: 1.02rem; }
.mini-steps p { font-size: .92rem; }

/* daxili səhifədə cədvəl mətnin eninə sığır */
.prose .tbl-wrap { margin-top: 20px; }

/* ---------- yan CTA kartı ---------- */
.doc-cta {
  margin-top: 46px; padding: 28px;
  border-radius: var(--r-md); background: var(--sand);
  border: 1px solid var(--line);
}
.doc-cta h2 { margin-top: 0; font-size: 1.3rem; }
.doc-cta p { margin-top: 9px; color: var(--ink-600); font-size: .95rem; }
.doc-cta .btn { margin-top: 17px; }

/* ---------- əlaqəli səhifələr ---------- */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related a {
  display: flex; flex-direction: column; gap: 7px;
  padding: 20px; border-radius: var(--r-md); text-decoration: none;
  background: #fff; border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.related a:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related b { font-family: var(--font-head); font-size: 1rem; font-weight: 600; }
.related span { font-size: .87rem; color: var(--muted); }

/* ---------- uyğunlaşma ---------- */
@media (max-width: 1080px) {
  .doc-inner { grid-template-columns: 1fr; gap: 32px; }
  /* Mündəricat yuxarıya keçir və açılan bloka çevrilir */
  .toc {
    position: static; padding: 18px 20px;
    border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sand-2);
  }
  .toc ol { grid-template-columns: 1fr 1fr; display: grid; gap: 2px; }
  .toc a { border-left: 0; }
  .toc a.active { border-left: 0; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: 1fr 1fr; }
  .prose { max-width: none; }
}

@media (max-width: 620px) {
  .page-hero { padding: 30px 0 40px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li { padding: 15px 16px; }
  .facts b { font-size: 1.18rem; }
  .toc ol { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .doc { padding: 38px 0 56px; }
  .mini-steps li { padding: 16px 16px 16px 56px; }
}
