/* فونت وزیرمتن: فایل‌ها را خودتان در Content/fonts بگذارید (راهنما در README). تا آن موقع Tahoma نمایش داده می‌شود. */
@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Vazirmatn";
    src: url("fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --blue: #0a3f9c;
    --blue-dark: #062a6b;
    --yellow: #ffe14d;
    --ink: #1c2430;
    --muted: #5b6676;
    --line: #dfe5ee;
    --bg: #f5f7fb;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: var(--ink);
    background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover, a:focus { text-decoration: none; }
.page-body a:hover { color: var(--blue-dark); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.ic { width: 1.25em; height: 1.25em; vertical-align: -0.25em; fill: currentColor; }

/* ---------- هدر ---------- */
.site-header { background: var(--blue-dark); color: #fff; }

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.brand img { display: block; background: #fff; border-radius: 12px; padding: 4px; }

.slogan { flex: 1; min-width: 0; }
.slogan-name { font-weight: 700; font-size: 1.25rem; color: var(--yellow); line-height: 1.5; }
.slogan-line { font-size: 0.85rem; opacity: 0.92; line-height: 1.7; }

.header-phone {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--yellow);
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 999px;
    direction: ltr;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font: inherit;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.menu-toggle .ic-close { display: none; }
body.nav-open .menu-toggle .ic-menu { display: none; }
body.nav-open .menu-toggle .ic-close { display: inline; }

.site-nav { background: var(--blue); display: none; }
body.nav-open .site-nav { display: block; }
.site-nav > ul { list-style: none; margin: 0 auto; padding: 0 16px; }
.site-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.site-nav a:hover, .site-nav a:focus { color: var(--yellow); }

/* ---------- محتوا ---------- */
.main { padding-top: 18px; padding-bottom: 36px; }

.page-title { font-size: 1.5rem; line-height: 1.7; margin: 18px 0 10px; color: var(--blue-dark); }
.lead { font-size: 1.05rem; margin: 0 0 18px; }

.draft-note {
    background: #fff8d6;
    border: 1px dashed #d1b100;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #6b5b00;
}

/* ---------- اسلایدشو ---------- */
.slider { position: relative; overflow: hidden; border-radius: 12px; background: #dfe5ee; }
.slides { position: relative; aspect-ratio: 1000 / 250; min-height: 150px; }
.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.slide.is-active { opacity: 1; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(6, 42, 107, 0.65);
    color: #fff;
    cursor: pointer;
}
.slider-prev { right: 8px; }
.slider-next { left: 8px; }

.slider-dots { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; }
.slider-dots button {
    width: 10px;
    height: 10px;
    margin: 0 3px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}
.slider-dots button.is-active { background: var(--yellow); }

/* ---------- کارت خدمات ---------- */
.services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 12px 0 24px;
}
.card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
}
.card img { display: block; width: 100%; height: 190px; object-fit: cover; }
.card-title { display: block; padding: 10px 14px; font-weight: 700; color: var(--blue-dark); }
.card:hover .card-title { color: var(--blue); }

/* ---------- فوتر ---------- */
.site-footer { background: var(--blue-dark); color: #e8eefb; padding-top: 22px; padding-bottom: 72px; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 12px; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--yellow); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.social { display: inline-flex; align-items: center; gap: 8px; }
.social img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.social .ic { width: 22px; height: 22px; }
.copyright { text-align: center; font-size: 0.85rem; opacity: 0.75; margin-top: 14px; }

/* ---------- دکمه‌ی ثابت تماس (موبایل) ---------- */
.call-fab {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--yellow);
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* ---------- دسکتاپ ---------- */
@media (min-width: 800px) {
    .header-phone { display: inline-flex; }
    .menu-toggle { display: none; }
    .site-nav { display: block; }
    .site-nav > ul { display: flex; gap: 4px; }
    .site-nav a { border-bottom: 0; padding: 10px 14px; }
    .services { grid-template-columns: repeat(4, 1fr); }
    .footer-inner { grid-template-columns: 1.2fr 1.6fr 1fr; }
    .call-fab { display: none; }
    .site-footer { padding-bottom: 22px; }
    .slides { min-height: 0; }
}

/* ---------- متن صفحه‌ها (خروجی ویرایشگر) ---------- */
.page-body { font-size: 1.02rem; }
.page-body h2 { font-size: 1.25rem; color: var(--blue-dark); margin: 28px 0 8px; line-height: 1.7; }
.page-body h3 { font-size: 1.1rem; color: var(--blue-dark); margin: 22px 0 6px; }
.page-body h4 { font-size: 1rem; margin: 18px 0 6px; }
.page-body p { margin: 0 0 12px; }
.page-body ul, .page-body ol { margin: 0 0 14px; padding-right: 24px; padding-left: 0; }
.page-body li { margin-bottom: 4px; }
.page-body img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 14px auto; }
.page-body blockquote { margin: 14px 0; padding: 8px 14px; border-right: 4px solid var(--yellow); background: #fff; }
.page-body a { color: var(--blue); }
.page-body .ql-indent-1 { padding-right: 2em; }
.page-body .ql-indent-2 { padding-right: 4em; }
.page-body .ql-indent-3 { padding-right: 6em; }
.page-body .ql-align-center { text-align: center; }
.page-body .ql-align-right { text-align: right; }
.page-body .ql-align-left { text-align: left; }
.page-body .ql-align-justify { text-align: justify; }

.preview-banner {
    background: #e8f0ff;
    border: 1px dashed var(--blue);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    color: var(--blue-dark);
}

/* ---------- نمونه‌کارها ---------- */
.section-title { font-size: 1.25rem; color: var(--blue-dark); margin: 28px 0 10px; }
.plist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.plist li { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.plist a { display: block; }
.plist img { display: block; width: 100%; height: auto; aspect-ratio: 460 / 340; object-fit: cover; }
.timgp { padding: 8px 10px; font-size: 0.92rem; text-align: center; }
.vlist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vlist li { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vlist video { display: block; width: 100%; aspect-ratio: 9 / 16; background: #000; object-fit: contain; }
.lightbox {
    position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.85);
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 6px; background: #fff; }
.lightbox-title { color: #fff; margin-top: 10px; text-align: center; }
@media (min-width: 800px) {
    .plist { grid-template-columns: repeat(4, 1fr); }
    .vlist { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- مقالات ---------- */
.article-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.article-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 1fr; }
.article-cover-link img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.article-body { padding: 12px 16px 14px; }
.article-body h2 { font-size: 1.15rem; margin: 0 0 4px; line-height: 1.7; }
.article-body h2 a { color: var(--blue-dark); text-decoration: none; }
.article-body h2 a:hover { color: var(--blue); }
.article-body p { margin: 6px 0 8px; }
.article-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.article-card .more { font-weight: 700; }
.article-cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 12px; margin: 10px 0 16px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 18px 0; }
.back-link { margin-top: 24px; }
@media (min-width: 800px) {
    .article-card { grid-template-columns: 300px 1fr; }
    .article-card:not(:has(.article-cover-link)) { grid-template-columns: 1fr; }
}

/* ---------- صفحه‌ی ۴۰۴ ---------- */
.nf { text-align: center; padding: 20px 0 36px; }
.nf-art { max-width: 340px; margin: 0 auto 4px; }
.nf-art svg { display: block; width: 100%; height: auto; }
.nf-code { margin: 0; font-size: 4.5rem; font-weight: 800; line-height: 1.1; color: var(--blue); letter-spacing: 6px; direction: ltr; }
.nf-title { margin: 4px 0 8px; font-size: 1.5rem; color: var(--blue-dark); line-height: 1.7; }
.nf-text { max-width: 560px; margin: 0 auto; color: var(--muted); }
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 18px; }
.nf-btn { display: inline-block; padding: 10px 22px; border-radius: 10px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; }
.nf-btn:hover { background: var(--blue-dark); }
.nf-btn-alt { background: var(--yellow); color: var(--blue-dark); }
.nf-btn-alt:hover { background: #ffd400; }
.nf-sub { margin: 18px 0 8px; color: var(--muted); font-size: 0.9rem; }
.nf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nf-links a { display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--blue-dark); text-decoration: none; }
.nf-links a:hover { border-color: var(--blue); color: var(--blue); }
.copyright .designer a { color: var(--yellow); }

/* ---------- کادر محتوا (صفحه‌ها و مقاله‌ها) ---------- */
.content-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 8px; box-shadow: 0 1px 4px rgba(6, 42, 107, 0.07); margin: 0 0 20px; }
.content-card > .page-title { margin-top: 0; padding-bottom: 10px; border-bottom: 2px solid var(--yellow); }
.content-card .page-body > :last-child { margin-bottom: 14px; }
.content-card .article-cover { margin-top: 4px; }
.map-wrap { margin: 6px 0 16px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { display: block; border: 0; width: 100%; }
@media (min-width: 800px) {
    .content-card { padding: 26px 30px 12px; }
}

/* ---------- زیرمنوی خدمات ---------- */
.sub-toggle { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.ic-caret { width: 16px; height: 16px; transition: transform 0.2s; }
.has-sub.open .ic-caret { transform: rotate(180deg); }
.sub-menu { display: none; list-style: none; margin: 0; padding: 0 14px 0 0; }
.has-sub.open > .sub-menu { display: block; }
@media (min-width: 800px) {
    .has-sub { position: relative; }
    .sub-menu { position: absolute; top: 100%; right: 0; min-width: 240px; padding: 6px 0; background: var(--blue); border-radius: 0 0 10px 10px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25); z-index: 60; }
    .has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { display: block; }
    .sub-menu a { padding: 9px 16px; white-space: nowrap; border-bottom: 0; }
}

/* لوگوی آپلودشده از پنل (بدون کادر سفید) */
.brand img.custom-logo { width: auto; height: auto; max-height: 96px; max-width: 220px; background: none; padding: 0; border-radius: 0; }

/* ---------- مقالات: متن دوطرفه (جاستیفای)؛ تیترها و ترازبندی دستی ویرایشگر دست‌نخورده می‌مانند ---------- */
.article-full .page-body { text-align: justify; }
.article-full .page-body h2, .article-full .page-body h3, .article-full .page-body h4 { text-align: right; }
.article-full .page-body .ql-align-center { text-align: center; }
.article-full .page-body .ql-align-right { text-align: right; }
.article-full .page-body .ql-align-left { text-align: left; }
.article-full .page-body .ql-align-justify { text-align: justify; }

/* ---------- منوی اصلی: ظاهر جدید ---------- */
.site-nav { --nav-accent: var(--yellow); --nav-hover: rgba(255, 255, 255, 0.1); border-top: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 3px 12px rgba(6, 42, 107, 0.22); }
.site-nav a { font-weight: 500; transition: color 0.15s, background-color 0.15s; }
.site-nav a.active { color: var(--nav-accent); font-weight: 700; }
.sub-menu { border-right: 2px solid rgba(255, 255, 255, 0.18); margin: 0 6px 6px 0; }
.sub-menu a { font-size: 0.95rem; }
@media (min-width: 800px) {
    .site-nav > ul { gap: 2px; align-items: stretch; }
    .site-nav > ul > li > a { position: relative; padding: 15px 18px; border-radius: 0; }
    .site-nav > ul > li > a::after { content: ""; position: absolute; right: 18px; left: 18px; bottom: 8px; height: 3px; border-radius: 3px; background: var(--nav-accent); transform: scaleX(0); transform-origin: center; transition: transform 0.2s; }
    .site-nav > ul > li > a:hover, .site-nav > ul > li > a:focus, .has-sub:hover > a, .has-sub.open > a { background: var(--nav-hover); }
    .site-nav > ul > li > a:hover::after, .site-nav > ul > li > a:focus::after, .site-nav > ul > li > a.active::after, .has-sub:hover > a::after, .has-sub.open > a::after { transform: scaleX(1); }
    .sub-menu { top: 100%; right: 0; min-width: 260px; margin: 0; padding: 8px; border: 0; border-top: 3px solid var(--nav-accent); border-radius: 0 0 14px 14px; box-shadow: 0 14px 28px rgba(6, 42, 107, 0.3); }
    .sub-menu li + li { margin-top: 2px; }
    .sub-menu a { padding: 10px 14px; border-radius: 9px; font-size: 0.96rem; }
    .sub-menu a:hover, .sub-menu a:focus { background: var(--nav-hover); }
}

/* ---------- سؤالات متداول ---------- */
.faq { margin-top: 28px; padding-top: 6px; border-top: 1px solid var(--line); }
.faq h2 { font-size: 1.25rem; color: var(--blue-dark); margin: 18px 0 12px; line-height: 1.7; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 12px 16px 12px 44px; font-weight: 700; color: var(--blue-dark); position: relative; line-height: 1.8; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 50%; background: #eef3fc; color: var(--blue); font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); background: #f8faff; }
.faq-a { padding: 10px 16px 6px; text-align: justify; }
.faq-a p { margin: 0 0 8px; }
