/* ============================================================
   Frontend — Light Theme
   سفید / طوسی / آبی / قرمز | Peyda | RTL
   ============================================================ */

:root {
  /* رنگ‌های اصلی */
  --white:        #ffffff;
  --gray-50:      #f8f9fc;
  --gray-100:     #f0f2f8;
  --gray-200:     #e2e6f0;
  --gray-300:     #c8cedf;
  --gray-400:     #8b93b0;
  --gray-500:     #5a6282;
  --gray-700:     #2d3152;
  --gray-900:     #1a1f36;

  --blue:         #2563eb;
  --blue-dark:    #1d4ed8;
  --blue-light:   #eff6ff;
  --blue-border:  #bfdbfe;

  --red:          #dc2626;
  --red-light:    #fef2f2;

  --green:        #16a34a;
  --green-light:  #f0fdf4;

  /* متغیرهای کاربردی */
  --text:         var(--gray-900);
  --text-light:   var(--gray-500);
  --text-muted:   var(--gray-400);
  --bg:           var(--white);
  --bg-light:     var(--gray-50);
  --bg-section:   var(--gray-100);
  --border:       var(--gray-200);
  --accent:       var(--blue);
  --accent-dark:  var(--blue-dark);

  --radius:       8px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.10);
  --container:    1160px;
  --font:         'Peyda', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  direction: rtl;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ============================================================
   Container
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner, .hdr-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

/* ── Logo ── */
.site-logo{text-decoration:none;flex-shrink:0;display:flex;align-items:center;gap:8px}
.site-logo img{height:44px;width:auto;display:block}
.logo-text{font-size:19px;font-weight:800;color:var(--accent);letter-spacing:-.02em;white-space:nowrap}

/* ── Desktop nav ── */
.hdr-inner{display:flex;align-items:center;gap:12px;height:64px;position:relative}
.hdr-nav{flex:1}
.nav-list{list-style:none;display:flex;align-items:center;gap:0;flex-wrap:nowrap}

.ni-link{
  display:inline-flex;align-items:center;gap:3px;
  padding:7px 11px;
  font-size:13.5px;font-weight:600;
  color:var(--text-light);text-decoration:none;
  border-radius:var(--radius);white-space:nowrap;
  transition:background .13s,color .13s;
  cursor:pointer;border:none;background:none;font-family:inherit;
}
.ni-link:hover{background:var(--bg-light);color:var(--text)}
.ni-arr{width:14px;height:14px;flex-shrink:0;opacity:.55;transition:transform .2s}
.ni-has:hover .ni-arr{transform:rotate(180deg)}
.ni-has:hover>.ni-link{background:var(--bg-light);color:var(--text)}

/* ── Dropdown ── */
.ni{position:relative}
.dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:200px;
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:0 10px 40px rgba(0,0,0,.1);
  opacity:0;visibility:hidden;
  transform:translateY(6px);
  transition:opacity .18s,transform .18s,visibility .18s;
  z-index:900;
  padding:6px;
}
/* چند ستون */
.dropdown[style*="--cols:2"] .dd-list{columns:2;column-gap:0}
.dropdown[style*="--cols:3"] .dd-list{columns:3;column-gap:0}
.ni-has:hover>.dropdown{opacity:1;visibility:visible;transform:translateY(0)}

/* آیتم‌های آخر از چپ باز شن */
.nav-list>.ni:nth-last-child(-n+3)>.dropdown{right:auto;left:0}

.dd-list{list-style:none;padding:0;margin:0}
.dd-list li{break-inside:avoid}
.dd-link{
  display:flex;align-items:center;justify-content:space-between;gap:6px;
  padding:8px 11px;
  font-size:13px;font-weight:500;
  color:var(--text-light);text-decoration:none;
  border-radius:var(--radius);
  transition:background .1s,color .1s;
  white-space:nowrap;
}
.dd-link:hover{background:var(--bg-light);color:var(--accent)}
.dd-arr{color:var(--text-muted);font-size:14px}

/* nested submenu */
.dd-item{position:relative}
.dd-sub{
  position:absolute;
  top:0;right:100%;
  min-width:190px;
  list-style:none;padding:6px;
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:0 8px 32px rgba(0,0,0,.1);
  opacity:0;visibility:hidden;
  transform:translateY(4px);
  transition:opacity .15s,visibility .15s,transform .15s;
  z-index:901;
}
.dd-has:hover>.dd-sub{opacity:1;visibility:visible;transform:translateY(0)}
.dd-sub li a{
  display:block;padding:7px 11px;
  font-size:13px;color:var(--text-light);text-decoration:none;
  border-radius:var(--radius);
  transition:background .1s,color .1s;
}
.dd-sub li a:hover{background:var(--bg-light);color:var(--accent)}

/* ── Header actions ── */
.hdr-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}

/* ── Search ── */
.hdr-search form{display:flex;align-items:center;border:1px solid var(--border);border-radius:20px;background:var(--bg-light);overflow:hidden;transition:border-color .15s}
.hdr-search form:focus-within{border-color:var(--accent)}
.hdr-search svg{width:15px;height:15px;stroke:var(--text-muted);margin-right:8px;flex-shrink:0}
.hdr-search input{
  border:none;background:transparent;outline:none;
  font-size:13px;font-family:inherit;color:var(--text);
  width:130px;height:34px;padding:0;
  transition:width .2s;
}
.hdr-search input:focus{width:180px}
.hdr-search input::placeholder{color:var(--text-muted)}

.hdr-phone{
  font-size:13px;font-weight:700;color:var(--text);text-decoration:none;
  padding:6px 10px;border:1px solid var(--border);border-radius:var(--radius);
  white-space:nowrap;transition:border-color .15s,color .15s;
  display:flex;align-items:center;gap:4px;
}
.hdr-phone:hover{border-color:var(--accent);color:var(--accent)}

/* ── Hamburger ── */
.hdr-ham{
  display:none;flex-direction:column;gap:5px;
  background:none;border:none;cursor:pointer;
  padding:6px;border-radius:var(--radius);
  transition:background .13s;
}
.hdr-ham:hover{background:var(--bg-light)}
.hdr-ham span{display:block;width:22px;height:2px;background:var(--text);border-radius:2px;transition:transform .25s,opacity .2s}
.hdr-ham.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hdr-ham.open span:nth-child(2){opacity:0}
.hdr-ham.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ── Drawer top (موبایل) ── */
.drawer-top{display:none;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--border)}
.drawer-close{background:none;border:none;font-size:20px;cursor:pointer;color:var(--text-muted);padding:4px;line-height:1}

/* ── Nav overlay ── */
.nav-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:899;cursor:pointer}
.nav-overlay.show{display:block}
/* ── جستجو در هدر ── */
/* ── جستجو در هدر ── */
.header-search { position:relative; flex-shrink:0; }
.header-search-input {
  width:180px; height:36px;
  padding:0 36px 0 12px;
  border:1px solid var(--border);
  border-radius:20px;
  font-size:13px; font-family:inherit;
  background:var(--bg-light);
  color:var(--text);
  transition:width .25s,border-color .15s,box-shadow .15s;
  outline:none;
}
.header-search-input:focus {
  width:220px;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12);
  background:var(--white);
}
.header-search-input::placeholder { color:var(--text-muted); }
.header-search-btn {
  position:absolute; left:8px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; padding:4px;
  color:var(--text-muted); line-height:0;
}
.header-search-btn svg { width:16px; height:16px; fill:currentColor; }
.header-search-btn:hover { color:var(--accent); }
/* شماره تماس */
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .15s;
}
.header-phone svg { width: 16px; height: 16px; fill: var(--accent); }
.header-phone:hover { border-color: var(--accent); color: var(--accent); background: var(--blue-light); }

/* همبرگر */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-right: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
}
.breadcrumb li { display: flex; align-items: center; gap: 4px; }
.breadcrumb a { color: var(--gray-400); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-current] { color: var(--text-light); font-weight: 500; }

/* ============================================================
   Page Article
   ============================================================ */
.page-article {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 24px 64px;
}

.page-h1 {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -.02em;
}

.page-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.page-image img { width: 100%; object-fit: cover; max-height: 460px; }

/* TOC */
.toc-box {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc-list { list-style: none; }
.toc-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--blue-border);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before { display: none; }
.toc-list li a { font-size: 13px; color: var(--text-light); font-weight: 500; flex: 1; }
.toc-list li a:hover { color: var(--accent); }
.toc-level-3 { padding-right: 16px; }

/* Content */
.page-content { font-size: 15px; line-height: 1.95; color: var(--text); }
.page-content h2 {
  font-size: 22px; font-weight: 800; margin: 40px 0 16px;
  color: var(--text); letter-spacing: -.01em;
  padding-right: 12px; border-right: 4px solid var(--accent);
}
.page-content h3 {
  font-size: 18px; font-weight: 700; margin: 30px 0 12px; color: var(--text);
}
.page-content h4 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.page-content p  { margin-bottom: 20px; }
.page-content ul, .page-content ol { padding-right: 24px; margin-bottom: 20px; }
.page-content li { margin-bottom: 8px; }
.page-content blockquote {
  border-right: 4px solid var(--accent);
  padding: 14px 20px;
  background: var(--blue-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  color: var(--text-light);
  font-style: italic;
}
.page-content img { border-radius: var(--radius); margin: 16px 0; box-shadow: var(--shadow-sm); }
.page-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.page-content th {
  background: var(--bg-light);
  padding: 11px 14px;
  text-align: right;
  font-weight: 700;
  border: 1px solid var(--border);
  font-size: 13px;
}
.page-content td { padding: 10px 14px; border: 1px solid var(--border); font-size: 14px; }
.page-content a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.page-content strong { font-weight: 700; }
.page-content code {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13px;
  direction: ltr;
  display: inline-block;
  font-family: monospace;
}
.page-content mark { background: #fef9c3; padding: 1px 3px; border-radius: 3px; }

/* ============================================================
   Sections
   ============================================================ */
.section { margin-top: 44px; }
.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  letter-spacing: -.01em;
}

/* Gallery */
.gallery-grid { display: grid; gap: 12px; }
.gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .35s;
}
.gallery-link:hover img { transform: scale(1.05); }
.gallery-caption {
  font-size: 12px;
  color: var(--text-muted);
  padding: 7px 10px;
  text-align: center;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}

/* Video */
.video-wrapper {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--gray-900);
}
.video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.faq-item:hover { border-color: var(--blue-border); }
.faq-question {
  width: 100%;
  background: var(--bg-light);
  border: none;
  padding: 16px 20px;
  text-align: right;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background .12s;
}
.faq-question:hover { background: var(--blue-light); }
.faq-question[aria-expanded="true"] { background: var(--blue-light); color: var(--accent); }
.faq-question svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; transition: transform .25s; }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer { padding: 16px 20px; font-size: 14px; line-height: 1.85; color: var(--text-light); border-top: 1px solid var(--border); }

/* Download */
.download-list { display: flex; flex-direction: column; gap: 8px; }
.download-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
  font-weight: 500;
}
.download-item:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateX(-2px);
  box-shadow: var(--shadow);
}
.download-item svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.download-title { flex: 1; font-size: 14px; }
.download-size { font-size: 12px; color: var(--text-muted); }
.download-item:hover .download-size { color: rgba(255,255,255,.75); }

/* Banner */
.section-banner .banner-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
}
.section-banner .banner-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  background: var(--blue-light);
}
.banner-title { font-size: 16px; font-weight: 700; color: var(--text); }
.banner-link:hover .banner-title { color: var(--accent); }
.banner-highlight .banner-link { background: var(--blue-light); border-color: var(--blue-border); }
.banner-border .banner-link { border: 2px solid var(--accent); }
.section-banner img { width: auto; max-height: 80px; border-radius: var(--radius); }

/* CTA */
.section-cta {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, var(--blue-light), #e0f2fe);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-xl);
}
.cta-text { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
  border: 2px solid transparent;
  letter-spacing: -.01em;
}
.cta-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cta-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.3);
}
.cta-secondary {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}
.cta-secondary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Table section */
.table-scroll { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.section-table table { width: 100%; border-collapse: collapse; }
.section-table th {
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.1);
}
.section-table td {
  padding: 11px 16px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.section-table tbody tr:nth-child(even) td { background: var(--bg-light); }
.section-table caption { caption-side: top; font-size: 14px; font-weight: 700; padding-bottom: 12px; text-align: right; color: var(--text); }

/* Form section */
.cms-form { max-width: 580px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-light);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  direction: rtl;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: -.01em;
}
.form-submit-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.form-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.req { color: var(--red); }
.captcha-field input { max-width: 160px; }
.form-message {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}
.form-message.success { background: var(--green-light); color: var(--green); border: 1px solid #bbf7d0; }
.form-message.error   { background: var(--red-light); color: var(--red); border: 1px solid #fecaca; }

/* ============================================================
   Children display
   ============================================================ */
.children-section { margin-top: 44px; }

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.child-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.child-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--blue-border);
}
.child-card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.child-card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.child-card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4; }
.child-card:hover .child-card-title { color: var(--accent); }
.child-card-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; }

.children-list { list-style: none; }
.children-list li { border-bottom: 1px solid var(--border); }
.children-list li:last-child { border-bottom: none; }
.children-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  transition: all .12s;
}
.children-list a::before {
  content: '←';
  color: var(--accent);
  font-size: 12px;
  transition: transform .12s;
}
.children-list a:hover { color: var(--accent); padding-right: 8px; }

.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: all .12s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { padding-right: 6px; }
.news-item img {
  width: 130px;
  height: 86px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.news-item-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.news-item-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--text); }
.news-item:hover .news-item-title { color: var(--accent); }
.news-item-excerpt { font-size: 13px; color: var(--text-muted); flex: 1; }
.news-item-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   Comments
   ============================================================ */
.comments-wrapper {
  margin-top: 52px;
  padding-top: 36px;
  border-top: 2px solid var(--border);
}
.comments-title { font-size: 20px; font-weight: 800; margin-bottom: 24px; color: var(--text); }
.comments-list { margin-bottom: 36px; }
.comment {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar {
  width: 36px; height: 36px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
.comment-author { font-weight: 700; font-size: 14px; color: var(--text); }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-body { font-size: 14px; color: var(--text-light); line-height: 1.75; padding-right: 46px; }

.comment-form-wrapper {
  background: var(--bg-light);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius-lg);
}
.comment-form-wrapper h3 { font-size: 17px; font-weight: 800; margin-bottom: 20px; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============================================================
   Search
   ============================================================ */
.search-page { padding: 48px 0; }
.search-form { margin-bottom: 32px; }
.search-input-wrapper {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.search-input-wrapper input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  color: var(--text);
  background: #fff;
}
.search-input-wrapper button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 22px;
  cursor: pointer;
  transition: background .15s;
}
.search-input-wrapper button:hover { background: var(--accent-dark); }
.search-input-wrapper button svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.search-results-header { margin-bottom: 20px; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.search-result-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-img img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.search-result-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.search-result-title a { color: var(--text); }
.search-result-title a:hover { color: var(--accent); }
.search-result-excerpt { font-size: 13px; color: var(--text-light); margin-bottom: 8px; line-height: 1.6; }
.search-result-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.search-result-url { direction: ltr; }
mark { background: #fef9c3; padding: 1px 3px; border-radius: 3px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.75);
  margin-top: 72px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  padding: 56px 0 48px;
}
.footer-logo { display: block; text-decoration: none; margin-bottom: 12px; }
.footer-logo img { filter: brightness(0) invert(1); height: 40px; }
.footer-logo span { color: #fff; font-size: 18px; font-weight: 800; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.8; margin-top: 8px; }

.social-links { display: flex; gap: 8px; margin-top: 20px; }
.social-links a {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.social-links a:hover { background: var(--accent); }
.social-links svg { width: 17px; height: 17px; fill: #fff; }

.footer-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { padding: 5px 0; }
.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  text-decoration: none;
  transition: color .12s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before { content: '←'; font-size: 11px; color: var(--accent); }
.footer-links a:hover { color: #fff; }

.footer-contact { list-style: none; }
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-contact li:last-child { border-bottom: none; }
.footer-contact svg { width: 16px; height: 16px; fill: var(--accent); margin-top: 2px; flex-shrink: 0; }
.footer-contact a { color: rgba(255,255,255,.6); text-decoration: none; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.35);
}

/* ============================================================
   Error
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px 20px;
}
.error-page h1 { font-size: 88px; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 16px; }
.error-page h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 28px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hdr-ham { display: flex; }
  .hdr-nav {
    position: fixed;
    top: 0; right: -100%;
    width: min(310px, 88vw);
    height: 100%;
    background: var(--white);
    border-left: 1px solid var(--border);
    z-index: 900;
    overflow-y: auto;
    transition: right .3s cubic-bezier(.4,0,.2,1);
    padding-bottom: 40px;
  }
  .hdr-nav.open { right: 0; box-shadow: -6px 0 32px rgba(0,0,0,.12); }
  .drawer-top { display: flex; }
  .hdr-actions .hdr-phone { display: none; }
  .hdr-actions .hdr-search { display: none; }

  /* nav list در drawer */
  .nav-list { flex-direction: column; gap: 0; padding: 0; }
  .ni { border-bottom: 1px solid var(--border); }
  .ni-link {
    width: 100%;
    padding: 14px 18px;
    font-size: 14px;
    border-radius: 0;
    justify-content: space-between;
    color: var(--text);
  }
  .ni-arr { opacity: .5; transition: transform .25s; }
  .ni.open > .ni-link .ni-arr { transform: rotate(180deg); }

  /* dropdown در موبایل: accordion */
  .dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    border-right: 3px solid var(--accent) !important;
    background: var(--bg-light) !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    columns: 1 !important;
    display: none;
  }
  .dropdown[style*="--cols:2"] .dd-list,
  .dropdown[style*="--cols:3"] .dd-list { columns: 1 !important; }
  .ni.open > .dropdown { display: block; }
  .dd-link {
    padding: 11px 18px;
    font-size: 13px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }
  /* سطح ۳ در موبایل: accordion */
  .dd-sub {
    display: none;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    background: var(--white) !important;
    padding: 0 !important;
    list-style: none;
    border-right: 3px solid var(--gray-300) !important;
    margin-right: 16px !important;
  }
  .dd-has.open > .dd-sub { display: block; }
  .dd-arr { display: inline; font-size: 12px; opacity: .5; transition: transform .2s; }
  .dd-has.open > .dd-link .dd-arr { transform: rotate(90deg); }
  .dd-sub li a {
    display: block;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .page-article { padding: 24px 16px 48px; }
  .children-grid { grid-template-columns: 1fr; }
  .gallery-cols-3, .gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .news-item img { width: 90px; height: 60px; }
  .container { padding: 0 16px; }
}
/* ============================================================
   مطالب مرتبط
   ============================================================ */
.related-pages {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 2px solid var(--border);
}
.related-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.related-icon {
  width: 36px;
  height: 36px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.related-icon svg { width: 18px; height: 18px; fill: var(--accent); }
.related-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  border: none;
  padding: 0;
}
.related-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  transition: all .18s;
}
.related-item:hover {
  border-color: var(--accent);
  background: var(--blue-light);
  transform: translateX(-3px);
}
.related-item-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.related-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-item-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.related-item-icon svg { width: 20px; height: 20px; fill: var(--gray-400); }
.related-item-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.related-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.related-item:hover .related-item-title { color: var(--accent); }
.related-item-arrow {
  color: var(--gray-300);
  font-size: 16px;
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}
.related-item:hover .related-item-arrow {
  color: var(--accent);
  transform: translateX(-3px);
}

@media (max-width: 600px) {
  .related-list { grid-template-columns: 1fr; }
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  padding: 12px 0;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}
.breadcrumb li + li::before {
  content: '›';
  margin: 0 8px;
  color: var(--gray-300);
  font-size: 16px;
  line-height: 1;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .12s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] {
  color: var(--text-light);
  font-weight: 600;
}

/* ============================================================
   صفحه اول — اسلایدشو
   ============================================================ */
.home-slider {
  width: 100%;
  overflow: hidden;
}
.home-slider .swiper {
  width: 100%;
  height: clamp(260px, 50vw, 600px);
}
.home-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-slider .swiper-pagination-bullet {
  background: #fff;
  opacity: .6;
}
.home-slider .swiper-pagination-bullet-active {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
}
.home-slider .swiper-button-next,
.home-slider .swiper-button-prev {
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  backdrop-filter: blur(4px);
}
.home-slider .swiper-button-next::after,
.home-slider .swiper-button-prev::after {
  font-size: 16px;
  color: #fff;
  font-weight: 900;
}

/* ============================================================
   صفحه اول — خدمات
   ============================================================ */
.home-services {
  padding: 64px 0;
  background: var(--bg-light);
}
.home-section-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  color: var(--text);
  text-align: center;
  margin-bottom: 36px;
  position: relative;
}
.home-section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 20px;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: var(--blue-border);
}
.service-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.service-card:hover .service-card-img img {
  transform: scale(1.07);
}
.service-card-icon {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
}
.service-card-icon svg {
  width: 48px;
  height: 48px;
  fill: var(--accent);
}
.service-card-body {
  padding: 14px 16px;
}
.service-card-body h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}
.service-card:hover .service-card-body h3 {
  color: var(--accent);
}

@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .home-services { padding: 40px 0; }
}

/* ============================================================
   فوتر
   ============================================================ */
.site-footer {
  background: #1a1f36;
  color: rgba(255,255,255,.7);
  margin-top: 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 48px;
  padding: 56px 0 48px;
}
.footer-about {}
.footer-logo {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 14px;
}
.footer-logo img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.footer-logo span {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.footer-desc {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  line-height: 1.85;
  margin-bottom: 20px;
}
.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, opacity .2s;
  opacity: .8;
}
.footer-social-link:hover { transform: translateY(-3px); opacity: 1; }
.footer-social-link svg { width: 18px; height: 18px; fill: #fff; }
.footer-social-link i { font-size: 17px; color: #fff; line-height: 1; }
.footer-social-instagram { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.footer-social-telegram  { background: #0088cc; }
.footer-social-whatsapp  { background: #25d366; }
.footer-social-linkedin  { background: #0a66c2; }
.footer-social-twitter   { background: #000; }
.footer-social-youtube   { background: #ff0000; }

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  text-decoration: none;
  transition: color .12s, padding-right .12s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a::before {
  content: '‹';
  color: var(--accent);
  font-size: 14px;
}
.footer-links a:hover {
  color: #fff;
  padding-right: 4px;
}
.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.footer-contact svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .12s;
}
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.3);
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1/-1; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-about { grid-column: auto; }
}

/* ============================================================
   دکمه‌های شناور (واتساپ + تماس)
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 52px;
  height: 52px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  z-index: 800;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(37,211,102,.5); }
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

.float-cta {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 800;
}
.fc-call {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.fc-call:hover { transform: scale(1.04); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.fc-call svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }


/* footer-bottom دو ستونه */
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom-brand {
  color: rgba(255,255,255,.35);
  font-size: 12px;
  text-decoration: none;
  transition: color .12s;
}
.footer-bottom-brand:hover { color: rgba(255,255,255,.7); }
.footer-bottom-brand strong { color: #60a5fa; }

/* موبایل: نوار تماس ثابت پایین */
.mobile-contact-bar {
  display: none;
}
@media (max-width: 960px) {
  /* فوتر grid موبایل */
  .footer-inner { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
  .footer-about { grid-column: 1 / -1; }

  /* نوار تماس ثابت پایین موبایل */
  .mobile-contact-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    right: 0; left: 0;
    z-index: 790;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 16px rgba(0,0,0,.1);
  }
  .mobile-contact-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    transition: background .15s, color .15s;
  }
  .mobile-contact-bar a:hover,
  .mobile-contact-bar a:active { background: var(--bg-light); color: var(--accent); }
  .mobile-contact-bar a svg { width: 22px; height: 22px; fill: currentColor; }
  .mobile-contact-bar .mcb-whatsapp { color: #25d366; }
  .mobile-contact-bar .mcb-whatsapp:hover { background: #f0fdf4; }
  .mobile-contact-bar .mcb-call { color: var(--accent); }
  .mobile-contact-bar .mcb-divider {
    width: 1px; background: var(--border); align-self: stretch; margin: 8px 0;
    flex: 0; padding: 0;
  }

  /* فضای پایین برای نوار موبایل */
  body { padding-bottom: 68px; }

  /* دکمه‌های شناور در موبایل مخفی بشن چون نوار داریم */
  .whatsapp-float { display: none; }
  .float-cta { display: none; }

  /* footer-bottom text-center در موبایل */
  .footer-bottom-inner { justify-content: center; text-align: center; }
}