/* =========================================================
   گروه سرمایه‌گذاری سایپا - صفحات داخلی
   (اخبار، صفحات ثابت، فرم‌ها، ویدیوها، جستجو، خطا)
   بر پایه همان پالت و اجزای style.css
   ========================================================= */

/* ---------- بنر بالای صفحات داخلی (هدر روی آن شناور است) ---------- */
.page-hero {
  position: relative;
  padding: 150px 0 46px;
  color: #fff;
  background:
    radial-gradient(1200px 300px at 85% -10%, rgba(63, 169, 245, .25), transparent 60%),
    linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-navy-2) 55%, var(--brand-blue) 100%);
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue-light), var(--brand-accent));
}
.page-hero .page-title { position: relative; z-index: 2; }
.page-hero h1 {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.6;
  text-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}
.page-hero .page-sub { margin: 0; opacity: .85; font-size: .95rem; }
.page-hero .page-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: .85rem; opacity: .9; margin-top: 6px;
}
.page-hero .page-meta span { display: inline-flex; align-items: center; gap: 6px; }

.page-hero .breadcrumb {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, .55);
  --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .8);
  font-size: .82rem;
  margin-bottom: 12px;
}
.page-hero .breadcrumb a { color: #fff; opacity: .9; }
.page-hero .breadcrumb a:hover { color: var(--brand-blue-light); opacity: 1; }
/* جداکننده بوت‌استرپ در RTL */
.page-hero .breadcrumb-item + .breadcrumb-item::before { float: right; padding-left: var(--bs-breadcrumb-item-padding-x); padding-right: 0; }

/* ---------- بدنه صفحات داخلی ---------- */
.page-section { padding: 50px 0 60px; background-color: var(--brand-bg); }
.page-section.alt { background-color: var(--brand-bg-alt); }

.content-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(11, 37, 69, .08);
  padding: 35px;
}
@media (max-width: 767.98px) { .content-card { padding: 22px 18px; } }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid #e3e8f0;
  padding-bottom: 12px; margin-bottom: 22px;
}
.section-head h2, .section-head h3 {
  font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--brand-navy);
  display: flex; align-items: center; gap: 8px;
}

/* ---------- محتوای ویرایشگر (پست، صفحه، ویدیو) ---------- */
.post-content { line-height: 2.1; color: #333; font-size: 1rem; text-align: justify; overflow-wrap: anywhere; }
.post-content > *:first-child { margin-top: 0; }
.post-content h2, .post-content h3, .post-content h4 {
  color: var(--brand-navy); font-weight: 700; line-height: 1.7; margin: 1.8rem 0 .8rem;
}
.post-content h2 { font-size: 1.35rem; }
.post-content h3 { font-size: 1.15rem; }
.post-content h4 { font-size: 1.02rem; }
.post-content p { margin-bottom: 1rem; }
.post-content a { color: var(--brand-blue); font-weight: 600; }
.post-content a:hover { color: var(--brand-accent-dark); }
.post-content img, .post-content video, .post-content iframe { max-width: 100%; height: auto; border-radius: 8px; }
.post-content ul, .post-content ol { padding-right: 1.4rem; padding-left: 0; margin-bottom: 1rem; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote {
  margin: 1.5rem 0; padding: 14px 20px;
  border-right: 4px solid var(--brand-accent);
  background-color: var(--brand-bg);
  border-radius: 6px; color: #555;
}
.post-content table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; font-size: .92rem; }
.post-content table th, .post-content table td { border: 1px solid #e3e8f0; padding: 8px 10px; }
.post-content table th { background-color: var(--brand-bg-alt); color: var(--brand-navy); }
.post-content .table-wrap { overflow-x: auto; }

.featured-image { width: 100%; max-height: 460px; object-fit: cover; border-radius: 10px; margin-bottom: 28px; }

/* ---------- کارت خبر / ویدیو ---------- */
.post-card {
  display: flex; flex-direction: column; height: 100%;
  background-color: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 37, 69, .07);
  transition: .3s; color: inherit;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(11, 37, 69, .15); color: inherit; }
.post-card-img { position: relative; aspect-ratio: 16 / 10; background-color: var(--brand-bg-alt); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-img .placeholder-logo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--brand-navy), var(--brand-blue));
}
.post-card-img .placeholder-logo img { width: 55%; height: auto; object-fit: contain; opacity: .9; transform: none !important; }
.post-card-cat {
  position: absolute; top: 12px; right: 12px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  color: #fff; font-size: .75rem; font-weight: 600;
  padding: 3px 12px; border-radius: 20px;
}
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-date { font-size: .78rem; color: #888; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.post-card-title { font-size: 1rem; font-weight: 700; color: var(--brand-navy); line-height: 1.7; margin-bottom: 8px; }
.post-card:hover .post-card-title { color: var(--brand-blue); }
.post-card-excerpt {
  font-size: .85rem; color: #666; line-height: 1.9; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-more { margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--brand-blue); }

.video-card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 2px solid #fff; color: #fff; font-size: 1.2rem;
  transition: .3s;
}
.post-card:hover .video-card-play { background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark)); border-color: var(--brand-accent); }
.video-card-duration {
  position: absolute; bottom: 10px; left: 10px;
  background-color: rgba(0, 0, 0, .7); color: #fff;
  font-size: .75rem; padding: 2px 8px; border-radius: 4px; direction: ltr;
}

/* ---------- پخش‌کننده ویدیو ---------- */
.video-player-wrap { position: relative; border-radius: 10px; overflow: hidden; background-color: #000; box-shadow: 0 16px 40px rgba(11, 37, 69, .25); }
.video-player-wrap video { display: block; width: 100%; max-height: 72vh; }
.video-player-wrap.video-embed-ratio { aspect-ratio: 16 / 9; }
.video-player-wrap.video-embed-ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-missing { color: #fff; padding: 80px 20px; text-align: center; }

/* ---------- دکمه‌ها ---------- */
.btn-brand {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy-2));
  color: #fff; border: 0; border-radius: 30px;
  padding: .6rem 2rem; font-weight: 600; transition: .3s;
}
.btn-brand:hover, .btn-brand:focus { background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark)); color: #fff; }
.btn-brand-outline {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--brand-blue); color: var(--brand-blue);
  border-radius: 30px; padding: .5rem 1.6rem; font-weight: 600; background: transparent; transition: .3s;
}
.btn-brand-outline:hover { background-color: var(--brand-blue); color: #fff; }

/* ---------- فرم‌ها ---------- */
.site-form .form-label { font-weight: 600; font-size: .9rem; color: var(--brand-navy); margin-bottom: 6px; }
.site-form .form-label .req { color: var(--brand-accent-dark); }
.site-form .form-control, .site-form .form-select {
  border-radius: 8px; border: 1px solid #d9e0ea; padding: .65rem .9rem;
  font-family: inherit; background-color: #fbfcfe;
}
.site-form .form-control:focus, .site-form .form-select:focus {
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 .2rem rgba(63, 169, 245, .18);
  background-color: #fff;
}
.site-form .form-check-input:checked { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.site-form .form-text { font-size: .78rem; }
.site-form .form-check { padding-right: 1.6em; padding-left: 0; }
.site-form .form-check .form-check-input { float: right; margin-right: -1.6em; margin-left: 0; }
.form-intro { color: #555; line-height: 2; margin-bottom: 24px; }

.alert { border-radius: 8px; font-size: .92rem; }

/* ---------- نظرات ---------- */
.comments-wrap { margin-top: 30px; }
.comment-list { margin-bottom: 30px; }
.comment-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px dashed #e2e6ee; }
.comment-item:last-child { border-bottom: 0; }
.comment-item-avatar {
  flex: 0 0 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #bfe4ee, #9fd3e3); color: var(--brand-navy);
  font-weight: 700; font-size: 1.1rem;
}
.comment-item-name { font-weight: 700; color: var(--brand-navy); font-size: .95rem; }
.comment-item-date { font-size: .75rem; color: #999; margin-bottom: 6px; }
.comment-item-text { margin: 0; color: #444; line-height: 1.9; font-size: .9rem; white-space: pre-line; }
.comment-form-note { font-size: .82rem; color: #888; margin-bottom: 18px; }

/* ---------- صفحه‌بندی ---------- */
.site-pagination .pagination { justify-content: center; gap: 6px; flex-wrap: wrap; }
.site-pagination .page-link {
  border: 0; border-radius: 8px !important; min-width: 40px; text-align: center;
  color: var(--brand-navy); background-color: #fff; box-shadow: 0 2px 8px rgba(11, 37, 69, .08);
}
.site-pagination .page-link:hover { color: var(--brand-blue); background-color: #fff; }
.site-pagination .page-item.active .page-link { background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy-2)); color: #fff; }
.site-pagination .page-item.disabled .page-link { background-color: transparent; box-shadow: none; color: #aaa; }
.site-pagination p.small { display: none; } /* "Showing 1 to 8 of …" */

/* ---------- نتایج جستجو ---------- */
.search-box-inline { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 30px; }
.search-box-inline .form-control { border-radius: 30px; padding: .65rem 1.2rem; border: 1px solid #d9e0ea; }
.search-result { padding: 16px 0; border-bottom: 1px dashed #e2e6ee; }
.search-result:last-child { border-bottom: 0; }
.search-result h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; line-height: 1.7; }
.search-result h3 a { color: var(--brand-navy); }
.search-result h3 a:hover { color: var(--brand-blue); }
.search-result .meta { font-size: .76rem; color: #999; margin-bottom: 4px; }
.search-result p { font-size: .86rem; color: #666; margin: 0; line-height: 1.9; }
.search-result mark { background-color: #fde7d3; color: inherit; padding: 0 2px; border-radius: 3px; }

.empty-state { text-align: center; color: #888; padding: 40px 10px; }
.empty-state i { font-size: 2.6rem; color: #c5cfdc; display: block; margin-bottom: 12px; }

/* ---------- صفحه خطا ---------- */
.error-page { text-align: center; padding: 30px 0 10px; }
.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem); font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page p { color: #666; margin: 14px 0 26px; }

/* ---------- دکمه شناور واتس‌اپ ---------- */
.wa-float {
  position: fixed; bottom: 25px; right: 25px; z-index: 999;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background-color: #25d366; color: #fff; font-size: 28px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transition: .3s;
}
.wa-float:hover { color: #fff; transform: translateY(-3px); }

@media (max-width: 767.98px) {
  .page-hero { padding: 125px 0 32px; }
}

/* منوی اصلی در عرض‌های ۱۲۰۰–۱۴۰۰: جلوگیری از دو خطی شدن آیتم‌ها */
@media (min-width: 992px) {
  #mainMenu .nav-link { white-space: nowrap; }
}
@media (min-width: 992px) and (max-width: 1299.98px) {
  #mainMenu .nav-link { padding-left: .55rem !important; padding-right: .55rem !important; font-size: .95rem; }
  #header .logo img { max-width: 210px; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #mainMenu .nav-link { padding-left: .35rem !important; padding-right: .35rem !important; font-size: .85rem; }
  #header .logo img { max-width: 165px; }
}

/* ==========================================================
   لوگوی هدر: نشان + دو خط نام شرکت (متن قابل ویرایش از تنظیمات پنل)
   ========================================================== */
#header .brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
#header .brand-lockup .brand-mark { width: auto; height: 56px; max-width: none; flex: 0 0 auto; }
#header .brand-lockup .brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; color: #fff; }
#header .brand-lockup .brand-line1 { font-weight: 900; font-size: 15px; white-space: nowrap; letter-spacing: -.2px; }
#header .brand-lockup .brand-line1 small { font-size: 9px; font-weight: 400; opacity: .9; margin-inline-start: 2px; }
#header .brand-lockup .brand-line2 {
  font-family: Arial, "Helvetica Neue", sans-serif; font-weight: 700;
  font-size: 11.5px; letter-spacing: .1px; white-space: nowrap; margin-top: 2px;
}
.site-header-overlay.scrolled #header .brand-lockup .brand-text { color: var(--brand-navy); }

@media (min-width: 992px) and (max-width: 1199.98px) {
  #header .brand-lockup .brand-mark { height: 44px; }
  #header .brand-lockup .brand-line1 { font-size: 12.5px; }
  #header .brand-lockup .brand-line2 { font-size: 9.5px; }
}
@media (max-width: 575.98px) {
  #header .brand-lockup { gap: 7px; }
  #header .brand-lockup .brand-mark { height: 40px; }
  #header .brand-lockup .brand-line1 { font-size: 11.5px; }
  #header .brand-lockup .brand-line1 small { font-size: 8px; }
  #header .brand-lockup .brand-line2 { font-size: 9px; }
}

/* ---------- دسته‌بندی‌ها (چیپ‌ها) ---------- */
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.category-chips .chip {
  display: inline-flex; align-items: center; gap: 6px;
  background-color: #fff; color: var(--brand-navy);
  border: 1px solid #dfe5ee; border-radius: 30px;
  padding: 6px 16px; font-size: .88rem; font-weight: 600; transition: .25s;
}
.category-chips .chip:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.category-chips .chip.active { background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy-2)); border-color: transparent; color: #fff; }
.category-chips .chip .count { font-size: .72rem; background-color: var(--brand-bg-alt); color: #667; border-radius: 10px; padding: 0 7px; }
.category-chips .chip.active .count { background-color: rgba(255,255,255,.2); color: #fff; }
.page-hero .page-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.page-hero .page-meta a:hover { color: var(--brand-blue-light); }

/* ---------- reCAPTCHA ---------- */
.recaptcha-box { min-height: 78px; }
.recaptcha-box .g-recaptcha { display: inline-block; }
@media (max-width: 360px) { .recaptcha-box .g-recaptcha { transform: scale(.86); transform-origin: right top; } }
.comments-wrap .is-invalid, .site-form .is-invalid { border-color: #dc3545; }
.site-pagination .pagination-info { text-align: center; font-size: .8rem; color: #888; margin: 10px 0 0; }

/* ==========================================================
   صفحه ویدیو: عنوان (H1) و بلافاصله پخش‌کننده در بالای صفحه
   ========================================================== */
.page-hero.video-watch { padding: 138px 0 30px; background: linear-gradient(180deg, #071a33 0%, var(--brand-navy) 55%, #0d2f57 100%); }
.video-watch .video-watch-inner { max-width: 1100px; }
.video-watch .breadcrumb { font-size: .8rem; --bs-breadcrumb-divider-color: rgba(255,255,255,.5); }
.video-watch .breadcrumb a { color: rgba(255,255,255,.85); }
.video-watch .breadcrumb a:hover { color: var(--brand-blue-light); }
.video-watch .breadcrumb-item + .breadcrumb-item::before { float: right; padding-left: var(--bs-breadcrumb-item-padding-x); padding-right: 0; }
.video-watch .video-title { color: #fff; font-size: clamp(1.15rem, 2.4vw, 1.7rem); font-weight: 700; line-height: 1.6; margin: 0 0 14px; }
.video-watch .video-player-wrap { box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.video-watch .video-player-wrap video { width: 100%; height: auto; max-height: 75vh; background: #000; }
.video-watch .video-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: .85rem; color: rgba(255,255,255,.85); }
.video-watch .video-meta span { display: inline-flex; align-items: center; gap: 6px; }
.video-watch .video-meta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.video-summary { font-size: 1rem; line-height: 2; color: #333; font-weight: 600; }
@media (max-width: 767.98px) {
  .page-hero.video-watch { padding: 112px 0 22px; }
  .video-watch .container.video-watch-inner { padding-left: 0; padding-right: 0; }
  .video-watch .breadcrumb, .video-watch .video-title, .video-watch .video-meta { padding: 0 14px; }
  .video-watch .video-player-wrap { border-radius: 0; }
}

/* ویدیوهای دیگر (ستون کناری) */
.related-videos .related-video { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e2e6ee; color: inherit; }
.related-videos .related-video:last-of-type { border-bottom: 0; }
.related-videos .thumb { position: relative; flex: 0 0 140px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--brand-bg-alt); }
.related-videos .thumb > img { width: 100%; height: 100%; object-fit: cover; }
.related-videos .thumb .placeholder-logo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand-navy), var(--brand-blue)); }
.related-videos .thumb .placeholder-logo img { width: 70%; }
.related-videos .thumb > i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 1rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.related-videos .thumb .dur { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: .68rem; padding: 0 5px; border-radius: 3px; direction: ltr; }
.related-videos .info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.related-videos .info .t { font-size: .88rem; font-weight: 700; color: var(--brand-navy); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-videos .related-video:hover .t { color: var(--brand-blue); }
.related-videos .info .d { font-size: .74rem; color: #999; }

/* ==========================================================
   صفحه تماس با ما
   ========================================================== */
.contact-cards .contact-card {
  display: flex; gap: 16px; align-items: flex-start; height: 100%;
  background-color: #fff; border-radius: 10px; padding: 22px;
  box-shadow: 0 6px 20px rgba(11, 37, 69, .07); border-top: 3px solid transparent; transition: .3s;
}
.contact-cards .contact-card:hover { border-top-color: var(--brand-accent); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11, 37, 69, .12); }
.contact-cards .ic {
  flex: 0 0 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy-2)); color: #fff; font-size: 22px;
}
.contact-cards h2 { font-size: 1rem; font-weight: 700; color: var(--brand-navy); margin: 4px 0 8px; }
.contact-cards p { margin: 0 0 4px; color: #444; font-size: .92rem; line-height: 1.9; }
.contact-cards p.sub { color: #666; font-size: .85rem; }
.contact-cards p .fa-solid, .contact-cards p .fa-regular { color: var(--brand-blue); margin-left: 4px; }
.contact-cards a { color: var(--brand-navy); font-weight: 600; }
.contact-cards a:hover { color: var(--brand-blue); }

.map-card { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(11, 37, 69, .12); background: var(--brand-bg-alt); }
.map-card iframe { display: block; width: 100%; height: 420px; border: 0; }
.map-card .map-open {
  position: absolute; bottom: 16px; right: 16px; display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark)); color: #fff;
  padding: 8px 18px; border-radius: 30px; font-size: .85rem; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.map-card .map-open:hover { color: #fff; filter: brightness(1.05); }
@media (max-width: 767.98px) { .map-card iframe { height: 300px; } }
/* ایمیل با ارقام لاتین (فونت سهیل ارقام را فارسی نمایش می‌دهد) */
a[href^="mailto:"] { font-family: Tahoma, Arial, sans-serif; }

/* ==========================================================
   گالری تصاویر
   ========================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.gallery-item { margin: 0; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(11, 37, 69, .07); display: flex; flex-direction: column; }
.gallery-link { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-bg-alt); cursor: zoom-in; }
.gallery-link img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.gallery-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(11, 37, 69, .55), rgba(15, 95, 166, .45)); opacity: 0; transition: opacity .35s; }
.gallery-zoom {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .95); color: var(--brand-navy); font-size: 1.3rem;
  transform: translate(-50%, -50%) scale(.4); opacity: 0;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .3s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.gallery-link:hover img, .gallery-link:focus-visible img { transform: scale(1.1); filter: saturate(1.1); }
.gallery-link:hover::after, .gallery-link:focus-visible::after { opacity: 1; }
.gallery-link:hover .gallery-zoom, .gallery-link:focus-visible .gallery-zoom { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.gallery-link:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: -3px; }
.gallery-item figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gallery-item .cap { font-size: .9rem; color: #333; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-item .dt { font-size: .78rem; color: #888; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 575.98px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .gallery-item figcaption { padding: 8px 10px 10px; } .gallery-item .cap { font-size: .8rem; } }

/* Lightbox */
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(4, 12, 26, .94); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; padding: 60px 80px; }
.lightbox.open { opacity: 1; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-width: 120px; min-height: 120px; }
.lb-img { max-width: calc(100vw - 180px); max-height: calc(100vh - 190px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); transition: opacity .25s; user-select: none; }
.lightbox.loading .lb-img { opacity: .25; }
.lb-spinner { position: absolute; width: 42px; height: 42px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: lbspin .8s linear infinite; opacity: 0; }
.lightbox.loading .lb-spinner { opacity: 1; }
@keyframes lbspin { to { transform: rotate(360deg); } }
.lb-caption { color: #fff; text-align: center; margin-top: 14px; max-width: 760px; display: flex; flex-direction: column; gap: 6px; }
.lb-text { font-size: 1rem; line-height: 1.9; }
.lb-meta { display: flex; justify-content: center; gap: 18px; font-size: .82rem; color: rgba(255, 255, 255, .7); }
.lb-btn { position: absolute; z-index: 2; border: 0; color: #fff; background: rgba(255, 255, 255, .12); width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; transition: .2s; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { background: var(--brand-accent); outline: none; }
.lb-close { top: 18px; left: 18px; }
.lb-prev { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 767.98px) {
  .lightbox { padding: 60px 10px 20px; }
  .lb-img { max-width: calc(100vw - 20px); max-height: calc(100vh - 220px); }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; width: 46px; height: 46px; }
  .lb-close { top: 12px; left: 12px; }
}

/* ==========================================================
   منوی بالا: زیرمنوها نباید زیر محتوای صفحه بروند یا بریده شوند
   (بنر صفحات داخلی و اسلایدر صفحه اصلی overflow:hidden داشتند)
   ========================================================== */
.page-hero { overflow: visible; z-index: 20; }
.hero-viewport { overflow: visible; z-index: 20; }
.hero-viewport .main-slider { overflow: hidden; }
main { position: relative; z-index: 1; }
#mainMenu .dropdown-menu { z-index: 1050; }
/* زیرمنوی سطح سوم وقتی جا ندارد به سمت دیگر باز شود (کلاس با assets/js/site.js) */
#mainMenu .dropdown-submenu.open-end > .dropdown-menu { right: auto; left: 100%; }
@media (max-width: 991.98px) {
  #mainMenuCollapse { max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------- صفحه اصلی: عنوان ستون‌های مطالب (h2 برای ساختار درست سرتیترها) ---------- */
.new-reports .head h2 {
  font-size: 1.1rem; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 8px; color: var(--brand-navy);
}

/* ---------- لوگوهای همکار در موبایل: هر اسلاید یک لوگو ---------- */
.saipa-links .logos-single .logos-row { justify-content: center; flex-wrap: nowrap; }
.saipa-links .logos-single .logos-row .item { width: 220px; height: 120px; }
.saipa-links .logos-single .logos-row .item img { max-height: 90px; }
.saipa-links .logos-single .carousel-control-prev { right: 0; }
.saipa-links .logos-single .carousel-control-next { left: 0; }

/* ---------- محتوای قدیمی ساخته‌شده با ویرایشگر قبلی (Quill) ---------- */
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-right { text-align: right; }
.post-content .ql-align-left { text-align: left; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-direction-rtl { direction: rtl; }
.post-content .ql-indent-1 { padding-right: 2em; }
.post-content .ql-indent-2 { padding-right: 4em; }
.post-content .ql-indent-3 { padding-right: 6em; }
.post-content .text-justify { text-align: justify; }
