/* ==========================================
   SAMAPARDAZ - Main Stylesheet
   تم: سرمه‌ای و زرد مایل به نارنجی
   ========================================== */

/* --- Font Face --- */
@font-face {
  font-family: 'RavaghFanum';
  src: url('../fonts/ravaghfanum-regular.woff2') format('woff2'),
       url('../fonts/ravaghfanum-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'RavaghFanum';
  src: url('../fonts/ravaghfanum-bold.woff2') format('woff2'),
       url('../fonts/ravaghfanum-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  --navy: #0d1b3e;
  --navy-dark: #08112a;
  --navy-mid: #132347;
  --navy-light: #1a2f5e;
  --gold: #f68b0d;
  --gold-light: #f9a64a;
  --gold-dark: #d97506;
  --white: #ffffff;
  --white-80: rgba(255,255,255,0.8);
  --white-60: rgba(255,255,255,0.6);
  --white-10: rgba(255,255,255,0.1);
  --font-main: 'RavaghFanum', 'Vazirmatn', 'Tahoma', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto; /* JS handles scroll */
}

body {
  font-family: var(--font-main);
  direction: rtl;
  background-color: #ffffff;
  color: var(--navy-dark);
  /* clip (نه hidden) تا position: sticky هیرو کار کند */
  overflow-x: clip;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f0f0f0;
}
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  padding: 0 40px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  border-bottom: none;
  transition: box-shadow var(--transition);
}

.site-header,
.site-header.scrolled {
  background: #ffffff;
  background-image: none;
  box-shadow: none;
}

/* Logo */
.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 60px;
  width: auto;
  max-width: 195px; /* نصف 390 */
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: clamp(24px, calc(100vw - 1141px), 195px); /* حداکثر به اندازهٔ عرض لوگو (195px) فاصله از لوگو؛ در عرض‌های کمتر کم می‌شود تا منو جا شود */
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: var(--navy-dark);
  font-family: var(--font-main);
  font-size: 1.025rem;
  font-weight: 400;
  white-space: nowrap;
  transition: color var(--transition);
  position: relative;
  cursor: pointer;
}

/* Animated underline on hover */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 14px;
  left: 14px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-dark);
}

/* Dropdown arrow — آیکون فلش مورب؛ با hover به بیرون می‌پرد و از سمت مقابل برمی‌گردد */
.nav-link .arrow {
  display: inline-flex;
  width: 14px;
  height: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.nav-link .arrow svg { display: block; transition: transform .3s ease; }
.nav-item:hover .nav-link .arrow svg { animation: arrow-fly .55s cubic-bezier(.3,.7,.3,1) both; }
@keyframes arrow-fly {
  0%   { transform: translate(0, 0); }
  45%  { transform: translate(-16px, -16px); }
  46%  { transform: translate(16px, 16px); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .nav-item:hover .nav-link .arrow svg { animation: none; } }

/* ---- Mega dropdown: نوار باریک افقی با پس‌زمینه سفید ---- */
.dropdown {
  position: fixed;
  top: 100px; /* دقیقاً زیر هدر */
  right: 0;
  left: 0;
  white-space: nowrap;
  background: #ffffff;
  border: none;
  border-top: 1px solid rgba(13,27,62,0.08);
  border-bottom: 1px solid rgba(13,27,62,0.08);
  border-radius: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  box-shadow: none;
  background-image: none;
  z-index: 998;
  /* آیتم‌ها افقی کنار هم */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start; /* فارسی: راست‌چین، انگلیسی: چپ‌چین */
  padding: 0 40px;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  color: var(--navy-dark);
  font-size: 0.945rem;
  font-family: var(--font-main);
  border-left: none;
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.dropdown-item:last-child {
  border-left: none;
}

/* مربع طلایی کوچک کنار نوشته هنگام hover */
.dropdown-item::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 1px;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* نشانگر به‌صورت معلق کنار متن تا اولین آیتم دقیقاً هم‌خط لبهٔ منوی والد شروع شود */
.dropdown-item::before { position: absolute; inset-inline-start: -15px; top: 50%; margin-top: -3.5px; }

/* زیرمنو از همان نقطهٔ لبهٔ آیتم والد شروع می‌شود (مقدار --dd-start با nav.js محاسبه می‌شود) */
@media (min-width: 1281px) {
  .dropdown { padding-inline: var(--dd-start, 40px) 40px; }
  .dropdown .dropdown-item:first-child { padding-inline-start: 0; }
}

.dropdown-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

.dropdown-item:hover {
  background: transparent;
  color: var(--gold-dark);
}

.dropdown-item.active {
  color: var(--gold-dark);
  font-weight: 700;
}

.dropdown-item.active::before {
  opacity: 1;
  transform: scale(1);
}

/* لینک دموی نرم‌افزار — برجسته */
.nav-link-demo {
  background: var(--gold);
  color: var(--navy-dark) !important;
  font-weight: 700 !important;
  border-radius: 50px;
  padding: 8px 18px !important;
  margin-right: 4px;
  transition: background var(--transition), transform 0.2s, box-shadow 0.2s !important;
}

.nav-link-demo:hover {
  background: var(--gold-light);
  color: var(--navy-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(246,139,13,0.35);
}

.nav-link-demo::after {
  display: none !important;
}

/* Mobile menu toggle — بدون کادر و پس‌زمینه؛ سه خط با کلیک به ضربدر تبدیل می‌شود */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-inline-start: auto;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.menu-toggle span {
  position: absolute;
  left: 9px;
  width: 26px;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: transform .45s cubic-bezier(.68,-.35,.27,1.35), opacity .25s ease, top .3s ease .12s, width .35s ease, background .3s ease;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 21px; width: 18px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-toggle:hover span:nth-child(2) { width: 26px; }
.menu-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.menu-toggle.is-open span { transition: top .25s ease, transform .45s cubic-bezier(.68,-.35,.27,1.35) .15s, opacity .2s ease, background .3s ease; background: var(--gold-dark); }
.menu-toggle.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .menu-toggle span, .menu-toggle.is-open span { transition: none; } }

/* ==========================================
   PAGE TRANSITION & LOADER
   ========================================== */

/* باز شدن صفحه‌ها: fade ساده (جایگزین page-transition قبلی) */
@keyframes sp-page-fade { from { opacity: 0; } to { opacity: 1; } }
html { animation: sp-page-fade .45s ease-out; }
@media (prefers-reduced-motion: reduce) { html { animation: none; } .page-hero-eyebrow, .page-hero-title { animation: none; } }

/* ==========================================
   INNER PAGE HERO (non-home pages)
   ========================================== */

.page-hero {
  position: relative;
  height: 460px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  padding-right: 80px;
  overflow: hidden;
  background: linear-gradient(120deg, #0f1a4d, #162560, #1d3c7d, #1f4fa8, #2a6bd1, #1d3c7d, #161e8b, #0f1a4d);
  background-size: 400% 400%;
  animation: hero-gradient-shift 18s ease-in-out infinite;
}

@keyframes hero-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .page-hero { animation: none; }
}

/* canvas موج — توسط wave-mesh.js ساخته می‌شود */
.page-hero > .wave-mesh-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
  z-index: 0;
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero-eyebrow {
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  animation: hero-text-in 0.8s 0.2s cubic-bezier(.22,.61,.36,1) backwards;
}

.page-hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  animation: hero-text-in 0.8s 0.4s cubic-bezier(.22,.61,.36,1) backwards;
}

.page-hero-title span {
  color: var(--gold);
}

/* Breadcrumb */
.breadcrumb {
  position: absolute;
  bottom: 20px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--white-60);
  direction: rtl;
  z-index: 2;
}

.breadcrumb a {
  color: var(--white-60);
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--gold); }

/* ==========================================
   SECTIONS & LAYOUT
   ========================================== */

.section {
  position: relative;
  padding: 100px 80px;
  overflow: hidden;
}

.section-alt {
  background: #f5f7fb;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  color: #162560; /* سرمه‌ای */
}

.section-title span {
  color: var(--gold);
}

.section-desc {
  font-size: 1rem;
  color: rgba(13,27,62,0.65);
  max-width: 600px;
  line-height: 1.9;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.anim-fade-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }
.anim-delay-6 { transition-delay: 0.6s; }

.in-view {
  opacity: 1 !important;
  /* transform توسط JS پارالکس کنترل می‌شه — !important حذف شد */
  transform: none;
}

/* ==========================================
   CARDS
   ========================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(13,27,62,0.1);
  border-radius: 16px;
  padding: 36px 28px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to left, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.card:hover {
  background: #fffdf7;
  border-color: rgba(246,139,13, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(13,27,62,0.1);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(246,139,13, 0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.6rem;
  transition: background 0.3s, transform 0.3s;
}

.card:hover .card-icon {
  background: rgba(246,139,13, 0.22);
  transform: scale(1.1);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy-dark);
}

.card-text {
  font-size: 0.9rem;
  color: rgba(13,27,62,0.6);
  line-height: 1.8;
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
  background: #ffffff;
  border-top: 1px solid rgba(13, 27, 62, 0.1);
  padding: 70px 80px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-logo img { height: 62px; width: auto; margin-bottom: 20px; }
.footer-about { font-size: 1rem; color: rgba(13,27,62,0.6); line-height: 1.9; }
.footer-tagline { font-size: 1rem; color: rgba(13,27,62,0.6); line-height: 1.9; margin-top: 4px; }
.footer-col-title {
  font-size: 1.05rem; font-weight: 700; color: var(--navy-dark);
  margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--gold);
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.97rem; color: rgba(13,27,62,0.6); transition: color 0.2s, padding-right 0.2s; }
.footer-links a:hover { color: var(--gold-dark); padding-right: 6px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 0.97rem; color: rgba(13,27,62,0.65); }
.footer-contact-item .icon { display: inline-flex; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.footer-contact-item a { color: inherit; }
.footer-contact-item a:hover { color: var(--gold-dark); }
.footer-bottom { padding-top: 0; margin-bottom: 8px; display: flex; align-items: center; justify-content: flex-start; font-size: 0.88rem; color: rgba(13,27,62,0.5); }
.site-footer { overflow: hidden; padding-bottom: 0; }
.footer-wordmark { display: block; width: calc(100% + 160px); max-width: none; margin: 0 -80px; height: auto; aspect-ratio: 7.14; user-select: none; opacity: .55; transition: opacity .6s ease, filter .6s ease; }
/* فضای خالیِ بالای خودِ فایل svg (حدود ۲٫۳٪ عرض) حذف می‌شود تا فاصله‌ی متن‌ها با آن کم شود */
.site-footer .footer-wordmark { margin-top: -1.9vw; }
/* با رفتن موس روی آن: آرام و پیوسته بین کم‌رنگ و پررنگ می‌رود؛ با خروج موس نرم به حالت اول برمی‌گردد */
.footer-wordmark:hover { animation: wmBreathe 3.4s ease-in-out infinite; }
@keyframes wmBreathe { 0%, 100% { opacity: .4; filter: brightness(1); } 50% { opacity: 1; filter: brightness(.58); } }
@media (prefers-reduced-motion: reduce) { .footer-wordmark { transition: none; } .footer-wordmark:hover { animation: none; opacity: 1; filter: brightness(.62); } }
.footer-social { display: flex; gap: 18px; margin-top: 20px; }
.social-link { display: flex; align-items: center; justify-content: center; color: rgba(13,27,62,0.5); transition: color 0.2s; }
.social-link:hover { color: var(--gold-dark); }
.social-link svg { display: block; width: 28px; height: 28px; }

/* ==========================================
   PARALLAX DECORATIONS
   ========================================== */

.parallax-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.blob-gold {
  background: radial-gradient(circle, rgba(246,139,13,0.15) 0%, transparent 70%);
}

.blob-navy {
  background: radial-gradient(circle, rgba(26,47,94,0.5) 0%, transparent 70%);
}

/* ==========================================
   KEYFRAMES
   ========================================== */

/* ورود عنوان هیرو: حالت پایانی همان استایل عادی است، پس حتی بدون اجرای انیمیشن دیده می‌شود */
@keyframes hero-text-in { from { opacity: 0; transform: translateY(24px); } }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246,139,13,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(246,139,13,0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
  .section { padding: 80px 50px; }
  .site-header { padding: 0 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding-right: 50px; }
  .breadcrumb { left: 50px; }
}

@media (max-width: 768px) {
  .site-header { padding: 0 20px; }


  .section { padding: 60px 20px; }
  .page-hero { padding-right: 20px; height: 360px; }
  .breadcrumb { left: 20px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .site-footer { padding: 50px 20px 0; }
  .footer-wordmark { width: calc(100% + 40px); max-width: none; margin: 0 -20px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* منوی زیرمجموعهٔ هدر: همیشه سفید ساده، بدون گرادینت/انیمیشن/کانواس */
.dropdown,
.nav-item:hover .dropdown,
.main-nav.open .dropdown {
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}
.dropdown canvas,
.dropdown::before,
.dropdown::after { display: none !important; }

/* کرهٔ شبکه‌ای سفید در سمت چپ هیرو */
.page-hero > .topology-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.page-hero-content, .page-hero > .breadcrumb { position: relative; z-index: 1; }
.page-hero > .breadcrumb { position: absolute; }

/* مسیر صفحه هم‌خط تیتر (سمت چپ) */
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: nowrap; }
.title-row > .section-title { min-width: 0; }
.title-row > .section-title { margin: 0; }
.breadcrumb.breadcrumb-inline {
  position: static;
  font-size: 0.95rem;
  color: rgba(13,27,62,0.65);
  white-space: nowrap;
}
.breadcrumb.breadcrumb-inline a { color: rgba(13,27,62,0.65); }
.breadcrumb.breadcrumb-inline a:hover { color: var(--gold-dark); }
.breadcrumb.breadcrumb-inline .sep { color: var(--gold); }

/* جلوگیری از بیرون‌زدن رنگ/بوم باکس هیرو از کادرش (آرتیفکت رندر) */
.page-hero { contain: paint; isolation: isolate; clip-path: inset(0); }
.page-hero > .topology-canvas { transform: translateZ(0); }

/* زبانهٔ آبی سمت چپ (ادامهٔ هیرو تا خط کرسی مسیر صفحه) */
:root { --tab-w: 80px; --tab-h: 150px; }
@media (max-width: 1024px) { :root { --tab-w: 50px; --tab-h: 130px; } }
@media (max-width: 768px) { :root { --tab-w: 20px; --tab-h: 110px; } }
.hero-tab-wrap { position: relative; height: 0; z-index: 3; pointer-events: none; }
.hero-tab {
  position: absolute; left: 0; right: 0; top: 0; height: var(--tab-h);
  background: linear-gradient(120deg, #0f1a4d, #162560, #1d3c7d, #1f4fa8, #2a6bd1, #1d3c7d, #161e8b, #0f1a4d);
  animation: hero-tab-shift 18s ease-in-out infinite;
  clip-path: inset(0 calc(100% - var(--tab-w)) 0 0);
}
@keyframes hero-tab-shift {
  0%   { background-position-x: 0%; }
  50%  { background-position-x: 100%; }
  100% { background-position-x: 0%; }
}
.baseline-probe { display: inline-block; width: 0; height: 0; }
@media (prefers-reduced-motion: reduce) { .hero-tab { animation: none; } }

.hero-tab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* topology canvas داخل page-hero را clip می‌کند */
.page-hero { clip-path: inset(0); }

/* مسیر صفحه روی انتهای زبانه (در همهٔ صفحات یک جا) */
.hero-tab-wrap > .breadcrumb.breadcrumb-inline {
  position: absolute; top: var(--tab-h); left: calc(var(--tab-w) + 8px); bottom: auto;
  transform: translateY(-100%); line-height: 1.3;
  font-size: 0.95rem; white-space: nowrap; pointer-events: auto; z-index: 4;
}
@media (max-width: 768px) {
  .hero-tab-wrap { height: 42px; }
  .hero-tab { height: 42px; }
  .hero-tab-wrap > .breadcrumb.breadcrumb-inline {
    top: 0;
    left: calc(var(--tab-w) + 10px);
    bottom: auto;
    transform: none;
    font-size: 0.75rem;
    line-height: 42px;
    white-space: normal;
    max-width: calc(100% - var(--tab-w) - 20px);
    overflow-wrap: anywhere;
  }
}

/* خطوط سفید افقی (overlay) روی گرادینت آبی هیرو و زبانهٔ کناری — در همهٔ صفحات */
.page-hero::after,
.hero-tab::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(to bottom,
    rgba(255,255,255,0) 0, rgba(255,255,255,0) 3px,
    rgba(255,255,255,0.055) 3px, rgba(255,255,255,0.055) 4px);
}
.page-hero-content, .page-hero > .breadcrumb { z-index: 3; }
.page-hero-eyebrow, .page-hero-title { opacity: 1; visibility: visible; }

/* ==========================================
   MOBILE: no sideways scrolling (decorative blobs / bands can extend past the screen)
   `clip` (unlike `hidden`) keeps position:sticky headers working
   ========================================== */
html { overflow-x: hidden; max-width: 100%; } /* hidden روی html (به viewport منتقل می‌شود): جلوی پهن شدن صفحه توسط بلاب‌های تزئینی را می‌گیرد و sticky خراب نمی‌شود */
body { overflow-x: clip; max-width: 100%; }
img, video, svg { max-width: 100%; }

/* Phones/tablets: the blurred decorative blobs are positioned off-screen and widen the page; hide them there */
@media (max-width: 768px) {
  .parallax-blob { display: none; }
}

/* متن فقط برای موتور جستجو و screen reader */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* لینک‌های مرتبط (لینک‌سازی داخلی) */

/* منوی همبرگری تا عرض ۱۲۸۰: منوی بزرگ‌تر جا نمی‌شود */
@media (max-width: 1280px) {
  .site-header { height: 84px; padding: 0 20px; }
  .main-nav,
  .nav-cta {
    display: none;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 84px;
    right: 0;
    left: 0;
    bottom: 0;
    background: #ffffff;
    padding: 30px 20px;
    overflow-y: auto;
    z-index: 999;
    gap: 0;
  }

  .main-nav.open .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(13,27,62,0.08);
  }

  .main-nav.open .nav-link {
    padding: 16px 0;
    width: 100%;
    font-size: 1rem;
    color: var(--navy-dark);
  }

  .main-nav.open .nav-link::after { display: none; }

  .main-nav.open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: #ffffff;
    border: none;
    border-top: none;
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
  }

  .main-nav.open .dropdown-item {
    border-left: none;
    border-bottom: none;
    padding-right: 16px;
    color: var(--navy-dark);
    z-index: 1;
  }

  .menu-toggle { display: block; }
  .main-nav { margin-inline-start: 0; }
}

/* بلاب‌های تزئینی position:absolute هستند ولی والدشان static است، پس overflow والد جلویشان را نمی‌گیرد
   و صفحه را ~۱۵۰px پهن‌تر می‌کردند (اسکرین‌شات تمام‌صفحه با یک طرف سفید). اینجا داخل عرض صفحه نگه داشته می‌شوند. */
.parallax-blob.blob-navy { right: 0 !important; }
.parallax-blob.blob-gold { left: 0 !important; }
.parallax-blob.blob-gold[style*="left:50%"] { left: 50% !important; }
