/* =====================================================================
   استایل اصلی سایت — راست‌چین و ریسپانسیو
   ===================================================================== */

:root {
    --brand-950: #0c1a2a;
    --brand-900: #12263b;
    --brand-800: #183350;
    --brand-700: #1e4468;
    --brand-600: #255580;
    --brand-500: #2f6a9c;
    --brand-400: #7da3c6;
    --brand-100: #e6edf4;
    --brand-50:  #f5f8fb;
    --accent:     #d9930d;
    --accent-600: #b97a08;
    --dark: #1b2430;
    --gray-600: #5b6573;
    --gray-400: #9aa3af;
    --gray-200: #dfe4ea;
    --white: #ffffff;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(18, 38, 59, .06);
    --shadow: 0 1px 4px rgba(18, 38, 59, .10);
    --shadow-lg: 0 6px 20px rgba(18, 38, 59, .12);
    --glow: none;
    --grad: var(--brand-700);
    --header-h: 68px;
    --font: 'Vazirmatn', Tahoma, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--dark); background: #fff; line-height: 1.9; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }
.container { width: 92%; max-width: 1140px; margin: 0 auto; }
h1, h2, h3, h4 { line-height: 1.5; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

section { padding: 60px 0; }
.section-alt { background: var(--brand-50); border-block: 1px solid var(--gray-200); }

.section-title { margin-bottom: 30px; }
.section-title h2 { font-size: clamp(21px, 2.8vw, 27px); color: var(--brand-900); font-weight: 800; }
.section-title p { color: var(--gray-600); margin-top: 6px; max-width: 620px; font-size: 15px; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm); border: 1.5px solid var(--brand-700);
    background: var(--brand-700); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s; line-height: 1.7;
}
.btn:hover { background: var(--brand-900); border-color: var(--brand-900); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--brand-700); }
.btn-outline:hover { background: var(--brand-700); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-600); border-color: var(--accent-600); }
.btn-light { background: #fff; color: var(--brand-800); border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 14px; font-size: 13px; }

/* ---------- هدر ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--gray-200); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; flex-shrink: 0; color: var(--brand-900); }
.logo-x {
    width: 38px; height: 38px; border-radius: 6px; background: var(--brand-800); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; flex-shrink: 0;
}
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { font-size: 14.5px; color: var(--dark); padding: 6px 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--brand-600); }
.main-nav a.active { color: var(--brand-700); font-weight: 700; border-bottom-color: var(--accent); }
.btn-store { border: 1.5px solid var(--brand-700) !important; color: var(--brand-700) !important; padding: 5px 14px !important; border-radius: var(--radius-sm); font-weight: 700 !important; }
.btn-store:hover { background: var(--brand-700); color: #fff !important; }
.nav-user { display: inline-flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--gray-200); width: 42px; height: 42px; border-radius: 6px; font-size: 18px; color: var(--brand-800); cursor: pointer; }

/* ---------- هیرو ---------- */
.hero { background: var(--brand-900); color: #fff; padding: 70px 0 64px; }
.hero .container { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(25px, 3.8vw, 38px); font-weight: 800; margin-bottom: 16px; line-height: 1.6; }
.hero p { font-size: 16px; color: #c5d3e0; margin-bottom: 26px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-outline:hover { background: #fff; color: var(--brand-900); }
.hero-list { border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); }
.hero-list li { display: flex; align-items: center; gap: 12px; padding: 15px 18px; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.14); }
.hero-list li:last-child { border-bottom: none; }
.hero-list i { color: var(--accent); width: 20px; text-align: center; }

/* ---------- آمار ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--gray-200); border-radius: var(--radius); margin-top: 28px; background: #fff; }
.stat-card { padding: 20px 12px; text-align: center; border-inline-end: 1px solid var(--gray-200); }
.stat-card:last-child { border-inline-end: none; }
.stat-card strong { font-size: 26px; font-weight: 800; display: block; line-height: 1.5; color: var(--brand-700); }
.stat-card span { font-size: 13.5px; color: var(--gray-600); }

/* ---------- گرید و کارت ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
a.card { display: block; }
a.card:hover { border-color: var(--brand-500); }
.card-body { padding: 22px; }
.card-icon { width: 44px; height: 44px; border-radius: 6px; background: var(--brand-100); color: var(--brand-700); display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 14px; }
.card h3 { font-size: 16.5px; margin-bottom: 6px; color: var(--brand-900); }
.card p { color: var(--gray-600); font-size: 14px; }
.card-img { width: 100%; height: 190px; object-fit: cover; background: var(--gray-200); }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--brand-600); }

.feature { padding: 24px 20px; }
.step { position: relative; padding: 24px 20px; }
.step-num { position: absolute; top: 14px; inset-inline-end: 16px; font-size: 30px; font-weight: 800; line-height: 1; color: var(--gray-200); }

/* ---------- نوار فراخوان ---------- */
.cta-band { border-radius: var(--radius); padding: 38px 32px; background: var(--brand-800); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(19px, 2.6vw, 24px); margin-bottom: 6px; }
.cta-band p { color: #c5d3e0; max-width: 520px; font-size: 15px; }

/* ---------- فرم‌ها ---------- */
.form-box { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 30px; max-width: 760px; margin: 0 auto; }
.form-group { margin-bottom: 16px; }
.form-group label, label.field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: var(--brand-900); }
.form-control { width: 100%; padding: 10px 13px; border: 1px solid #c9d1da; border-radius: var(--radius-sm); font-size: 15px; background: #fff; color: var(--dark); transition: border-color .15s; }
.form-control::placeholder { color: var(--gray-400); }
.form-control:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(47,106,156,.15); }
input[type=email].form-control, input[type=tel].form-control, input[type=password].form-control,
input[type=url].form-control, input[type=number].form-control { direction: ltr; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { cursor: pointer; }
small { font-size: 12.5px; }

.pw-field { position: relative; }
.pw-field .form-control { padding-right: 44px; } /* ورودی رمز همیشه چپ‌به‌راست است، پس دکمه نمایش رمز همیشه سمت راست می‌ماند */
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; border: none; background: transparent; color: var(--gray-400); cursor: pointer; font-size: 15px; }
.pw-toggle:hover { color: var(--brand-700); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; font-size: 14px; line-height: 1.8; border: 1px solid; }
.alert-success { background: #eaf6ee; color: #1f6b3a; border-color: #b7dfc5; }
.alert-error   { background: #fcecec; color: #a52a20; border-color: #f0b8b3; }
.alert-warning { background: #fdf5e4; color: #855600; border-color: #ecd09a; }

/* ---------- حساب کاربری ---------- */
.auth-section { padding: 50px 0 70px; background: var(--brand-50); }
.auth-card { max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 32px 28px 26px; }
.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 21px; color: var(--brand-900); margin-bottom: 4px; }
.auth-icon { display: none; }
.auth-sub { color: var(--gray-600); font-size: 14px; margin-bottom: 20px; }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--gray-600); }
.auth-switch a { color: var(--brand-600); font-weight: 700; }
.auth-switch a:hover { text-decoration: underline; }
.auth-switch a.is-disabled { color: var(--gray-400); pointer-events: none; text-decoration: none; }
.otp-input { text-align: center !important; letter-spacing: 10px; font-size: 24px; font-weight: 700; direction: ltr; padding: 10px; }

.dash-list { display: flex; flex-direction: column; gap: 12px; }
.dash-item { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dash-bar { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { padding: 3px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; display: inline-block; white-space: nowrap; }
.badge-new { background: #e4edfb; color: #1c4fd6; }
.badge-review { background: #fdf0d9; color: #9a5f00; }
.badge-progress { background: #ecebfa; color: #4b41b8; }
.badge-done { background: #e3f3e8; color: #1f6b3a; }
.badge-cancel { background: #fcecec; color: #a52a20; }

/* ---------- سوالات متداول ---------- */
.faq-list details { margin-bottom: 10px; border-radius: var(--radius); background: #fff; border: 1px solid var(--gray-200); }
.faq-list details[open] { border-color: var(--brand-400); }
.faq-list summary { cursor: pointer; font-weight: 700; padding: 15px 20px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--brand-900); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--brand-600); }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { padding: 0 20px 18px; color: var(--gray-600); }

/* ---------- صفحات داخلی ---------- */
.work-cover { width: 100%; height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 22px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-600); font-weight: 600; }
.chip-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.contact-line { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.contact-line i { width: 38px; height: 38px; border-radius: 6px; background: var(--brand-100); color: var(--brand-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- فوتر ---------- */
.site-footer { background: var(--brand-950); color: #b9c6d3; padding: 48px 0 0; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; padding-bottom: 36px; }
.footer-col h3, .footer-col h4 { color: #fff; margin-bottom: 14px; }
.footer-col h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.footer-col .logo-x { background: var(--brand-700); }
.footer-col a, .footer-col p { display: block; color: #b9c6d3; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-col i { color: var(--accent); margin-inline-end: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px 0; font-size: 13px; color: #8c9bab; }

.to-top { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 40; width: 40px; height: 40px; border-radius: 6px; border: none; background: var(--brand-800); color: #fff; font-size: 15px; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s; }
.to-top.show { opacity: 1; visibility: visible; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1240px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .main-nav {
        position: absolute; top: 100%; inset-inline: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 14px;
        border-bottom: 1px solid var(--gray-200); box-shadow: 0 10px 24px rgba(18,38,59,.10);
        max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
        visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s;
    }
    .main-nav.open { visibility: visible; opacity: 1; }
    .main-nav a { display: block; padding: 12px 22px; border-bottom: 1px solid var(--gray-200); font-size: 15px; }
    .main-nav a.active { background: var(--brand-50); border-bottom-color: var(--gray-200); border-inline-start: 3px solid var(--accent); }
    .btn-store { margin: 12px 20px 2px; text-align: center; padding: 10px 16px !important; }
}
@media (max-width: 960px) {
    section { padding: 48px 0; }
    .hero { padding: 52px 0; }
    .hero .container { grid-template-columns: 1fr; gap: 30px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat-card:nth-child(2) { border-inline-end: none; }
    .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--gray-200); }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    :root { --header-h: 62px; }
    section { padding: 38px 0; }
    .section-title { margin-bottom: 22px; }
    .hero { padding: 40px 0; }
    .hero p { font-size: 15px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .grid-3, .grid-2, .grid-4, .form-row { grid-template-columns: 1fr; }
    .form-row { gap: 0; }
    .form-box { padding: 22px 16px; }
    .form-control { font-size: 16px; }
    .work-cover { height: 220px; }
    .auth-section { padding: 30px 0 50px; }
    .auth-card { padding: 26px 18px 22px; }
    .cta-band { padding: 28px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .dash-bar .btn { width: 100%; }
}
@media (max-width: 480px) {
    .logo-text { display: none; }
    .otp-input { letter-spacing: 6px; font-size: 21px; }
}

.sr-only-mobile { display: none; }
@media (max-width: 1240px) { .sr-only-mobile { display: inline; } }

.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ویجت Cloudflare Turnstile */
.ts-box { margin: 14px 0; min-height: 65px; }

/* ---------- دوزبانه: جهت چپ‌به‌راست (انگلیسی) و کلید زبان ---------- */
html[dir=ltr] [style*="text-align:right"] { text-align: left !important; }
html[dir=ltr] .main-nav a.active { border-bottom-color: var(--accent); }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; border: 1px solid var(--gray-200); border-radius: 6px; padding: 3px 10px !important; color: var(--brand-700) !important; white-space: nowrap; }
.lang-switch:hover { background: var(--brand-50); }
.login-lang { position: absolute; top: 14px; inset-inline-end: 16px; }
.login-box { position: relative; }

/* نوار پیشنهاد نسخه‌ی انگلیسی */
.lang-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; background: var(--brand-900); color: #fff; padding: 8px 44px 8px 16px; font-size: 14px; position: relative; }
.lang-banner a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.lang-banner button { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }

/* فهرست خدمات زیر هر دسته */
.svc-list { list-style: none; margin: 12px 0 0; display: grid; gap: 4px; }
.svc-list a { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--dark); padding: 3px 0; }
.svc-list a:hover { color: var(--brand-600); }
.svc-list i { color: var(--accent); font-size: 12px; }

/* آیکون آپلودشده‌ی دسته‌ها */
.card-icon .icon-img { width: 28px; height: 28px; object-fit: contain; display: block; }
