/* طلوع (Tolo) – style.css
   رنگ‌ها: لاجورد بدخشان، زعفران هرات، کاغذ سند، مهر انار */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn[wght].woff2") format("woff2-variations"),
       url("../fonts/Vazirmatn[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --lapis: #215882;
  --lapis-deep: #0D2E4D;
  --lapis-soft: #E4EDF5;
  --saffron: #CC983E;
  --ink: #1A1F2E;
  --ink-soft: #4A5168;
  --paper: #F5F6FA;
  --white: #FFFFFF;
  --rule: #D9DDE8;
  --stamp: #A3283E;
  --wa: #1E8E4E;
  --font: "Vazirmatn", Tahoma, "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  --wrap: 1120px;
  --r-sm: 6px;
  --r-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 1.0625rem;          /* 17px – خط فارسی کمی بزرگتر خوانا تر است */
  line-height: 1.95;
  color: var(--ink);
  background: var(--paper);
  text-align: right;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--lapis); text-underline-offset: 4px; }
a:hover { color: var(--lapis-deep); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 3px; }
[lang="de"], .ltr { direction: ltr; unicode-bidi: isolate; }

h1, h2, h3 { line-height: 1.45; margin: 0 0 .6em; font-weight: 800; color: var(--lapis-deep); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--ink-soft); }
.de-line { font-size: .9rem; color: var(--ink-soft); direction: ltr; text-align: right; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; right: -999px; top: 0; background: var(--white); padding: .5rem 1rem; z-index: 99; }
.skip:focus { right: 1rem; }

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 80px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--lapis-deep); }
.brand-mark { height: 56px; width: auto; flex: none; }
.brand-name { font-weight: 800; font-size: 1.35rem; line-height: 1.1; }
.brand-sub { display: block; font-weight: 500; font-size: .78rem; color: var(--ink-soft); }
.nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .8rem; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: var(--r-sm); }
.nav a:hover { background: var(--lapis-soft); }
.nav a[aria-current="page"] { color: var(--lapis); box-shadow: inset 0 -3px 0 var(--saffron); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: .5rem .75rem; font: inherit; font-weight: 700; color: var(--lapis-deep); cursor: pointer; }
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; inset-inline: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--rule); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .nav a { padding: .7rem .5rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--lapis); }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.35rem; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 700; line-height: 1.4; }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: #16713d; color: var(--white); }
.btn-line { border-color: var(--lapis); color: var(--lapis); background: transparent; }
.btn-line:hover { background: var(--lapis); color: var(--white); }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- hero ---------- */
.hero { overflow-x: clip; background: var(--white); border-bottom: 1px solid var(--rule); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-lead { font-size: 1.15rem; color: var(--ink-soft); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

/* سند نمونه با مهر – عنصر اصلی طراحی */
.doc {
  position: relative; background: #FDFDFB; border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.6rem 1.5rem 2.2rem; box-shadow: 0 1px 0 var(--rule), 12px 14px 0 -2px var(--lapis-soft);
  transform: rotate(-1.5deg); max-width: 440px; margin-inline: auto;
}
.doc-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--lapis-deep); padding-bottom: .5rem; margin-bottom: 1rem; }
.doc-head strong { color: var(--lapis-deep); font-size: 1.05rem; }
.doc-head span { font-size: .8rem; color: var(--ink-soft); }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; font-size: .82rem; line-height: 1.8; }
.doc-cols dl { margin: 0; }
.doc-cols dt { color: var(--ink-soft); font-size: .72rem; }
.doc-cols dd { margin: 0 0 .45rem; font-weight: 700; }
.doc-cols .de { direction: ltr; text-align: left; border-inline-start: 1px dashed var(--rule); padding-inline-start: 1rem; }
.doc-note { margin-top: 1rem; padding-left: 7rem; font-size: .72rem; color: var(--ink-soft); direction: ltr; text-align: left; line-height: 1.6; }
.stamp { direction: ltr; position: absolute; left: -10px; bottom: -34px; width: 132px; height: 132px; transform: rotate(-14deg); opacity: .9; }
.stamp-in { animation: stamp .5s cubic-bezier(.2,.9,.3,1.3) .5s both; }
@keyframes stamp { from { transform: rotate(-14deg) scale(1.7); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: .9; } }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.page-head { background: var(--lapis-deep); color: var(--white); padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.page-head h1 { color: var(--white); margin-bottom: .4rem; }
.page-head p { color: #D3E0EC; font-size: 1.1rem; margin: 0; }
.crumbs { font-size: .85rem; margin-bottom: .8rem; }
.crumbs a { color: #D3E0EC; }
.crumbs span { color: #9FB0DC; margin-inline: .35rem; }

/* فهرست ادارات: جدول ساده به جای کارت‌های همسان */
.office-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--lapis-deep); }
.office-list li { display: grid; grid-template-columns: 15rem 1fr; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.office-list h3 { margin: 0; font-size: 1.08rem; }
.office-list h3 small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .82rem; direction: ltr; text-align: right; }
.office-list p { margin: 0; }
@media (max-width: 720px) { .office-list li { grid-template-columns: 1fr; gap: .3rem; } }

/* روند کار: واقعاً یک ترتیب است، پس شماره دارد */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(s, persian); position: absolute; top: 0; right: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--lapis); color: var(--white); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.3rem; right: 3.2rem; left: -1rem; border-top: 2px dotted var(--rule); }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* زبان‌ها */
.langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.langs a { display: block; padding: 1.6rem 1.5rem; text-decoration: none; color: var(--ink); border-inline-start: 1px solid var(--rule); }
.langs a:first-child { border-inline-start: 0; }
.langs a:hover { background: var(--lapis-soft); }
.langs .big { display: block; font-size: 2rem; font-weight: 800; color: var(--lapis); line-height: 1.3; }
.langs .de { display: block; direction: ltr; text-align: right; font-size: .85rem; color: var(--ink-soft); margin-bottom: .5rem; }
.langs p { margin: 0; font-size: .95rem; }
@media (max-width: 720px) { .langs { grid-template-columns: 1fr; } .langs a { border-inline-start: 0; border-top: 1px solid var(--rule); } .langs a:first-child { border-top: 0; } }

/* فهرست اسناد */
.doc-table { width: 100%; border-collapse: collapse; background: var(--white); }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); }
.doc-table th, .doc-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: right; }
.doc-table thead th { background: var(--lapis-deep); color: var(--white); font-size: .92rem; }
.doc-table tbody tr:last-child td, .doc-table tbody tr:last-child th { border-bottom: 0; }
.doc-table tbody th { font-weight: 800; color: var(--lapis-deep); white-space: nowrap; }
.doc-table tbody th a { color: var(--lapis); }
.doc-table td[lang="de"] { direction: ltr; text-align: left; white-space: nowrap; color: var(--ink-soft); font-size: .92rem; }

/* متن دو ستونه */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.check { list-style: none; padding: 0; margin: 0 0 1rem; }
.check li { position: relative; padding-inline-start: 1.8rem; margin-bottom: .55rem; }
.check li::before { content: ""; position: absolute; right: 0; top: .72em; width: .8rem; height: .45rem; border-bottom: 3px solid var(--saffron); border-right: 3px solid var(--saffron); transform: rotate(45deg) translateY(-50%); }

.note { background: var(--lapis-soft); border-inline-start: 4px solid var(--lapis); padding: 1rem 1.25rem; border-radius: var(--r-sm); margin: 1.5rem 0; }
.note p:last-child { margin: 0; }

/* بخش‌های زبان در صفحه زبان‌ها */
.lang-block { padding: 2.5rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 90px; }
.lang-block:first-of-type { border-top: 0; padding-top: 0; }
.lang-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; }
.lang-title span { direction: ltr; color: var(--ink-soft); font-size: 1rem; font-weight: 500; }
.months { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
.months th, .months td { border: 1px solid var(--rule); padding: .45rem .7rem; text-align: center; }
.months thead th { background: var(--lapis-soft); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); background: var(--white); }
.faq details:first-child { border-top: 2px solid var(--lapis-deep); }
.faq summary { cursor: pointer; padding: 1.1rem 0 1.1rem 2.5rem; font-weight: 700; list-style: none; position: relative; color: var(--lapis-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; left: .5rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--lapis); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 1.2rem; color: var(--ink-soft); }
.faq-section .faq details { background: transparent; }

/* CTA پایانی */
.cta { background: var(--lapis); color: var(--white); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta h2 { color: var(--white); margin-bottom: .3rem; }
.cta p { color: #D3E0EC; margin: 0; }
.cta .btn-line { border-color: var(--white); color: var(--white); }
.cta .btn-line:hover { background: var(--white); color: var(--lapis); }

/* شهرها */
.cities { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.cities li { direction: ltr; background: var(--white); border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .9rem; font-size: .9rem; }

/* فرم تماس */
.form { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.form .field { margin-bottom: 1.1rem; }
.form input, .form select, .form textarea { width: 100%; font: inherit; padding: .7rem .9rem; border: 1px solid #B9C0D3; border-radius: var(--r-sm); background: var(--white); color: var(--ink); }
.form textarea { min-height: 7rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--saffron); outline-offset: 1px; border-color: var(--lapis); }
.form .hint { font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }
.form .error { color: var(--stamp); font-weight: 700; font-size: .9rem; min-height: 1.4em; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.contact-list strong { display: block; color: var(--lapis-deep); }
.contact-list a { font-weight: 700; direction: ltr; unicode-bidi: isolate; }

/* footer */
.site-footer { background: var(--ink); color: #C9CEDB; padding: 3rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #FFFFFF; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #FFFFFF; font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .legal { border-top: 1px solid #353B4E; margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* دکمه ثابت واتس‌اپ */
.wa-float { position: fixed; left: 1rem; bottom: 1rem; z-index: 60; background: var(--wa); color: var(--white); border-radius: 999px; padding: .75rem 1.1rem; display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 700; box-shadow: 0 6px 18px rgba(13,46,77,.25); }
.wa-float:hover { color: var(--white); background: #16713d; }
.wa-float svg { width: 1.5rem; height: 1.5rem; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: .85rem; } }

.legal-page { direction: ltr; text-align: left; }
.legal-page h1, .legal-page h2 { text-align: left; }
.legal-page p { max-width: 80ch; }

/* ---------- بنر آبی در صفحه خانه ---------- */
.hero { background: var(--lapis-deep); border-bottom: 0; color: var(--white); }
.hero h1 { color: var(--white); }
.hero .hero-lead { color: #D3E0EC; }
.hero .de-line { color: #A9BED3; }
.hero .btn-line { border-color: var(--white); color: var(--white); }
.hero .btn-line:hover { background: var(--white); color: var(--lapis-deep); }
.hero .doc { color: var(--ink); box-shadow: 12px 14px 0 -2px rgba(255,255,255,.12); border-color: transparent; }
