/* ==========================================================================
   بیمه دانا — نمایندگی مرادی (کد ۹۵۳۱)
   پالت برگرفته از طرح Stitch: سرمه‌ای دانا + قرمز برای اقدام اصلی
   ========================================================================== */

:root {
    --cobalt: #29388f;
    --cobalt-dark: #1e2b7b;
    --navy: #162058;
    --navy-deep: #0d1640;
    --crimson: #e31e24;
    --crimson-dark: #bb0014;
    --cobalt-wash: rgba(41, 56, 143, 0.07);

    --canvas: #f8fafc;
    --surface: #ffffff;
    --tint: #eef4ff;
    --text: #121c28;
    --text-2: #454652;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --success: #059669;
    --success-bg: #ecfdf5;
    --error: #ba1a1a;
    --error-bg: #fef2f2;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --shadow-1: 0 2px 8px -1px rgba(41, 56, 143, 0.04), 0 1px 3px -1px rgba(0, 0, 0, 0.05);
    --shadow-2: 0 12px 28px -4px rgba(41, 56, 143, 0.10);
    --container: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
    background: var(--canvas);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img, svg { display: block; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--r-sm);
    font-weight: 700; font-size: 0.95rem; line-height: 1.4;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-dark); box-shadow: 0 6px 16px -4px rgba(227, 30, 36, .45); }
.btn-cobalt { background: var(--cobalt); color: #fff; }
.btn-cobalt:hover { background: var(--cobalt-dark); }
.btn-outline { border: 1.5px solid var(--cobalt); color: var(--cobalt); background: transparent; }
.btn-outline:hover { background: var(--cobalt-wash); }
.btn-ghost-light { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.08); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 1rem; }

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* ---------- هدر ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { height: 40px; width: auto; }
.brand-name { font-weight: 800; font-size: 1rem; color: var(--navy); line-height: 1.3; }
.brand-sub { font-size: 0.75rem; color: var(--muted); }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--cobalt); padding: 8px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--border); }
.header-phone:hover { border-color: var(--cobalt); }
@media (max-width: 560px) {
    .brand-sub { display: none; }
    .header-phone span { display: none; }
    .header-phone { padding: 9px; }
}

/* ---------- هیرو ---------- */
.hero {
    background: linear-gradient(135deg, #121c54 0%, #1a2c7c 55%, #253999 100%);
    color: #fff;
    padding: 64px 0 72px;
}
.hero-inner { max-width: 720px; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    font-size: 0.8rem; font-weight: 700;
}
.pill-light { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.pill-light .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 900; line-height: 1.45; margin: 18px 0 14px; }
.hero p { font-size: 1.02rem; color: #d6dcf5; max-width: 620px; }
.hero-price { margin-top: 26px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero-price .from { color: #b8c2ee; font-size: 0.9rem; }
.hero-price strong { font-size: 1.8rem; font-weight: 900; }
.hero-price .unit { color: #b8c2ee; font-size: 0.9rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: 0.85rem; color: #d6dcf5; }
.hero-facts li { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.hero-facts .icon { width: 18px; height: 18px; color: #9aa7ff; }

/* ---------- بخش‌ها ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 900; color: var(--navy); line-height: 1.5; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 0.92rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
}

/* پوشش‌ها */
.coverage-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .coverage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .coverage-grid { grid-template-columns: repeat(3, 1fr); } }
.coverage { display: flex; gap: 14px; padding: 20px; align-items: flex-start; }
.coverage-icon {
    width: 44px; height: 44px; border-radius: var(--r-md);
    background: var(--cobalt-wash); color: var(--cobalt);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.coverage-icon .icon { width: 22px; height: 22px; }
.coverage h3 { font-size: 0.98rem; font-weight: 800; color: var(--text); }
.coverage p { font-size: 0.85rem; color: var(--muted); margin-top: 4px; line-height: 1.7; }

/* طرح‌ها */
.plans-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
@media (min-width: 720px) { .plans-grid { grid-template-columns: repeat(2, 1fr); } }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.plan.featured { border: 2px solid var(--crimson); box-shadow: var(--shadow-2); }
.plan-badge {
    align-self: flex-start;
    font-size: 0.75rem; font-weight: 800;
    padding: 4px 12px; border-radius: 999px;
    background: var(--cobalt-wash); color: var(--cobalt);
}
.plan.featured .plan-badge { background: var(--crimson); color: #fff; }
.plan h3 { font-size: 1.3rem; font-weight: 900; color: var(--navy); }
.plan-desc { font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
.plan-price { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; }
.plan-monthly { display: flex; align-items: baseline; gap: 6px; }
.plan-monthly strong { font-size: 1.9rem; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-monthly span { color: var(--muted); font-size: 0.85rem; }
.plan-yearly { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.plan-points { list-style: none; display: grid; gap: 8px; font-size: 0.88rem; color: var(--text-2); }
.plan-points li { display: flex; gap: 8px; align-items: center; }
.plan-points .icon { width: 18px; height: 18px; color: var(--success); }
.plan .btn { margin-top: auto; }
.plans-note { text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 20px; }

/* فرم */
.form-wrap { max-width: 640px; margin: 0 auto; padding: 32px; }
@media (max-width: 560px) { .form-wrap { padding: 22px 18px; } }
.field { margin-bottom: 18px; }
.field-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; }
.field-ok { font-size: 0.78rem; font-weight: 700; color: var(--success); display: none; }
.field-err { font-size: 0.78rem; color: var(--error); margin-top: 6px; display: none; }
.input {
    width: 100%; padding: 12px 14px;
    background: #fff; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
    font-size: 0.95rem; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #94a3b8; }
.input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(41, 56, 143, .18); }
.input.ltr { text-align: left; letter-spacing: 1px; }

.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .plan-options { grid-template-columns: 1fr; } }
.radio-card {
    display: flex; gap: 10px; align-items: center;
    padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
    cursor: pointer; transition: border-color .15s, background-color .15s;
}
.radio-card input { accent-color: var(--cobalt); width: 16px; height: 16px; }
.radio-card.active { border-color: var(--cobalt); background: var(--cobalt-wash); }
.radio-title { font-weight: 800; font-size: 0.9rem; }
.radio-price { font-size: 0.78rem; color: var(--muted); }

.confirm-box {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--tint); border: 1px solid #d6e2fb; border-radius: var(--r-md);
    padding: 12px 14px; margin-bottom: 20px; font-size: 0.84rem; color: var(--text-2);
}
.confirm-box input { accent-color: var(--cobalt); margin-top: 5px; width: 16px; height: 16px; flex-shrink: 0; }
.confirm-box label { cursor: pointer; }

.success-box { display: none; text-align: center; }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.success-mark .icon { width: 28px; height: 28px; stroke-width: 2.4; }
.success-box h3 { font-size: 1.2rem; font-weight: 900; color: var(--navy); }
.success-box p { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }
.code-box { background: var(--tint); border-radius: var(--r-md); padding: 16px; margin: 20px 0; }
.code-box small { display: block; font-size: 0.78rem; color: var(--muted); }
.code-box strong { display: block; font-size: 1.5rem; font-weight: 900; color: var(--cobalt); letter-spacing: 2px; font-family: ui-monospace, Consolas, monospace; margin-top: 4px; }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* پیگیری */
.track { max-width: 640px; margin: 28px auto 0; padding: 22px; }
.track h3 { font-size: 1rem; font-weight: 800; color: var(--navy); }
.track > p { font-size: 0.84rem; color: var(--muted); margin: 2px 0 14px; }
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
@media (max-width: 600px) { .track-form { grid-template-columns: 1fr; } }
.track-result { margin-top: 16px; }
.alert-error { background: var(--error-bg); border: 1px solid #fecaca; color: var(--error); padding: 12px 14px; border-radius: var(--r-md); font-size: 0.86rem; font-weight: 700; }
.track-info { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.88rem; margin-bottom: 16px; }
.track-info b { color: var(--navy); }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; }
.timeline-step { text-align: center; font-size: 0.8rem; color: var(--muted); position: relative; }
.timeline-step::before {
    content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--border);
}
.timeline-step:first-child::before { display: none; }
.step-bubble {
    width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 2px solid var(--border-strong); font-weight: 800; font-size: 0.85rem;
}
.timeline-step.completed .step-bubble { background: var(--success); border-color: var(--success); color: #fff; }
.timeline-step.completed::before { background: var(--success); }
.timeline-step.active .step-bubble { border-color: var(--cobalt); color: var(--cobalt); }
.timeline-step.completed, .timeline-step.active { color: var(--text); font-weight: 700; }
.track-status { text-align: center; margin-top: 16px; font-size: 0.88rem; font-weight: 800; color: var(--navy); }
.track-status span { color: var(--success); }

/* سوالات متداول */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.faq summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 16px 18px; font-weight: 800; font-size: 0.93rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--cobalt); transition: transform .2s; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details[open] { border-color: #c9d4f2; }
.faq-body { padding: 0 18px 16px; color: var(--text-2); font-size: 0.88rem; }

/* فوتر */
.site-footer { background: var(--navy-deep); color: #c7cdea; padding: 44px 0 24px; font-size: 0.88rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr; } }
.footer-brand { color: #fff; font-weight: 900; font-size: 1.05rem; margin-bottom: 8px; }
.footer-contact { list-style: none; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: #9aa7ff; margin-top: 3px; }
.footer-contact a { color: #fff; font-weight: 800; }
.footer-copy-btn { color: #9aa7ff; font-size: 0.78rem; font-weight: 700; margin-top: 2px; }
.footer-copy-btn:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; text-align: center; font-size: 0.78rem; color: #8b93bd; }

/* نوار شناور موبایل */
.mobile-bar { display: none; }
@media (max-width: 767px) {
    .mobile-bar {
        display: flex; gap: 10px;
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: #fff; border-top: 1px solid var(--border);
        box-shadow: 0 -6px 20px -8px rgba(22, 32, 88, .18);
    }
    .mobile-bar .btn { flex: 1; padding: 11px 12px; }
    body { padding-bottom: 72px; }
}

/* اعلان */
.toast-stack { position: fixed; bottom: 24px; left: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 767px) { .toast-stack { bottom: 84px; left: 16px; right: 16px; } }
.toast {
    background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--r-md);
    box-shadow: 0 10px 25px rgba(0,0,0,.22); font-size: 0.86rem; font-weight: 700;
    opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--error); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
