/* =========================================================
   Adupars 2026 — قالب مدرن ریسپانسیو RTL
   مرکز آموزش تجهیزات رادیویی آدپارس
   Pure modern CSS — بدون وابستگی به Bootstrap/jQuery
   ========================================================= */

/* ---------- فونت‌های فارسی ---------- */
@font-face {
  font-family: 'IRANSansWeb';
  src: url('../fonts/IRANSansWeb.woff2') format('woff2'),
       url('../fonts/IRANSansWeb.woff') format('woff'),
       url('../fonts/IRANSansWeb.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IRANSansWeb';
  src: url('../fonts/IRANSansWeb_Light.woff') format('woff'),
       url('../fonts/IRANSansWeb_Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'BYekan';
  src: url('../fonts/BYekan.woff') format('woff'),
       url('../fonts/BYekan.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- متغیرهای طراحی ---------- */
:root {
  --brand:        #0d3b66;   /* سرمه‌ای برند */
  --brand-2:      #14518f;   /* آبی برند */
  --brand-soft:   #e8f1fb;   /* پس‌زمینه ملایم برند */
  --accent:       #f39c12;   /* نارنجی تاکیدی */
  --accent-2:     #e67e22;
  --teal:         #0e9594;   /* فیروزه‌ای مکمل */
  --ink:          #1e293b;   /* متن اصلی */
  --ink-soft:     #475569;   /* متن ثانویه */
  --muted:        #64748b;
  --line:         #e2e8f0;
  --bg:           #f5f7fa;
  --card:         #ffffff;
  --danger:       #dc2626;
  --ok:           #16a34a;
  --radius:       14px;
  --radius-sm:    9px;
  --shadow-1:     0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-2:     0 10px 28px -12px rgba(13, 59, 102, .25);
  --shadow-3:     0 22px 44px -16px rgba(13, 59, 102, .30);
  --container:    1200px;
  --header-h:     74px;
  --font: 'IRANSansWeb', 'BYekan', Tahoma, Arial, sans-serif;
}

/* ---------- ریست مدرن ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px; line-height: 1.9;
  color: var(--ink); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { border-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--accent-2); }
ul, ol { padding-right: 1.4em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 4px; }

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

/* ---------- ابزارها ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
.skip-link {
  position: absolute; right: -9999px; top: 8px; z-index: 3000;
  background: var(--brand); color: #fff; padding: 10px 22px;
  border-radius: 0 0 10px 10px; font-weight: 700;
}
.skip-link:focus { right: 16px; color: #fff; }

/* دکمه‌ها */
.btn, button.btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .95rem; line-height: 1.6;
  border: 2px solid transparent; transition: all .22s ease;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(243, 156, 18, .55); }
.btn-primary:hover { background: var(--accent-2); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,.65); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--brand); background: #fff; }
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* ---------- نوار بالایی ---------- */
.topbar { background: var(--brand); color: #dbe7f5; font-size: .86rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; flex-wrap: wrap; padding-block: 4px; }
.topbar a { color: #fff; }
.topbar a:hover { color: var(--accent); }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topbar .custom, .topbar .mod-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.topbar p { margin: 0; display: inline; }

/* ---------- هدر ---------- */
.site-header {
  background: #fff; position: relative; z-index: 100;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.is-stuck { position: sticky; top: 0; box-shadow: var(--shadow-2); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header-h); flex-wrap: wrap; padding-block: 8px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo img { max-height: 58px; width: auto; }
.brand-logo p, .brand-logo div { margin: 0; }
.brand-logo a { display: inline-flex; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
}
.nav-toggle-bars { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.nav-toggle-bars i { display: block; width: 22px; height: 2.6px; border-radius: 3px; background: var(--brand); transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }

.header-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions p { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
/* فهرست‌های داخل نوار ابزار هدر (مثل «منوی بالا») بدون گلوله و افقی */
.header-actions ul, .header-actions ul.mod-menu, .header-actions ul.nav, .header-actions ul.menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap;
}
.header-actions li { list-style: none; margin: 0; padding: 0; }
.header-actions li a { white-space: nowrap; font-weight: 600; }
.header-search { min-width: 220px; }
.header-search input[type="text"], .header-search input[type="search"] {
  width: 100%; max-width: 260px; padding: 9px 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: .9rem; transition: border-color .2s;
}
.header-search input:focus { border-color: var(--brand-2); outline: none; background: #fff; }

/* ---------- ناوبری اصلی ---------- */
.main-nav { background: var(--brand-2); position: relative; }
.main-nav.is-stuck-pos { }
.nav-inner { position: relative; }
.nav-backdrop { display: none; }

.main-nav .mod-menu, .main-nav ul.nav, .main-nav ul.menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: stretch;
}
.main-nav .mod-menu li { position: relative; }
.main-nav .mod-menu > li > a,
.main-nav .mod-menu > li > span.nav-header,
.main-nav .mod-menu > li.separator {
  display: flex; align-items: center; gap: 6px;
  color: #fff; font-weight: 700; font-size: .98rem;
  padding: 13px 18px; min-height: 50px; cursor: pointer;
  transition: background .18s ease;
  position: relative; white-space: nowrap;
}
.main-nav .mod-menu > li > a::after {
  content: ""; position: absolute; bottom: 0; right: 18px; left: 18px; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .22s ease; border-radius: 3px 3px 0 0;
}
.main-nav .mod-menu > li:hover > a::after,
.main-nav .mod-menu > li.active > a::after { transform: scaleX(1); }
.main-nav .mod-menu > li:hover > a,
.main-nav .mod-menu > li.active > a { background: rgba(255,255,255,.08); color: #fff; }
.main-nav .mod-menu > li.parent > a::before,
.main-nav .mod-menu > li.parent > span.nav-header::before {
  content: ""; width: 0; height: 0; margin-inline-start: 2px;
  border-inline-start: 4.5px solid transparent;
  border-inline-end: 4.5px solid transparent;
  border-top: 5.5px solid rgba(255,255,255,.85);
}
.main-nav li.parent { position: relative; }
.main-nav li.parent > ul {
  position: absolute; top: 100%; right: 0; z-index: 500;
  min-width: 250px; max-width: 320px;
  background: #fff; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-3); padding: 8px 0 !important;
  display: block; flex-direction: column; flex-wrap: nowrap;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.main-nav li.parent:hover > ul,
.main-nav li.parent:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav li.parent > ul li { position: static; }
.main-nav li.parent > ul a,
.main-nav li.parent > ul span.nav-header {
  display: block; color: var(--ink); padding: 10px 20px;
  font-weight: 400; font-size: .93rem; white-space: normal; min-height: 0;
}
.main-nav li.parent > ul a:hover { background: var(--brand-soft); color: var(--brand); padding-inline-start: 26px; }
.main-nav li.parent > ul a::after { display: none; }

/* ---------- هیرو ---------- */
.hero-zone { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 78%, #1d6fb8 100%); color: #fff; overflow: hidden; position: relative; }
.hero-zone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 300px at 88% 12%, rgba(243, 156, 18, .16), transparent 60%),
    radial-gradient(520px 260px at 8% 92%, rgba(14, 149, 148, .18), transparent 62%);
}
.hero { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding-block: 58px 64px; }
.hero-content h1, .hero-title {
  font-family: 'BYekan', var(--font); font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  line-height: 1.55; margin: 0 0 14px; color: #fff;
}
.hero-content .hero-sub, .hero-zone p { color: #d9e5f4; font-size: 1.02rem; font-weight: 300; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-media { display: flex; justify-content: center; align-items: center; }
.hero-media img { max-width: 100%; max-height: 300px; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  color: #ffd48a; border-radius: 999px; padding: 4px 16px;
  font-size: .82rem; font-weight: 700; margin-bottom: 16px;
}

/* ---------- نوار مسیر (breadcrumb) ---------- */
.crumb-strip { background: #fff; border-bottom: 1px solid var(--line); padding-block: 10px; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 6px; margin: 0; padding: 0; font-size: .88rem; color: var(--muted); }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "‹"; color: #94a3b8; font-size: 1rem; }
.breadcrumb a { color: var(--brand-2); }
.breadcrumb .active { color: var(--ink-soft); }

/* ---------- باندهای عمومی ---------- */
.band { padding-block: 40px; }
.band-about { background: linear-gradient(160deg, var(--brand) 0%, #123f6d 100%); color: #e6eefb; }
.band-about h1, .band-about h2, .band-about h3 { color: #fff; }
.band-about a { color: #ffd48a; }
.band-about a:hover { color: #fff; }
.band-center5, .band-center { background: #fff; }
.band-center4 { background: var(--brand-soft); }
.band-center2 { padding-block: 26px; background: transparent; }
.band-top1 { padding-block: 26px; }

/* ---------- کارت استاندارد ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 20px 22px; margin-bottom: 20px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { box-shadow: var(--shadow-2); }
.card-title {
  font-family: 'BYekan', var(--font); color: var(--brand);
  font-size: 1.08rem; margin: 0 0 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-soft); position: relative;
}
.card-title::after {
  content: ""; position: absolute; bottom: -2px; right: 0;
  width: 46px; height: 2px; background: var(--accent); border-radius: 2px;
}

/* ---------- گرید دوره‌ها ---------- */
.courses-zone { background: var(--bg); padding-block: 46px 40px; }
.courses-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
.courses-grid .card {
  display: flex; flex-direction: column; margin-bottom: 0;
  border-top: 4px solid var(--brand-2);
}
.courses-grid .card:hover { transform: translateY(-5px); box-shadow: var(--shadow-3); }
.courses-grid .card-body { display: flex; flex-direction: column; flex: 1; }
.courses-grid .card-body p:last-child { margin-top: auto; }

/* نرمال‌سازی مارکاپ قدیمی داخل کارت‌ها */
.courses-grid .card-body img,
.card .card-body img[width="64"] {
  float: none !important; display: block;
  margin: 0 auto 10px !important; width: 60px; height: auto;
  background: var(--brand-soft); border-radius: 14px; padding: 8px;
}
.courses-grid .card-body p[style] { text-align: center !important; }
.courses-grid .card-body a[style], .courses-grid .card-body p[style*="left"] a { float: none; display: inline-block; }
.courses-grid .card-body strong a { color: var(--brand); font-size: 1.02rem; }
.courses-grid .card-body strong a:hover { color: var(--accent-2); }

/* ---------- گرید محتوای اصلی + سایدبار ---------- */
.page-zone { padding-block: 34px; }
.page-grid { display: flex; gap: 24px; align-items: flex-start; }
.main-area { flex: 1 1 0; min-width: 0; order: 1; }
.sidebar { flex: 0 0 300px; max-width: 300px; order: 2; }
.sidebar-right { order: 0; }
.sidebar-left { order: 2; }
.sidebar .card { padding: 16px 18px; }
.sidebar .card-title { font-size: 1rem; }
.sidebar .mod-menu, .sidebar ul.menu, .sidebar .nav { list-style: none; margin: 0; padding: 0; }
.sidebar .mod-menu li { border-bottom: 1px dashed var(--line); }
.sidebar .mod-menu li:last-child { border-bottom: 0; }
.sidebar .mod-menu a, .sidebar .mod-menu .nav-header {
  display: block; padding: 9px 4px; color: var(--ink-soft); font-size: .93rem;
  position: relative; transition: color .18s, padding .18s;
}
.sidebar .mod-menu a::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 2px; background: var(--brand-2); margin-inline-end: 10px;
  opacity: .55; transition: background .18s, opacity .18s; vertical-align: 1px;
}
.sidebar .mod-menu a:hover { color: var(--brand-2); padding-inline-start: 10px; }
.sidebar .mod-menu a:hover::before { background: var(--accent); opacity: 1; }
.sidebar .mostread li, .sidebar .latestnews li, .sidebar ul.mostread li, .sidebar ul.latestnews li {
  border-bottom: 1px dashed var(--line); padding: 8px 0; list-style: none;
}
.sidebar .mostread a, .sidebar .latestnews a { font-size: .92rem; color: var(--ink-soft); }
.sidebar .mostread a:hover, .sidebar .latestnews a:hover { color: var(--brand-2); }

/* ---------- پرفوتر (user1..3) ---------- */
.prefooter { background: #0f2a47; color: #c9d8ec; padding-block: 44px 36px; }
.prefooter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.prefooter .card { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.10); box-shadow: none; color: #c9d8ec; }
.prefooter .card:hover { box-shadow: none; transform: none; }
.prefooter .card-title { color: #ffd48a; border-bottom-color: rgba(255,255,255,.14); }
.prefooter .card-title::after { background: var(--accent); }
.prefooter a { color: #9fd1ff; }
.prefooter a:hover { color: #fff; }
.prefooter ul { list-style: none; padding: 0; }
.prefooter li { border-bottom: 1px dashed rgba(255,255,255,.12); }
.prefooter li:last-child { border-bottom: 0; }
.prefooter li a { display: block; padding: 7px 0; }
.prefooter img { display: inline-block; vertical-align: middle; margin-inline-end: 8px; }
.prefooter .latestnews .mod-articleslatest, .prefooter .mod-articleslatest ul { list-style: none; }

/* ---------- فوتر ---------- */
.site-footer { background: #0b2140; color: #8fa7c6; padding-block: 22px; font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-copy p { margin: 0; }
.footer-copy a { color: #cfe0f5; }
.footer-namad { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.footer-namad img { max-height: 88px; }
.footer-namad p { margin: 0; }

/* ---------- بازگشت به بالا ---------- */
.back-top {
  position: fixed; bottom: 26px; left: 26px; z-index: 900;
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--brand-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-2); opacity: 0; transform: translateY(14px);
  transition: opacity .25s, transform .25s, background .2s;
}
.back-top.is-visible { opacity: 1; transform: none; }
.back-top:hover { background: var(--accent); color: #fff; }

/* ---------- ماژول‌های محتوایی (custom/اخبار و...) ---------- */
.mod-articleslatest ul, .mostread ul { list-style: none; padding: 0; }
.mod-articleslatest li, .mostread li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.mod-articleslatest li:last-child, .mostread li:last-child { border-bottom: 0; }
.mod-articleslatest a, .mostread a { font-weight: 400; }
.custom h2, .custom h3 { color: var(--brand); }
.custom img { max-width: 100%; }
.custom hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* سکشن درباره (بند آبی) نرمال‌سازی متن قدیمی */
.band-about .custom p { margin-bottom: .8em; }
.band-about .custom h3 { margin-bottom: 14px; font-size: 1.25rem; }

/* گرید دونیمه (پکیج‌ها / ویدئوها) */
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.duo-grid .card { margin-bottom: 0; }

/* نوار CTA خدمات */
.band-center2 .custom { text-align: center; }
.band-center2 .btn, .band-center2 .shortcode-btn { margin-inline: 4px; }

/* ---------- جداول ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: right; font-size: .93rem; }
thead th { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
tbody tr:hover { background: #f8fafc; }

/* ---------- فرم‌ها ---------- */
.form-control, input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20, 81, 143, .12); outline: none; }
label { font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
legend { padding: 0 10px; font-weight: 700; color: var(--brand); }

/* ---------- پیام‌ها ---------- */
.alert, #system-message .alert {
  border-radius: var(--radius-sm); padding: 13px 18px; margin-bottom: 16px;
  border: 1px solid transparent; font-size: .94rem;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger, .alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- پیجینیشن ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 22px 0 0; }
.pagination a, .pagination span {
  min-width: 40px; padding: 8px 13px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  font-size: .9rem; color: var(--ink-soft); display: inline-block;
}
.pagination .active span { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.pagination a:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* ---------- لایه خروجی کامپوننت‌ها ---------- */
.component-area { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-1); }
.page-header h1, .item-page h1, .blog h1 {
  font-family: 'BYekan', var(--font); color: var(--brand);
  font-size: 1.45rem; margin: 0 0 18px; padding-bottom: 12px;
  border-bottom: 2px solid var(--brand-soft); position: relative;
}
.page-header h1::after, .item-page h1::after, .blog h1::after {
  content: ""; position: absolute; bottom: -2px; right: 0;
  width: 60px; height: 2px; background: var(--accent);
}
.article-info { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .85rem; margin-bottom: 18px; list-style: none; padding: 0; }
.article-info dt { font-weight: 700; }
.article-info dd { margin: 0; }
.item-page .intro-image, .item-image { margin-bottom: 18px; }
.item-page .intro-image img, .item-image img { border-radius: var(--radius-sm); }
.tags .badge, .label { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 13px; font-size: .8rem; margin: 2px; }
.blog-items { display: grid; gap: 22px; }
.blog-item, .item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 0; box-shadow: var(--shadow-1); transition: box-shadow .2s, transform .2s; }
.blog-item:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); }
.blog-item h2, .blog-item .item-title { font-size: 1.15rem; margin-bottom: 10px; }
.blog-item h2 a, .blog-item .item-title a { color: var(--brand); }
.blog-item h2 a:hover { color: var(--accent-2); }
.readmore .btn { margin-top: 8px; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }

/* دسته‌بندی‌ها و لیست‌ها */
.category-list, .com-content-category__articles .card { margin-bottom: 16px; }
.list-title { font-size: 1.05rem; }

/* ---------- کامپوننت mohaclass (دوره‌ها) ---------- */
.com-mohaclass .course-item, .course-card {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 14px;
}
.course-item h3, .course-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.btn-register, .mohaclass .btn {
  background: var(--teal); color: #fff; border-radius: var(--radius-sm);
  padding: 7px 18px; font-size: .88rem; display: inline-block;
}
.btn-register:hover { background: #0b7c7b; color: #fff; }

/* ---------- Phoca Download ---------- */
.phoca-download, .pd-category, .phocadownload file, #phoca-dl {
  background: #fff;
}
.phocadownloadlist table, .phoca-dl-table td { font-size: .92rem; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 1100px) {
  .courses-grid { grid-template-columns: repeat(3, 1fr); }
  .sidebar { flex-basis: 260px; max-width: 260px; }
}

@media (max-width: 991px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-block: 42px; gap: 20px; }
  .hero-cta { justify-content: center; }
  .hero-media img { max-height: 210px; }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .prefooter-grid { grid-template-columns: 1fr 1fr; }
  .duo-grid { grid-template-columns: 1fr; }

  /* منوی موبایل — کشویی از راست */
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 0; z-index: 2000; visibility: hidden; pointer-events: none;
  }
  .main-nav .nav-inner {
    position: absolute; top: 0; bottom: 0; right: 0; width: min(86vw, 330px);
    background: #fff; overflow-y: auto; padding: 18px 14px;
    transform: translateX(100%); transition: transform .28s ease;
    box-shadow: -18px 0 50px rgba(2, 8, 20, .35);
  }
  .main-nav.is-open { visibility: visible; pointer-events: auto; }
  .main-nav.is-open .nav-inner { transform: translateX(0); }
  .nav-backdrop {
    display: block; position: absolute; inset: 0;
    background: rgba(8, 15, 30, .55); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity .25s;
  }
  .main-nav.is-open .nav-backdrop { opacity: 1; }
  .main-nav .mod-menu, .main-nav ul.nav, .main-nav ul.menu {
    flex-direction: column; align-items: stretch; flex-wrap: nowrap;
  }
  .main-nav .mod-menu > li > a,
  .main-nav .mod-menu > li > span.nav-header,
  .main-nav .mod-menu > li.separator {
    color: var(--ink); border-bottom: 1px solid var(--line);
    padding: 12px 10px; white-space: normal; justify-content: space-between;
  }
  .main-nav .mod-menu > li > a::after { display: none; }
  .main-nav .mod-menu > li:hover > a,
  .main-nav .mod-menu > li.active > a { background: var(--brand-soft); color: var(--brand); }
  .main-nav li.parent > ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; max-width: none; min-width: 0; border-radius: 8px;
    background: #f6f9fd; margin: 4px 0 6px; padding: 4px 0 !important;
    display: none;
  }
  .main-nav li.parent.is-expanded > ul { display: block; }
  .main-nav li.parent > ul a { padding: 9px 18px; font-size: .9rem; }
  .main-nav li.parent > ul a:hover { padding-inline-start: 24px; }
  .main-nav li.parent > a::before,
  .main-nav li.parent > span.nav-header::before {
    border-top-color: var(--brand-2);
    transition: transform .2s;
  }
  .main-nav li.parent.is-expanded > a::before,
  .main-nav li.parent.is-expanded > span.nav-header::before { transform: rotate(180deg); }
  /* دکمه بستن داخل کشو */
  .drawer-close {
    display: flex; align-items: center; justify-content: space-between;
    font-family: 'BYekan', var(--font); color: var(--brand);
    font-size: 1.02rem; padding: 4px 8px 14px; border-bottom: 2px solid var(--brand-soft); margin-bottom: 10px;
    width: 100%;
  }
  .drawer-close svg { color: var(--ink-soft); }
}

@media (max-width: 767px) {
  body { font-size: 15px; }
  .container { padding-inline: 14px; }
  .band { padding-block: 28px; }
  .courses-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .courses-grid .card { padding: 14px 12px; }
  .prefooter-grid { grid-template-columns: 1fr; gap: 18px; }
  .header-inner { min-height: 62px; }
  .brand-logo img { max-height: 44px; }
  .header-tools { width: 100%; }
  .header-search { min-width: 0; flex: 1; }
  .header-search input[type="text"], .header-search input[type="search"] { max-width: none; }
  .component-area { padding: 18px 16px; }
  .topbar { font-size: .8rem; }
  .topbar-inner { justify-content: center; }
}

@media (max-width: 480px) {
  .courses-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 1.35rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .back-top { bottom: 16px; left: 16px; width: 42px; height: 42px; }
}

/* چاپ */
@media print {
  .topbar, .main-nav, .back-top, .prefooter, .hero-zone, .crumb-strip, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .card, .component-area { box-shadow: none; border-color: #ddd; }
}

/* دسترس‌پذیری: حالت کنتراست بالا */
@media (forced-colors: active) {
  .card, .btn, .main-nav { border: 1px solid CanvasText; }
}

/* ---------- دکمه‌های CTA هدر (ماژول دکمه‌های رنگی) ---------- */
.header-actions .header-cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 18px; border-radius: 8px; color: #fff !important;
  font-weight: 700; font-size: .88rem; line-height: 1.7;
  transition: transform .18s ease, filter .18s ease; white-space: nowrap;
}
.btn-cta:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; }
.btn-cta-red { background: #e74c3c; }
.btn-cta-green { background: #27ae60; }
.btn-cta-orange { background: #f39c12; }

/* ---------- جستجوی هدر ---------- */
.header-search .mod-search, .header-search form { display: flex; align-items: center; }
.header-search input[type="search"], .header-search input[type="text"] { direction: rtl; }

/* ---------- ویدئوهای آپارات و iframes ---------- */
.card-body iframe {
  max-width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: #0b0f19;
}
.h_iframe-aparat_embed_frame { display: inline-block; margin: 4px; }
.card-body iframe[width="350"] { width: 350px; height: 197px; }
@media (max-width: 480px) { .card-body iframe[width="350"] { width: 100%; height: 180px; } }

/* ---------- فریم تصویر هیرو ---------- */
.hero-media img {
  border-radius: 18px; border: 4px solid rgba(255,255,255,.14);
  background: #fff; object-fit: cover;
}

/* ---------- ماژول "پربازدیدترین" (center) لیست دوره‌های آینده ---------- */
.band-center .custom p { line-height: 2.3; }
.band-center .custom img { opacity: .9; margin-inline: 4px; }
.band-center .custom hr { border-top: 1px solid var(--brand-soft); }

/* ---------- بهبود کارت‌های دوره: عنوان از محتوا ---------- */
.courses-grid .card-body p:first-of-type { margin-bottom: 6px; }
.courses-grid .card-body p a[target], .courses-grid .card-body p a { font-size: .95rem; }

/* ---------- فاصله بندها ---------- */
.split-zone { padding-block: 30px; background: #fff; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 991px) { .split-grid { grid-template-columns: 1fr; } }

/* ---------- نرمال‌سازی دکمه‌های شورت‌کد قدیمی (novin-btn) ---------- */
a.novin-btn, .novin-btn {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
  font-size: .92rem !important; line-height: 1.7 !important;
  padding: 10px 24px !important; border-radius: 9px !important;
  color: #fff !important; font-weight: 700;
  box-shadow: 0 5px 14px -6px rgba(0,0,0,.35);
  transition: transform .18s ease, filter .18s ease;
}
a.novin-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #fff; }

/* ---------- آیکون کارت‌های دوره: روی سفید برای وضوح ---------- */
.courses-grid .card-body img,
.card .card-body img[width="64"] {
  background: #fff; border: 1px solid var(--brand-soft);
  box-shadow: 0 3px 10px -4px rgba(13, 59, 102, .25);
}

/* ---------- بند درباره: تیتر و لید ---------- */
.band-about .custom > h2:first-child,
.band-about h2 {
  font-family: 'BYekan', var(--font); font-size: 1.35rem; color: #fff;
  margin-bottom: 14px; padding-bottom: 10px; position: relative;
  border-bottom: 2px solid rgba(255,255,255,.15);
}
.band-about h2::after {
  content: ""; position: absolute; bottom: -2px; right: 0;
  width: 56px; height: 2px; background: var(--accent);
}
.band-about .custom > p:first-of-type { font-size: 1.04rem; color: #f2f7fd; }

/* ---------- ویدئوهای آپارات داخل کارت: چیدمان دو ستونی ---------- */
.duo-grid .card-body .h_iframe-aparat_embed_frame {
  width: calc(50% - 8px); display: inline-block; margin: 4px; vertical-align: top;
}
@media (max-width: 767px) {
  .duo-grid .card-body .h_iframe-aparat_embed_frame { width: 100%; }
}

/* ---------- سوالات متداول (FAQ) ---------- */
.faq-list { display: grid; gap: 10px; margin-top: 14px; }
.faq-list details {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.faq-list details[open] { border-color: var(--brand-2); box-shadow: 0 4px 14px rgba(21,101,192,.08); }
.faq-list summary {
  cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--brand-2);
  list-style: none; position: relative; padding-inline-end: 44px; user-select: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; inset-inline-end: 16px; top: 50%; translate: 0 -50%;
  font-size: 1.5rem; font-weight: 400; color: var(--accent); transition: rotate .2s;
}
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details p { padding: 0 18px 14px; margin: 0; line-height: 2; }
.faq-list details a { color: var(--brand-2); }

/* ---------- آی‌فریم‌های امبد (آپارات/یوتیوب) ریسپانسیو ---------- */
.component-area iframe, .band iframe, .page-zone iframe, .h_iframe-aparat_embed_frame iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.h_iframe-aparat_embed_frame { width: 100%; }

/* ===== injected page H1 (semantic SEO) ===== */
.page-h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink, #1d2129);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand, #c34f2a);
  display: inline-block;
}

/* ===== professional course/service cards ===== */
.adp-card { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; }
.adp-card-icon { width: 56px; height: 56px; object-fit: contain; margin: 4px 0 12px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.12)); }
.adp-card-title { font-size: 1.02rem; font-weight: 800; color: var(--ink, #1d2129); margin: 0 0 10px; line-height: 1.7; }
.adp-card-text { font-size: .9rem; line-height: 1.9; color: #4a5058; text-align: center; margin: 0 0 14px; flex: 1; }
.adp-card-more {
  margin-top: auto; font-size: .88rem; font-weight: 700; color: var(--brand, #c34f2a);
  text-decoration: none; border: 1px solid var(--brand, #c34f2a); border-radius: 999px;
  padding: 6px 18px; transition: all .2s ease; display: inline-flex; align-items: center; gap: 6px;
}
.adp-card-more:hover, .adp-card-more:focus { background: var(--brand, #c34f2a); color: #fff; }
.adp-arrow { display: inline-block; }

/* ===== v2.3 polish ===== */
.article-info-term { display: none !important; }
ul.tags.list-inline { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
ul.tags.list-inline .btn { border-radius: 999px; padding: 5px 14px; font-size: .88rem; }
.store-card { padding: 8px 4px; }
.store-card .store-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; color: var(--ink, #10233f); }
.store-card .store-lead { font-size: .92rem; color: var(--muted, #456); margin: 0 0 14px; }
.store-card .store-grid { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.store-card .store-item { width: min(44%, 190px); text-align: center; margin: 0; }
.store-card .store-item img { max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 18px rgba(10,30,60,.14); }
.store-card .store-item figcaption { font-size: .8rem; color: var(--muted, #456); margin-top: 6px; }
.store-card .store-cta { text-align: center; margin: 16px 0 0; }
.com-content-category-blog .item-image img, .blog .item-image img { max-width: min(100%, 230px); height: auto; border-radius: 10px; }
.com-content-category-blog .blog-item, .blog .blog-item { min-height: 0; }
.store-books, .duo-grid > .store-books { grid-column: 1 / -1; }
.duo-grid .store-books .store-card { max-width: 780px; margin: 0 auto; text-align: center; }


/* ===== a11y: hidden text helper (Joomla core.css is not loaded in this template) ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ===== language switcher (header2) ===== */
.brand-logo .mod-languages {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.mod-languages .lang-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mod-languages .lang-inline li {
  margin: 0;
  line-height: 0;
}
.mod-languages .lang-inline li.lang-active { background: none; }
.mod-languages .lang-inline a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  opacity: .75;
}
.mod-languages .lang-inline a:hover { opacity: 1; background: rgba(0,0,0,.05); }
.mod-languages .lang-inline li.lang-active a { opacity: 1; box-shadow: inset 0 0 0 2px var(--brand, #0d6efd); }
.mod-languages .lang-inline img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
@media (max-width: 767px) {
  .mod-languages .lang-inline { gap: 4px; }
  .mod-languages .lang-inline a { padding: 6px; }
}
