.hero h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
  margin-bottom: 20px;
}

.hero-btn {
  background: #007bff;
  color: #fff;
  padding: 12px 25px;
  border-radius: 8px;
  display: inline-block;
}

.service-card {
  background: #fff;
  padding: 20px;
  margin: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* دو باکس زیر نقشه: امکانات پلتفرم + فضای تبلیغاتی خودتان */
#services {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 20px;
  box-sizing: border-box;
}

.feature-box,
.ad-box {
  flex: 1 1 320px;
  /* ارتفاع ثابت ۳۰۰px (دسکتاپ) برای طراحی بنرهای تبلیغاتی با اندازه‌ی مشخص؛
     در ≤۸۶۰px به auto برمی‌گردد */
  height: 300px;
  box-sizing: border-box;
  background: var(--card);
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

/* سایه‌ی «کاغذ بلندشده» زیر سه باکس اصلی (نقشه، معرفی پلتفرم، تبلیغ) — الهام از
   medu.gov.ir، ولی با CSS خالص (آن‌جا یک تصویر PNG است): زیر لبه‌ی پایین تیره‌تر
   و در دو طرف پررنگ‌تر، رو به پایین و دو سر محو. */
.feature-box,
.ad-box {
  position: relative;
}

#map-stage::after,
.feature-box::after,
.ad-box::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 4%;
  left: 4%;
  height: 22px;
  pointer-events: none;
  /* نوار تیره که رو به پایین کم‌رنگ می‌شود؛ ماسک اول وسطِ پایینش را بیضی‌وار
     می‌بُرد (وسط نازک و چسبیده به باکس، دو طرف ضخیم) و ماسک دوم دو سر را محو
     می‌کند. تاری کم تا لبه‌ها واضح بمانند. */
  background: linear-gradient(to bottom, rgba(24, 14, 46, 0.62), rgba(24, 14, 46, 0.22) 55%, transparent);
  -webkit-mask-image:
    radial-gradient(60% 80% at 50% 100%, transparent 79%, #000 100%),
    linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(60% 80% at 50% 100%, transparent 79%, #000 100%),
    linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
  filter: blur(3.25px);
}

.feature-box h2 {
  position: relative;
  margin: 0 0 8px;
  padding-bottom: 7px;
  font-size: 16px;
  text-align: center;
  color: var(--brand-deep);
}

/* خط گرادیان لوگو زیر عنوان وسط‌چین */
.feature-box h2::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  transform: translateX(-50%);
  background: var(--grad);
}

/* ۴ بنر عمودی توانمندی‌ها: نوار افقی با scroll-snap. min-width:0 روی
   .feature-box لازم است وگرنه عرض محتوای اسکرولی، آیتم فلکس را پهن می‌کند. */
.feature-box {
  min-width: 0;
  /* حاشیه‌ی گرادیان لوگو (کم‌رنگ) با ترفند padding-box/border-box تا
     border-radius حفظ شود (border-image گوشه‌ی گرد را خراب می‌کند). */
  border-color: transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(47, 208, 255, 0.6), rgba(153, 101, 253, 0.45), rgba(255, 1, 255, 0.5)) border-box;
}

.fb-strip {
  --fb-w: 121px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding: 4px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}

.fb-strip::-webkit-scrollbar {
  display: none;
}

.fb-strip.at-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.fb-strip:focus-visible {
  outline: 3px solid #2fd0ff;
  outline-offset: 2px;
  border-radius: 16px;
}

/* وقتی همه‌ی کارت‌ها جا می‌شوند (دسکتاپ، باکس تمام‌عرض): وسط‌چین، بدون محوشدگی
   لبه و بدون دکمه‌ها/نقطه‌ها. فقط در حالت is-fit (بدون اسکرول) وسط‌چین می‌شود تا
   در حالت اسکرول کارت اول بریده نشود. کلاس را js/feature-banners.js می‌گذارد. */
.fb-strip.is-fit {
  justify-content: center;
  -webkit-mask-image: none;
  mask-image: none;
}

.feature-box:has(.fb-strip.is-fit) .fb-controls { display: none; }

.fb-card {
  position: relative;
  flex: 0 0 var(--fb-w);
  aspect-ratio: 9 / 14;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  scroll-snap-align: start;
  color: #fff;
  box-shadow: 0 4px 10px rgba(60, 30, 100, 0.2);
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fb-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 80% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    var(--fb-bg);
}

.fb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(60, 30, 100, 0.26);
}

.fb-card--data   { --fb-bg: linear-gradient(160deg, #1fa9d6 0%, #6d3ae0 55%, #2a1466 100%); }
.fb-card--search { --fb-bg: linear-gradient(160deg, #9965fd 0%, #6d3ae0 50%, #3a1780 100%); }
.fb-card--route  { --fb-bg: linear-gradient(160deg, #b43ad8 0%, #5a26b8 55%, #230f52 100%); }
.fb-card--modes  { --fb-bg: linear-gradient(160deg, #0b8fc0 0%, #4a2aa8 50%, #1e0f4a 100%); }
.fb-card--secure { --fb-bg: linear-gradient(160deg, #3b1f7a 0%, #1e1044 55%, #0d0624 100%); }

.fb-art {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 10px 0;
  box-sizing: border-box;
}

.fb-text {
  padding: 6px 10px 11px;
  background: linear-gradient(180deg, transparent, rgba(10, 4, 20, 0.35));
}

.fb-tag {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(47, 208, 255, 0.18);
  border: 1px solid rgba(47, 208, 255, 0.55);
  color: #a8f0ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  direction: ltr;
}

.fb-card h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  text-wrap: balance;
}

/* بنر ۱: نقشه‌ی ایران + شبکه‌ی شهرها */
.fb-iran {
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.fb-links line {
  stroke: rgba(47, 208, 255, 0.55);
  stroke-width: 0.9;
  stroke-dasharray: 2 2.5;
}

.fb-city {
  fill: #2fd0ff;
  animation: fb-twinkle 2.8s ease-in-out infinite var(--d);
}

.fb-city--cap {
  fill: #fff;
  stroke: #2fd0ff;
  stroke-width: 1.6;
}

/* بنر ۲: جست‌وجو */
.fb-grid path {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  fill: none;
}

.fb-searchbar {
  fill: #fff;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.fb-typing {
  fill: #e4dcfb;
  transform-origin: 66px 29px;
  animation: fb-type 2.6s ease-in-out infinite;
}

.fb-pin {
  fill: #2fd0ff;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3));
}

.fb-ripple {
  fill: none;
  stroke: rgba(47, 208, 255, 0.8);
  stroke-width: 2;
  transform-origin: 100px 130px;
  transform-box: view-box;
  animation: fb-ripple 2.4s ease-out infinite;
}

.fb-ripple--2 {
  animation-delay: 1.2s;
}

/* بنر ۳: مسیریابی */
.fb-blocks rect {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.14);
}

.fb-route-base,
.fb-route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fb-route-base {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 9;
}

.fb-route {
  stroke: #2fd0ff;
  stroke-width: 4.5;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: fb-draw 3.2s ease-in-out infinite;
}

.fb-node {
  font: 800 9px/1 Vazirmatn, sans-serif;
  fill: #4a1f96;
}

/* بنر ۴: سه پروفایل مسیریابی — هر مسیر سبک خط و سرعت حرکت خودش را دارد
   (خودرو سریع‌ترین، پیاده کندترین). آیکون‌ها گلیف Font Awesome محلی‌اند. */
.fb-mode {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fb-mode--car {
  stroke: #2fd0ff;
  stroke-width: 4.5;
}

.fb-mode--bike {
  stroke: #c9a6ff;
  stroke-width: 3.2;
  stroke-dasharray: 7 4;
  animation: fb-dash 1.4s linear infinite;
}

.fb-mode--walk {
  stroke: #ff7af5;
  stroke-width: 3;
  stroke-dasharray: 0.1 6;
}

.fb-mover--car { fill: #e6fbff; }
.fb-mover--bike { fill: #efe3ff; }
.fb-mover--walk { fill: #ffe0fc; }

.fb-badge circle {
  fill: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.fb-badge text {
  font: 900 12px/1 "Font Awesome 6 Free";
  text-anchor: middle;
  dominant-baseline: central;
}

.fb-badge--car text { fill: #0b8fc0; }
.fb-badge--bike text { fill: #6d3ae0; }
.fb-badge--walk text { fill: #b012b8; }

@keyframes fb-dash {
  to { stroke-dashoffset: -22; }
}

/* بنر ۵: گیت‌وی امن */
.fb-streams path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.fb-streams .fb-out {
  stroke: rgba(47, 208, 255, 0.7);
  stroke-dasharray: none;
  stroke-width: 2.4;
}

.fb-packet {
  fill: #2fd0ff;
}

.fb-shield {
  fill: #2fd0ff;
  stroke: #e6fbff;
  stroke-width: 2;
  filter: drop-shadow(0 0 12px rgba(47, 208, 255, 0.45));
}

.fb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
  direction: ltr;
}

.fb-nav {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.fb-nav:hover {
  background: #6d3ae0;
  color: #fff;
}

.fb-nav:focus-visible {
  outline: 3px solid #2fd0ff;
  outline-offset: 2px;
}

.fb-dots {
  display: flex;
  gap: 6px;
}

.fb-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  transition: width 0.3s ease, background 0.3s ease;
}

.fb-dots span.active {
  width: 18px;
  background: #6d3ae0;
}

@keyframes fb-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes fb-ripple {
  from { transform: scale(0.6); opacity: 0.9; }
  to { transform: scale(3.2); opacity: 0; }
}

@keyframes fb-type {
  0% { transform: scaleX(0.05); }
  60%, 100% { transform: scaleX(1); }
}

@keyframes fb-draw {
  0% { stroke-dashoffset: 360; }
  60%, 100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-city, .fb-ripple, .fb-typing { animation: none; }
  .fb-route { animation: none; stroke-dashoffset: 0; }
  .fb-packet, .fb-mover { display: none; }
  .fb-mode--bike { animation: none; }
  .fb-strip { scroll-behavior: auto; }
  .fb-card { transition: none; }
}

.ad-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* جای بنر استاندارد ۳۰۰×۲۵۰؛ در گوشی‌های خیلی باریک با همان نسبت کوچک می‌شود */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  max-width: 100%;
  aspect-ratio: 300 / 250;
  overflow: hidden;
  border: 2px dashed #d3c4f7;
  border-radius: 12px;
  box-sizing: border-box;
  background:
    repeating-linear-gradient(135deg, rgba(109, 58, 224, 0.035) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #fbf8fe, var(--brand-soft));
}

/* دو باکس تبلیغاتی جدا، هر کدام یک بنر ۳۰۰×۱۵۰ (اندازه‌ی کامل). دسکتاپ: کنار هم
   و اول (درست زیر نقشه، چون بنر رنگ‌ها نقشه را رنگ می‌کند)؛ باکس معرفی پلتفرم
   بعدشان تمام‌عرض. موبایل/تبلت: زیر هم (ستون #services). */
.ad-box--banner {
  order: -1;
  flex: 1 1 300px;
  height: auto;
  padding: 12px;
}

.ad-slot--banner {
  width: 300px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
}

.feature-box {
  flex-basis: 100%;
  /* تنها در ردیف خودش است؛ ارتفاع ثابت ۳۰۰px (برای هم‌قدی با باکس تبلیغ) دیگر لازم نیست */
  height: auto;
}

/* ===== بنر «رنگ برندت روی نقشه» (js/map-theme-banner.js) =====
   سبک زیرنویس تلویزیونی: زمینه‌ی تیره، نوار عنوان با «زنده» که از راست کشیده
   می‌شود، تراشه‌های رنگ پلکانی و نوار خبری پایین. همه‌ی اندازه‌ها با cqw/cqh
   (نسبت به خود بنر) تا در هر اندازه همان طرح ۳۰۰×۱۵۰ بماند. */
.theme-banner {
  --tb-accent: var(--violet);
  position: relative;
  display: block;
  container-type: size;
  border: none;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tb-accent) 38%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(47, 208, 255, 0.22), transparent 60%),
    linear-gradient(160deg, #1d1336, #120c24);
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.5s ease;
}

.tb-strap {
  position: absolute;
  top: 7cqh;
  right: 0;
  left: 9cqw;
  height: 21cqh;
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  padding: 0 3.4cqw 0 2cqw;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.16));
  border-radius: 0 0 0 3cqw;
  clip-path: inset(0 0 0 100%);
}

.tb-strap::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -1.6cqh;
  height: 1.6cqh;
  background: linear-gradient(270deg, var(--tb-accent), #ffb020 70%, transparent);
  transform-origin: right;
  transform: scaleX(0);
}

.tb-live {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqw;
  padding: 0.6cqh 2cqw;
  font-size: 3.4cqw;
  font-weight: 800;
  background: #e5243b;
  border-radius: 1.2cqw;
  letter-spacing: 0;
}

.tb-live i {
  width: 1.8cqw;
  height: 1.8cqw;
  border-radius: 50%;
  background: #fff;
  animation: tb-pulse 1.2s ease-in-out infinite;
}

.tb-title {
  flex: 1;
  font-size: 5.1cqw;
  font-weight: 800;
  white-space: nowrap;
}

.tb-reset {
  display: grid;
  place-items: center;
  width: 7cqw;
  height: 7cqw;
  padding: 0;
  color: #fff;
  font-size: 3.2cqw;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.theme-banner.is-themed .tb-reset { opacity: 1; }
.tb-reset:hover { background: rgba(255, 255, 255, 0.28); }

.tb-chips {
  position: absolute;
  top: 34cqh;
  right: 2.4cqw;
  left: 2.4cqw;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2cqh 0.8cqw;
}

/* هر رنگ: دایره‌ی دورنگ (اصلی/دوم) و نام برند زیرش */
.tb-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1.2cqh + 2px);
  min-width: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.86);
  font-family: inherit;
  font-size: 3cqw;
  font-weight: 700;
  line-height: 1.2;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6cqh) scale(0.9);
}

.tb-dot {
  flex: none;
  width: 7.6cqw;
  height: 7.6cqw;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1) 58%, var(--c2) 58%);
  box-shadow: 0 0 0 0.5cqw rgba(255, 255, 255, 0.8), 0 0.8cqh 2cqh rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.tb-name {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tb-chip:hover .tb-dot { transform: scale(1.12); }

.tb-chip[aria-checked="true"] { color: #fff; }

.tb-chip[aria-checked="true"] .tb-dot {
  transform: scale(1.12);
  box-shadow: 0 0 0 0.6cqw #fff, 0 0 0 1.5cqw var(--c1), 0 1cqh 3cqh rgba(0, 0, 0, 0.4);
}

.tb-chip:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 2cqw;
}

.tb-ticker {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 15cqh;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #ffb020, #ff6b4a);
  color: #1d1336;
  font-size: 3.3cqw;
  font-weight: 700;
  transform: translateY(100%);
}

/* از لبه‌ی راست شروع می‌شود و به راست حرکت می‌کند؛ متن تازه از چپ وارد می‌شود
   (مثل زیرنویس خبری فارسی) */
.tb-ticker-track {
  position: absolute;
  right: 3cqw;
  direction: rtl;
  white-space: pre;
  animation: tb-ticker 22s linear infinite;
}

/* ترتیب ورود: نوار عنوان → خط زیرش → تراشه‌ها پشت‌سرهم → نوار خبری */
.theme-banner.is-in .tb-strap { animation: tb-wipe 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.theme-banner.is-in .tb-strap::after { animation: tb-grow 0.5s 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.theme-banner.is-in .tb-chip { animation: tb-pop 0.45s calc(0.7s + var(--i) * 0.06s) cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.theme-banner.is-in .tb-ticker { animation: tb-rise 0.4s 1.4s ease-out forwards; }

@keyframes tb-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes tb-grow { to { transform: scaleX(1); } }
@keyframes tb-pop { to { opacity: 1; transform: none; } }
@keyframes tb-rise { to { transform: none; } }
@keyframes tb-pulse { 50% { opacity: 0.25; } }
/* متن دو بار پشت‌سرهم است؛ نیم‌طول که جابه‌جا شد، نسخه‌ی دوم جای اولی است */
@keyframes tb-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tb-strap { clip-path: none; }
  .tb-strap::after, .tb-ticker { transform: none; }
  .tb-chip { opacity: 1; transform: none; }
  .theme-banner.is-in .tb-strap,
  .theme-banner.is-in .tb-strap::after,
  .theme-banner.is-in .tb-chip,
  .theme-banner.is-in .tb-ticker,
  .tb-ticker-track,
  .tb-live i { animation: none; }
}

/* ===== بنر «املاکیها — به‌زودی» (js/amlakiha-banner.js) =====
   اسکیس گچی: خطوط اصلی ساختمان یکی‌یکی کشیده می‌شوند، بعد جزئیات، اندازه‌گذاری،
   سقوط سنجاق روی بام و در آخر شعارها. هر بار که بنر به دید بیاید تکرار می‌شود. */
.amk-banner {
  display: block;
  border: none;
  background: #4b5a51;
  user-select: none;
  -webkit-user-select: none;
}

.amk-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.amk-line,
.amk-detail,
.amk-underline {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.amk-guides,
.amk-dim,
.amk-dim-t,
.amk-t,
.amk-logo,
.amk-dust { opacity: 0; }

/* سنجاق: محور تبدیل نوک پایین سنجاق است تا روی بام له شود (squash) */
.amk-pin-body { transform-box: fill-box; transform-origin: 50% 100%; transform: translateY(-160px); }
.amk-pin-shadow { transform-box: fill-box; transform-origin: center; transform: scale(0.3); opacity: 0; }

.amk-banner.is-in .amk-guides { animation: amk-fade 0.6s 2.1s forwards; --to: 0.35; }
.amk-banner.is-in .amk-line { animation: amk-draw 0.45s calc(2.2s + var(--i) * 0.11s) ease-out forwards; }
.amk-banner.is-in .amk-detail { animation: amk-draw 0.35s calc(3.35s + var(--i) * 0.035s) ease-out forwards; }
.amk-banner.is-in .amk-dim,
.amk-banner.is-in .amk-dim-t { animation: amk-fade 0.5s 4.3s forwards; }
.amk-banner.is-in .amk-pin-body { animation: amk-bounce 2s 5.4s both; }
.amk-banner.is-in .amk-pin-shadow { animation: amk-bounce-shadow 2s 5.4s both; }
.amk-banner.is-in .amk-logo { animation: amk-fade 0.5s 2.3s forwards; }
.amk-banner.is-in .amk-t1 { animation: amk-write 0.6s 2.5s ease-out forwards; }
.amk-banner.is-in .amk-underline { animation: amk-draw 0.5s 3s ease-out forwards; }
.amk-banner.is-in .amk-t2 { animation: amk-write 0.6s 3.4s ease-out forwards; }
.amk-banner.is-in .amk-t3 { animation: amk-write 0.6s 3.9s ease-out forwards; }
.amk-banner.is-in .amk-t5 { animation: amk-write 0.6s 4.2s ease-out forwards; }
/* اول آدرس سایت ظاهر می‌شود، بعد سنجاق از بیرون کادر درست جلوی آن می‌افتد.
   همه‌ی زمان‌های این بنر ۲ ثانیه دیرتر از بنر رنگ‌هاست تا انیمیشن‌ها هم‌زمان نشوند. */
.amk-banner.is-in .amk-t4 { animation: amk-write 0.6s 4.7s ease-out forwards; }
.amk-banner.is-in .amk-dust { animation: amk-dust 3s 5.2s ease-in-out infinite; }

@keyframes amk-draw { to { stroke-dashoffset: 0; } }
@keyframes amk-fade { to { opacity: var(--to, 1); } }
@keyframes amk-write {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: none; }
}
/* توپ‌وار: از بیرونِ بالای بنر (‎-160) با شتاب (ease-in) و کشیده می‌افتد، روی زمین
   له می‌شود، اوج‌ها با کندشدن (ease-out)؛ پرش‌ها ۱۵ → ۶ → ۲ و هر پرش کوتاه‌تر */
@keyframes amk-bounce {
  0% { transform: translateY(-160px) scale(0.9, 1.12); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  28% { transform: translateY(0) scale(0.86, 1.18); animation-timing-function: linear; }
  31% { transform: translateY(0) scale(1.3, 0.7); animation-timing-function: ease-out; }
  35% { transform: translateY(-2px) scale(0.93, 1.09); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  49% { transform: translateY(-15px) scale(1, 1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  62% { transform: translateY(0) scale(0.93, 1.09); animation-timing-function: linear; }
  64.5% { transform: translateY(0) scale(1.17, 0.83); animation-timing-function: ease-out; }
  67.5% { transform: translateY(-1px) scale(0.97, 1.04); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  75% { transform: translateY(-6px) scale(1, 1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  82% { transform: translateY(0) scale(0.97, 1.04); animation-timing-function: linear; }
  84% { transform: translateY(0) scale(1.08, 0.92); animation-timing-function: ease-out; }
  88% { transform: translateY(-2px) scale(1, 1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  92% { transform: translateY(0) scale(1.03, 0.97); animation-timing-function: ease-out; }
  100% { transform: none; }
}
/* سایه هم‌گام با ارتفاع: بالا کوچک و کم‌رنگ، روی زمین کامل، هنگام له‌شدن پهن‌تر */
@keyframes amk-bounce-shadow {
  0% { opacity: 0; transform: scale(0.1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  28% { opacity: 0.3; transform: scale(1); animation-timing-function: linear; }
  31% { opacity: 0.36; transform: scale(1.3, 1); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  49% { opacity: 0.16; transform: scale(0.6); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  62% { opacity: 0.3; transform: scale(1); }
  64.5% { opacity: 0.34; transform: scale(1.18, 1); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  75% { opacity: 0.22; transform: scale(0.8); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  82% { opacity: 0.3; transform: scale(1); }
  84% { opacity: 0.32; transform: scale(1.08, 1); }
  88% { opacity: 0.27; transform: scale(0.92); }
  100% { opacity: 0.3; transform: none; }
}
@keyframes amk-dust {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .amk-line, .amk-detail, .amk-underline { stroke-dashoffset: 0; }
  .amk-dim, .amk-dim-t, .amk-t, .amk-logo, .amk-dust, .amk-pin-body, .amk-pin-shadow { opacity: 1; transform: none; }
  .amk-guides { opacity: 0.35; }
  .amk-pin-shadow { opacity: 0.3; }
  .amk-banner.is-in * { animation: none !important; }
}

/* وقتی بنر واقعی گذاشتید، این placeholder را از HTML حذف کنید */
.ad-box-placeholder {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.ad-box-placeholder small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  direction: ltr;
}

.ad-slot a,
.ad-slot img {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-slot img {
  object-fit: cover;
}

/* با بنر واقعی، کادر نقطه‌چین حذف می‌شود */
.ad-slot:has(img) {
  border: none;
  background: none;
}

/* استیک‌شدن (flex-wrap) با flex-basis:320px فقط زیر عرض ~۷۰۰px واقعاً
   عمودی می‌شد — در پهنای موبایل/تبلت بزرگ‌تر (مثلاً ۸۲۰px) هنوز کنار هم
   می‌ماندند، چون شکسته‌شدن flex-basis نه یک breakpoint واقعی، بلکه فقط
   ریاضی جادادن است. اینجا صریحاً force می‌کنیم عمودی شوند. */
@media (max-width: 860px) {
  /* nowrap لازم است: در فلکس ستونیِ چندخطی (wrap) عرض هر خط برابر
     max-content پهن‌ترین آیتم می‌شود و نوار بنرها از صفحه بیرون می‌زند. */
  #services {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .feature-box,
  .ad-box {
    flex-basis: auto;
    height: auto;
  }

  /* در موبایل/تبلت همه‌ی متن‌های باکس معرفی پلتفرم ۳۰٪ ریزتر می‌شوند تا هر
     خط یک‌خطی جا شود (به‌جای شکستن به دو خط)، و فاصله‌ها هم جمع‌تر می‌شوند. */
  .feature-box h2 {
    font-size: 12.6px; /* 18px × 0.7 */
  }

  .fb-strip {
    --fb-w: 120px;
    gap: 10px;
  }

  .fb-card h4 {
    font-size: 11px;
  }
}

/* مودال ورود/عضویت (فقط پوسته‌ی UI، رجوع کنید به یادداشت در index.html)
   سبک: پس‌زمینه‌ی شیشه‌ای مات + کارت با سربرگ گرادیان بنفش و گوی‌های نور
   طلایی/یاسی، تب‌های segmented با نشانگر لغزان. */
.auth-modal {
  --auth-primary: #6d3ae0;
  --auth-primary-deep: #4a1f96;
  --auth-primary-soft: #f1ecfe;
  --auth-accent: #2fd0ff;
  --auth-text: #2d2438;
  --auth-muted: #6b6178;
  --auth-border: #e4dcfb;
  --auth-danger: #c0392b;

  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 16, 50, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: auth-fade 0.25s ease-out;
}

.auth-modal-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(40, 20, 70, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  animation: auth-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 22px;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, #9965fd 0%, var(--auth-primary) 45%, var(--auth-primary-deep) 100%);
  border-radius: 22px 22px 0 0;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 18px;
  background: #fff;
  border-radius: 18px 18px 0 0;
}

.auth-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.auth-hero-orb--a {
  width: 140px;
  height: 140px;
  top: -60px;
  right: -40px;
  background: radial-gradient(circle, rgba(47, 208, 255, 0.55), transparent 70%);
}

.auth-hero-orb--b {
  width: 120px;
  height: 120px;
  bottom: -50px;
  left: -30px;
  background: radial-gradient(circle, rgba(200, 170, 255, 0.5), transparent 70%);
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

.auth-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #fff, var(--auth-accent), #f7b3ff, #fff);
  padding: 3px;
  box-shadow: 0 8px 24px rgba(20, 8, 40, 0.35);
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

.auth-title {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
}

.auth-subtitle {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.9;
}

.auth-body {
  padding: 6px 24px 22px;
}

.auth-tabs {
  position: relative;
  display: flex;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--auth-primary-soft);
  border-radius: 14px;
}

.auth-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 4px;
  width: calc(50% - 4px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(109, 58, 224, 0.22);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-tabs[data-active="signup"] .auth-tab-indicator {
  transform: translateX(-100%);
}

.auth-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 40px;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--auth-muted);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-tab.active {
  color: var(--auth-primary);
}

.auth-form {
  animation: auth-fade 0.25s ease-out;
}

.auth-field {
  display: block;
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text);
}

.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 14px;
  color: #a898bd;
  pointer-events: none;
  transition: color 0.2s ease;
}

.auth-form input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 42px;
  background: #faf8fd;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  color: var(--auth-text);
  font: inherit;
  font-size: 15px;
  text-align: right;
  text-overflow: ellipsis;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:hover {
  border-color: #cdbde3;
}

.auth-form input:focus {
  outline: none;
  background: #fff;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 4px rgba(109, 58, 224, 0.15);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--auth-primary);
}

.auth-form input[aria-invalid="true"] {
  border-color: var(--auth-danger);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12);
}

.auth-eye {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  border-radius: 10px;
  color: #a898bd;
  cursor: pointer;
}

.auth-eye:hover {
  color: var(--auth-primary);
  background: var(--auth-primary-soft);
}

.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #9965fd, var(--auth-primary) 55%, var(--auth-primary-deep));
  color: #fff;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(109, 58, 224, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* برق نوری که روی هاور از روی دکمه رد می‌شود */
.auth-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(120%);
  transition: transform 0.6s ease;
}

.auth-submit:hover {
  box-shadow: 0 10px 26px rgba(109, 58, 224, 0.45);
  filter: brightness(1.05);
}

.auth-submit:hover::before {
  transform: translateX(-120%);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit[disabled] {
  cursor: progress;
  filter: saturate(0.7);
}

.auth-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-spinner {
  display: inline-block;
}

.auth-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12.5px;
  text-align: center;
  color: var(--auth-muted);
}

.auth-status.is-error {
  color: var(--auth-danger);
}

.auth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
  padding-top: 14px;
  border-top: 1px solid #f0eaf7;
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-note i {
  color: var(--auth-primary);
}

.auth-modal button:focus-visible {
  outline: 3px solid var(--auth-accent);
  outline-offset: 2px;
}

@keyframes auth-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auth-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal-backdrop,
  .auth-modal-card,
  .auth-form { animation: none; }
  .auth-tab-indicator,
  .auth-submit::before,
  .auth-modal-close { transition: none; }
}

/* placeholder ریز و خاکستری — متن راهنمای شاهکار طولانی است، پس با
   ellipsis کوتاه می‌شود به‌جای شکستن/سرریز. */
.auth-form input::placeholder {
  color: #a79fb3;
  font-size: 11px;
  opacity: 1;
}

.auth-form input[data-kind="mobile"],
.auth-form input[data-kind="national"] {
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--auth-danger);
}

.auth-error:empty {
  display: none;
}

/* تبلت */
@media (max-width: 860px) {
  .auth-modal-card {
    width: min(440px, 100%);
  }
}

/* موبایل: کارت وسط صفحه، دو‌سوم عرض و حداکثر نیمی از ارتفاع؛ باقی محتوا
   داخل کارت اسکرول می‌شود. فونت input حداقل ۱۶px تا iOS Safari هنگام
   فوکوس صفحه را خودکار زوم نکند. */
@media (max-width: 520px) {
  .auth-modal {
    padding: 0;
  }

  .auth-modal-card {
    width: 66.667vw;
    min-width: 240px;
    max-height: 50vh;
    max-height: 50dvh;
    border-radius: 18px;
  }

  /* فرم‌های ورود و بازیابی رمز کوتاه‌اند و فقط کمی از نیم‌صفحه بلندتر
     می‌شدند؛ سقف ۵۰٪ فقط برای عضویت می‌ماند تا اسکرول ناچیز نداشته باشند. */
  .auth-modal-card:has(.auth-form[data-form="login"]:not([hidden])),
  .auth-modal-card:has(.auth-form[data-form="forgot"]:not([hidden])) {
    max-height: calc(100dvh - 32px);
  }

  .auth-hero {
    padding: 14px 12px 16px;
    border-radius: 18px 18px 0 0;
  }

  .auth-avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 6px;
    padding: 2px;
  }

  .auth-avatar img {
    padding: 3px;
  }

  .auth-modal-close {
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .auth-title {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .auth-subtitle {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .auth-body {
    padding: 2px 12px 12px;
  }

  .auth-tabs {
    margin-bottom: 12px;
    padding: 3px;
  }

  .auth-tab {
    min-height: 34px;
    font-size: 13px;
  }

  .auth-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-field {
    margin-bottom: 10px;
  }

  .auth-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .auth-form input {
    font-size: 16px;
    min-height: 40px;
    padding: 6px 32px;
    border-radius: 10px;
  }

  .auth-input-icon {
    right: 11px;
    font-size: 12px;
  }

  .auth-eye {
    width: 32px;
    height: 32px;
    left: 2px;
  }

  .auth-form input::placeholder {
    font-size: 9.5px;
  }

  .auth-submit {
    min-height: 42px;
    font-size: 14px;
  }

  .auth-note {
    font-size: 10.5px;
    padding-top: 10px;
  }
}

/* گوشی افقی / ارتفاع کم: سربرگ جمع‌تر تا فرم جا شود */
@media (max-height: 560px) {
  .auth-avatar {
    display: none;
  }

  .auth-hero {
    padding-top: 16px;
    padding-bottom: 14px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .auth-modal-card { animation: none; }
}

/* ===== فرم پلن‌ها (js/plans.js) ===== */
.plans-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.plans-modal[hidden] {
  display: none;
}

.plans-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 45, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: auth-fade 0.25s ease-out;
}

.plans-card {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px 24px 18px;
  box-sizing: border-box;
  border-radius: 24px;
  background:
    radial-gradient(700px 260px at 100% 0%, rgba(47, 208, 255, 0.14), transparent 70%),
    radial-gradient(600px 260px at 0% 100%, rgba(255, 1, 255, 0.08), transparent 70%),
    var(--bg);
  box-shadow: 0 30px 80px rgba(20, 8, 45, 0.4);
  animation: auth-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.plans-close {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--brand-deep);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.plans-close:hover {
  transform: rotate(90deg);
}

.plans-header {
  text-align: center;
  margin-bottom: 20px;
}

.plans-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand) 60%, #b012b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plans-header p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}

/* سوییچ ماهانه/سالانه با نشانگر لغزان */
.plans-billing {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.plans-billing-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: linear-gradient(135deg, #0b8fc0, var(--brand) 55%, #b012b8);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.plans-billing[data-active="annual"] .plans-billing-thumb {
  transform: translateX(-100%);
}

.plans-billing button {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 120px;
  min-height: 38px;
  padding: 0 16px;
  border: none;
  background: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  color: var(--brand-deep);
  cursor: pointer;
  transition: color 0.25s ease;
}

.plans-billing button[aria-pressed="true"] {
  color: #fff;
}

.plans-billing em {
  font-style: normal;
  font-size: 10.5px;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(47, 208, 255, 0.18);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pl-card {
  --tier: #8a8398;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: pl-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pl-card:nth-child(2) { animation-delay: 0.05s; }
.pl-card:nth-child(3) { animation-delay: 0.1s; }
.pl-card:nth-child(4) { animation-delay: 0.15s; }

.pl-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--tier);
}

.pl-white  { --tier: linear-gradient(90deg, #d9d4e6, #b9b2cc); }
.pl-bronze { --tier: linear-gradient(90deg, #c98a5a, #8f5228); }
.pl-silver { --tier: linear-gradient(90deg, #d3d3d8, #8d8d96); }
.pl-gold   { --tier: linear-gradient(90deg, #f1cf6e, #c9971f); }

.pl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pl-card.is-popular {
  border-color: transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--grad) border-box;
  border-width: 2px;
}

.pl-card.is-selected {
  box-shadow: 0 0 0 3px rgba(109, 58, 224, 0.35), var(--shadow-md);
  transform: translateY(-4px);
}

.pl-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b8fc0, var(--brand) 55%, #b012b8);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(109, 58, 224, 0.4);
}

.pl-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pl-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.pl-name {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-ink);
}

.pl-tagline {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.pl-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.pl-price strong {
  font-size: 26px;
  font-weight: 900;
  color: var(--brand-deep);
  letter-spacing: -0.5px;
}

.pl-price span {
  font-size: 12px;
  color: var(--muted);
}

.pl-unit {
  margin: 2px 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cyan-ink);
}

.pl-quota {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
}

.pl-quota i {
  color: var(--brand);
}

.pl-quota small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.pl-features {
  flex: 1;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.pl-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--brand-ink);
}

.pl-features li i {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 9px;
}

.pl-overage {
  margin: 0 0 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--muted);
}

.pl-cta {
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: var(--card);
  color: var(--brand);
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.pl-cta:hover,
.pl-card.is-popular .pl-cta,
.pl-card.is-selected .pl-cta {
  border-color: transparent;
  background: linear-gradient(135deg, #0b8fc0, var(--brand) 50%, #b012b8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(109, 58, 224, 0.35);
}

.pl-cta:focus-visible,
.plans-billing button:focus-visible,
.plans-close:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.plans-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--muted);
}

.plans-foot i {
  color: var(--brand);
}

@keyframes pl-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* تبلت: ۲×۲ */
@media (max-width: 1024px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }
}

/* نوار نام پلن‌ها فقط در موبایل (پایین) */
.plans-picker {
  display: none;
}

/* موبایل: کارت‌ها افقی و قابل ورق‌زدن (scroll-snap) */
@media (max-width: 640px) {
  .plans-modal {
    padding: 10px;
  }

  .plans-card {
    padding: 20px 12px 14px;
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .plans-header h2 {
    font-size: 17px;
    padding: 0 40px;
  }

  .plans-header p {
    font-size: 12px;
  }

  .plans-billing button {
    min-width: 100px;
    font-size: 12.5px;
  }

  .plans-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 14px 4px 8px;
    margin: 0 -4px;
    scrollbar-width: none;
  }

  .plans-grid::-webkit-scrollbar {
    display: none;
  }

  /* کارت‌های کناری بیشتر دیده شوند تا معلوم باشد می‌شود ورق زد */
  .pl-card {
    flex: 0 0 76%;
    scroll-snap-align: center;
  }

  .plans-grid::before,
  .plans-grid::after {
    content: '';
    flex: 0 0 calc(12% - 12px);
  }

  .plans-picker:not([hidden]) {
    display: flex;
    gap: 6px;
    margin: 10px -4px 0;
    padding: 2px 4px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .plans-picker::-webkit-scrollbar {
    display: none;
  }

  .pp-chip {
    flex: 0 0 auto;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }

  .pp-chip.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
  }

  .pl-price strong {
    font-size: 23px;
  }

  .plans-foot {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plans-card, .plans-backdrop, .pl-card { animation: none; }
  .plans-billing-thumb, .pl-card, .plans-close { transition: none; }
}

/* مرحله‌ی تأیید پرداخت (قبل از انتقال به درگاه شاپرک) */
.plans-checkout {
  max-width: 440px;
  margin: 0 auto;
  animation: auth-fade 0.25s ease-out;
}

.plans-checkout[hidden],
.plans-grid[hidden],
.plans-billing[hidden] {
  display: none;
}

.pc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.pc-box {
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.pc-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.pc-plan img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.pc-plan strong {
  display: block;
  font-size: 16px;
  color: var(--brand-ink);
}

.pc-plan span {
  font-size: 12px;
  color: var(--muted);
}

.pc-sum {
  margin: 12px 0 16px;
}

.pc-sum div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13.5px;
}

.pc-sum dt {
  color: var(--muted);
}

.pc-sum dd {
  margin: 0;
  font-weight: 700;
  color: var(--brand-ink);
}

.pc-sum .pc-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.pc-sum .pc-total dt,
.pc-sum .pc-total dd {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-deep);
}

.pc-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-ink);
}

.pc-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #faf8fd;
  font: inherit;
  font-size: 16px;
  letter-spacing: 1px;
  text-align: center;
}

.pc-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(109, 58, 224, 0.15);
}

.pc-error {
  min-height: 18px;
  margin: 6px 0;
  font-size: 12px;
  color: #c0392b;
}

.pc-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0b8fc0, var(--brand) 50%, #b012b8);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(109, 58, 224, 0.4);
}

.pc-pay.is-loading {
  cursor: progress;
  opacity: 0.75;
}

.pc-pay:focus-visible,
.pc-back:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.pc-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  text-align: center;
  color: var(--muted);
}

.pc-note i {
  color: var(--brand);
}

.plans-error {
  grid-column: 1 / -1;
  text-align: center;
  color: #c0392b;
}

.plans-foot a {
  color: var(--brand);
  font-weight: 700;
}

/* پنل حساب کاربری (پس از ورود) */
.auth-tabs[hidden],
.auth-account[hidden] {
  display: none;
}

.auth-account {
  text-align: center;
  animation: auth-fade 0.25s ease-out;
}

.aa-name {
  margin: 4px 0 2px;
  font-size: 17px;
  font-weight: 800;
  color: var(--auth-text);
}

.aa-nc {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--auth-muted);
}

.aa-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--auth-muted);
  text-align: right;
}

.aa-mobiles {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.aa-mobiles li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--auth-primary-soft);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--auth-text);
}

.aa-mobiles i {
  color: var(--auth-primary);
}

.aa-logout {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  color: #c0392b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.aa-logout:hover {
  background: #fff5f4;
}

/* تخفیف افتتاحیه، قیمت خط‌خورده، پلن سازمانی */
.plans-promo {
  display: inline-block;
  margin: 0 0 14px !important;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(47, 208, 255, 0.16), rgba(255, 1, 255, 0.12));
  border: 1px solid rgba(153, 101, 253, 0.35);
  color: var(--brand-deep) !important;
  font-size: 12.5px !important;
  font-weight: 700;
}

.plans-promo[hidden] {
  display: none;
}

.pl-price s {
  font-size: 12px;
  color: var(--muted);
}

.pc-sum .pc-discount dd,
.pc-sum .pc-discount dt {
  color: #0f8a5f;
}

.pl-enterprise {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  background:
    radial-gradient(500px 160px at 0% 0%, rgba(47, 208, 255, 0.12), transparent 70%),
    linear-gradient(160deg, #fbf9ff, var(--brand-soft));
}

.pl-enterprise::before {
  background: var(--grad);
}

.pl-ent-main {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-enterprise .pl-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
}

.pl-enterprise a.pl-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .pl-enterprise {
    flex-direction: column;
    align-items: stretch;
  }

  .pl-ent-main {
    flex-basis: auto;
  }
}

@media (max-width: 640px) {
  .pl-enterprise .pl-features {
    grid-template-columns: 1fr;
  }
}

.pc-login-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--brand-ink);
  text-align: center;
}

/* تله‌ی ربات در فرم‌های ورود/عضویت: بیرون از صفحه (نه display:none که بعضی
   ربات‌ها تشخیص می‌دهند) و بیرون از ترتیب Tab و صفحه‌خوان */
.auth-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* بازیابی رمز: فیلدهای مرحله‌ی دیگر با [hidden] پنهان‌اند؛ .auth-field خودش
   display دارد و بدون این قانون، hidden نادیده گرفته می‌شود */
.auth-form [hidden] {
  display: none !important;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.auth-link {
  display: block;
  margin: 8px auto 0;
  padding: 4px 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--brand);
  cursor: pointer;
}

.auth-links .auth-link {
  margin: 8px 0 0;
}

.auth-link:hover:not(:disabled) {
  text-decoration: underline;
}

.auth-link:disabled {
  color: var(--auth-muted);
  cursor: default;
}

.auth-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--auth-muted);
}

/* موبایل: فرم پلن‌ها بدون اسکرول عمودی در گوشی‌های رایج (۳۹۰×۸۴۴ به بالا) —
   فاصله‌ها و اندازه‌ها جمع‌تر. بعد از .plans-promo آمده تا !important آن را
   بازنویسی کند. */
@media (max-width: 640px) {
  .plans-card {
    padding: 14px 10px 10px;
  }

  .plans-header {
    margin-bottom: 8px;
  }

  .plans-header h2 {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .plans-header p {
    margin-bottom: 8px;
    font-size: 11.5px;
    line-height: 1.6;
  }

  /* کنار دکمه‌ی بستن (X) نرود */
  .plans-header p:not(.plans-promo) {
    padding: 0 34px;
  }

  .plans-promo {
    margin: 0 0 8px !important;
    padding: 4px 10px;
    font-size: 11px !important;
    line-height: 1.6;
  }

  .plans-billing {
    padding: 3px;
  }

  .plans-billing-thumb {
    top: 3px;
    bottom: 3px;
    right: 3px;
    width: calc(50% - 3px);
  }

  .plans-billing button {
    min-height: 32px;
  }

  .plans-picker:not([hidden]) {
    margin-top: 8px;
  }

  .pp-chip {
    padding: 4px 12px;
    font-size: 12px;
  }

  .plans-grid {
    padding-top: 12px;
    padding-bottom: 4px;
  }

  .pl-card {
    padding: 12px 12px 10px;
  }

  .pl-head {
    gap: 8px;
    margin-bottom: 6px;
  }

  .pl-logo {
    width: 30px;
    height: 30px;
  }

  .pl-name {
    font-size: 14px;
  }

  .pl-tagline {
    margin-top: 0;
    font-size: 11px;
  }

  .pl-price strong {
    font-size: 21px;
  }

  .pl-unit {
    margin: 0 0 6px;
    font-size: 11px;
  }

  .pl-quota {
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 12px;
  }

  .pl-quota small {
    font-size: 10.5px;
  }

  .pl-features {
    margin-bottom: 6px;
  }

  .pl-features li {
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .pl-features li i {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    font-size: 8px;
  }

  .pl-overage {
    margin-bottom: 8px;
    padding-top: 6px;
    font-size: 10.5px;
  }

  .pl-cta {
    min-height: 40px;
    font-size: 13.5px;
  }

  .plans-foot {
    margin-top: 6px;
    gap: 2px 12px;
  }
}

@media (max-width: 640px) {
  .plans-modal {
    padding: 6px;
  }

  .plans-card {
    max-height: calc(100dvh - 12px);
  }
}

/* گوشی‌های کوتاه (مثل آیفون SE): توضیح زیر عنوان حذف، تا کارت بدون اسکرول جا شود */
@media (max-width: 640px) and (max-height: 760px) {
  .plans-header p:not(.plans-promo) {
    display: none;
  }

  .plans-header h2 {
    margin-bottom: 6px;
  }
}

/* خیلی کوتاه (آیفون SE ۳۷۵×۶۶۷): پانویس هم حذف؛ همین توضیح در pages/pricing.html هست */
@media (max-width: 640px) and (max-height: 700px) {
  .plans-foot {
    display: none;
  }
}
