/* ==========================================================================
   DahuaNet — pages/home.css
   هیرو با شفق و لنز زنده، کارت اعتماد شناور، بنرهای بنتو، کاشی‌های «محل نصب» و نوار تخفیف.
   ========================================================================== */

/* ---------- استوری‌ها ----------
   دایره‌ها با حلقه‌ی طیفی که آرام می‌چرخد؛ دیده‌شده‌ها خاکستری می‌شوند. */
.stories {
  position: relative;
  padding-block: 14px 10px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, var(--bg-soft) 0%, transparent 70%),
    var(--bg);
}
.stories__inner { position: relative; }
.stories__rail {
  display: flex;
  gap: clamp(10px, 1.6vw, 20px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0;
  padding: 6px 4px 4px;
  list-style: none;
}
.stories__rail::-webkit-scrollbar { display: none; }
.stories__rail > li { flex: none; scroll-snap-align: start; }

.story {
  --story-size: clamp(68px, 7.2vw, 88px);
  display: grid;
  justify-items: center;
  gap: 8px;
  width: calc(var(--story-size) + 16px);
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.story__ring {
  --dn-angle: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--story-size);
  height: var(--story-size);
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from var(--dn-angle), var(--teal-700), var(--aqua), var(--cyan), var(--emerald), var(--teal-700));
  box-shadow: 0 8px 20px -10px rgba(0, 133, 119, .55);
  animation: dn-story-spin 6s linear infinite;
  animation-play-state: paused;
  transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2) var(--ease);
}
.story__ring img {
  width: 100%;
  height: 100%;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--grad-media);
  object-fit: cover;
}
.story__label {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: var(--fs-2xs);
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.story:hover .story__ring,
.story:focus-visible .story__ring { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 26px -12px rgba(0, 133, 119, .7); animation-play-state: running; }
.story:focus-visible { outline: none; }
.story:focus-visible .story__ring { outline: 2px solid var(--aqua); outline-offset: 3px; }
.story.is-seen .story__ring { background: var(--line-strong); box-shadow: none; animation: none; }
.story.is-seen .story__label { color: var(--fg-muted); }
/* هنگام باز شدن، حلقه تند می‌چرخد تا تصویر برسد */
.story.is-opening .story__ring { animation-duration: .8s; animation-play-state: running; }
@keyframes dn-story-spin { to { --dn-angle: 360deg; } }

.stories__nav {
  position: absolute;
  top: calc(6px + clamp(68px, 7.2vw, 88px) / 2);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
  color: var(--fg);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity var(--dur-2), color var(--dur-2);
}
.stories__nav:hover { color: var(--primary); }
.stories__nav:disabled { opacity: 0; pointer-events: none; }
.stories__nav .icon { width: 18px; height: 18px; }
.stories__nav--prev { inset-inline-start: max(4px, calc(var(--gutter) - 17px)); }
.stories__nav--next { inset-inline-end: max(4px, calc(var(--gutter) - 17px)); }
@media (hover: none) and (pointer: coarse) { .stories__nav { display: none; } }

/* ---------- نمایشگر استوری ---------- */
.story-viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
}
.story-viewer::backdrop { background: rgba(11, 59, 55, .86); backdrop-filter: blur(14px); }
.story-viewer[open] { display: grid; place-items: center; animation: dn-story-in .35s var(--ease) both; }
@keyframes dn-story-in { from { opacity: 0; transform: scale(.96); } }
.story-viewer__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
}
.story-viewer__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 420px, calc((100dvh - 24px) * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--night);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.story-viewer__bars {
  position: absolute;
  inset-inline: 12px;
  top: 10px;
  z-index: 3;
  display: flex;
  gap: 4px;
}
.story-viewer__bar { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .32); }
.story-viewer__bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right center;
}
[dir="ltr"] .story-viewer__bar > i { transform-origin: left center; }
.story-viewer__bar.is-done > i { transform: scaleX(1); }
/* پیشرفت اسلاید فعال را stories.js با transform درون‌خطی پر می‌کند */

.story-viewer__head {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 12px 28px;
  background: linear-gradient(to bottom, rgba(11, 59, 55, .62), transparent);
}
.story-viewer__avatar { width: 36px; height: 36px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.story-viewer__who { display: grid; flex: 1; min-width: 0; line-height: 1.5; }
.story-viewer__who strong { overflow: hidden; color: #fff; font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; }
.story-viewer__who span { color: rgba(255, 255, 255, .75); font-size: var(--fs-2xs); }
.story-viewer__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-2);
}
.story-viewer__btn:hover { background: rgba(255, 255, 255, .16); }
.story-viewer__btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.story-viewer__pause { position: relative; width: 12px; height: 14px; border-inline: 4px solid #fff; }
.story-viewer.is-paused .story-viewer__pause {
  width: 0;
  height: 0;
  border-inline: 0;
  border-block: 7px solid transparent;
  border-left: 12px solid #fff;
}

.story-viewer__media { position: relative; flex: 1; overflow: hidden; }
.story-viewer__backdrop {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  max-width: none;
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(28px) saturate(1.3) brightness(.7);
}
.story-viewer__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .25s var(--ease);
}
.story-viewer.is-loading .story-viewer__img { opacity: 0; }
.story-viewer__spinner {
  position: absolute;
  inset: 0;
  width: 38px;
  height: 38px;
  margin: auto;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: dn-story-spinner .8s linear infinite;
  transition: opacity .2s;
}
.story-viewer.is-loading .story-viewer__spinner { opacity: 1; }
@keyframes dn-story-spinner { to { transform: rotate(360deg); } }

.story-viewer__foot {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 16px 18px;
  background: linear-gradient(to top, rgba(11, 59, 55, .78), transparent);
  pointer-events: none;
}
.story-viewer__foot:not(:has(:not([hidden]))) { display: none; }
.story-viewer__caption {
  margin: 0;
  color: #fff;
  font-size: var(--fs-sm);
  line-height: 1.9;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-viewer__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  color: var(--on-white-ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  pointer-events: auto;
  transition: transform var(--dur-2) var(--ease-spring), gap var(--dur-2) var(--ease);
}
.story-viewer__cta:hover { gap: 12px; transform: translateY(-2px); color: var(--primary); }

.story-viewer__step {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-2), opacity var(--dur-2);
}
.story-viewer__step:hover { background: rgba(255, 255, 255, .26); }
.story-viewer__step:disabled { opacity: .25; cursor: default; }
@media (max-width: 640px) {
  .story-viewer__stage { padding: 0; }
  .story-viewer__step { display: none; }
  .story-viewer__card { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
  .story-viewer__bars { top: max(10px, env(safe-area-inset-top, 0px)); }
  .story-viewer__head { padding-top: max(24px, calc(env(safe-area-inset-top, 0px) + 14px)); }
}
@media (prefers-reduced-motion: reduce) {
  .story__ring { animation: none; }
  .story-viewer[open] { animation: none; }
}

/* ---------- هیرو ----------
   سبزآبی عمیق با شفق متحرک، شبکه‌ی نمایشگر و لنز زنده. پایین هیرو گرد است و
   کارت اعتماد روی لبه‌اش می‌نشیند. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(44px, 7vw, 96px);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
  background: var(--noise), var(--grad-night);
  color: var(--on-dark);
}
.hero h1 { color: var(--on-dark); font-size: var(--fs-4xl); line-height: 1.28; }
.hero p { color: var(--on-dark-muted); font-size: var(--fs-lg); max-width: 52ch; }

/* شفق: سه لکه‌ی نور که آرام جابه‌جا می‌شوند؛ همه سمت لنز، نه پشت متن */
.hero__aurora { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.hero__aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .75;
  animation: dn-drift 18s ease-in-out infinite;
}
.hero__aurora span:nth-child(1) { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; left: -8%; top: -18%; background: radial-gradient(circle, rgba(45, 212, 191, .75), transparent 65%); }
.hero__aurora span:nth-child(2) { width: 36vw; height: 36vw; max-width: 480px; max-height: 480px; left: 22%; bottom: -26%; background: radial-gradient(circle, rgba(34, 211, 238, .6), transparent 65%); animation-delay: -6s; animation-duration: 22s; }
.hero__aurora span:nth-child(3) { width: 28vw; height: 28vw; max-width: 380px; max-height: 380px; right: 6%; top: -30%; background: radial-gradient(circle, rgba(110, 231, 183, .35), transparent 65%); animation-delay: -12s; animation-duration: 26s; }

/* شبکه‌ی ظریف پس‌زمینه، فقط اطراف لنز */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 28% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 28% 45%, #000 20%, transparent 75%);
}
/* خط اسکن که آرام از بالا به پایین می‌رود */
.hero__beam {
  position: absolute;
  inset-inline: 0;
  top: -140px;
  z-index: -1;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(204, 251, 241, .06) 75%, rgba(204, 251, 241, .18) 99%, transparent);
  animation: dn-hero-beam 9s linear infinite;
  pointer-events: none;
}
@keyframes dn-hero-beam { to { transform: translateY(calc(100vh + 400px)); } }

.hero__inner {
  display: grid;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
@media (min-width: 960px) {
  .hero__inner { grid-template-columns: 1.1fr .9fr; }
}
.hero__copy { display: grid; justify-items: start; gap: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--on-dark-muted); font-size: var(--fs-sm); font-weight: 600; }
.hero__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(167, 243, 208, .2); color: var(--mint); stroke-width: 2.6; }

/* واژه‌ی برجسته با خط زیر که خودش کشیده می‌شود */
.hero .hl {
  position: relative;
  display: inline-block;
  background: var(--grad-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
}
.hl__swoosh {
  position: absolute;
  inset-inline: -4%;
  bottom: -.12em;
  width: 108%;
  height: .32em;
  overflow: visible;
  pointer-events: none;
}
.hl__swoosh path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s var(--ease-out) .9s;
}
.js [data-split]:not(.is-in) .hl__swoosh path { stroke-dashoffset: 260; }

/* ورود هیرو هنگام بارگذاری (نه اسکرول) */
.js .hero__in { animation: dn-hero-in 1s var(--ease-out) calc(var(--d, 0) * 110ms + 120ms) both; }
.js .hero__visual.hero__in { animation-name: dn-hero-zoom; animation-duration: 1.3s; }
@keyframes dn-hero-in { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }
@keyframes dn-hero-zoom { from { opacity: 0; transform: scale(.82) rotate(-8deg); filter: blur(10px); } }

/* ---------- جای لنز در هیرو ---------- */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 470px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
/* هاله‌ی چرخان پشت لنز */
.hero__visual::before {
  --dn-angle: 0deg;
  content: "";
  position: absolute;
  inset: 4%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from var(--dn-angle), rgba(255, 255, 255, 0), rgba(167, 243, 208, .45), rgba(34, 211, 238, .4), rgba(255, 255, 255, 0) 60%);
  filter: blur(26px);
  animation: dn-spin-angle 10s linear infinite;
}
/* کادر نمایشگر دوربین */
.hud {
  --c: rgba(255, 255, 255, .75);
  --l: 28px;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) top left / 2px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) top right / 2px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) bottom left / 2px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 2px,
    linear-gradient(var(--c), var(--c)) bottom right / 2px var(--l);
  background-repeat: no-repeat;
}
.hud__rec, .hud__time {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  color: var(--on-dark-muted);
  font-family: var(--font-code);
  font-size: var(--fs-2xs);
  letter-spacing: .08em;
}
.hud__rec { top: 14px; left: 16px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 77, 79, .18); color: #ffd9d9; font-weight: 700; }
.hud__rec::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 10px #ff4d4f;
  animation: dn-pulse 1.4s ease-in-out infinite;
}
.hud__time { bottom: 14px; left: 16px; }

/* برچسب‌های شناور قابلیت‌ها */
.hero__tag {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border-radius: var(--r-pill);
  background: var(--surface-glass);
  color: var(--ink);
  font-size: var(--fs-xs);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .45);
  transition: translate .5s var(--ease);
}
.hero__tag > span { display: inline-flex; align-items: center; gap: 8px; animation: dn-float 6s ease-in-out infinite; }
.hero__tag .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--grad-brand); color: #fff; stroke-width: 2.2; }
.hero__tag b { color: var(--teal-700); }
.hero__tag--1 { top: 12%; right: -2%; }
.hero__tag--2 { bottom: 16%; left: -4%; }
.hero__tag--2 > span { animation-delay: -2s; }
.hero__tag--3 { bottom: 3%; right: 10%; }
.hero__tag--3 > span { animation-delay: -4s; }
.js .hero__tag { animation: dn-tag-in .8s var(--ease-spring) both; }
.js .hero__tag--1 { animation-delay: .9s; }
.js .hero__tag--2 { animation-delay: 1.1s; }
.js .hero__tag--3 { animation-delay: 1.3s; }
@keyframes dn-tag-in { from { opacity: 0; transform: scale(.5); } }
@media (max-width: 520px) {
  .hero__tag { font-size: var(--fs-2xs); padding: 6px 10px; }
  .hero__tag--1 { right: 0; }
  .hero__tag--2 { left: 0; }
}

/* نوار آمار شیشه‌ای */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(32px, 5vw, 56px);
  border-radius: var(--r-xl);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.hero__stats .stat { position: relative; padding: 20px; text-align: center; }
.hero__stats .stat + .stat { border-inline-start: 1px solid var(--dark-line); }
.hero__stats .stat:nth-child(3) { border-inline-start: 0; }
.hero__stats .stat:nth-child(n + 3) { border-top: 1px solid var(--dark-line); }
.hero__stats .stat__value {
  background: var(--grad-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: var(--fs-3xl);
}
.hero__stats .stat__label { color: var(--on-dark-muted); font-weight: 600; }
@media (min-width: 760px) {
  .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero__stats .stat:nth-child(3) { border-inline-start: 1px solid var(--dark-line); }
  .hero__stats .stat:nth-child(n + 3) { border-top: 0; }
}

/* ---------- دسته‌ها ----------
   دایره‌ی عکس با حلقه‌ی طیفی؛ عکس عکاسی‌شده کل دایره را پر می‌کند و با هاور بزرگ می‌شود. */
.orbs { gap: 18px; }
@media (min-width: 760px) { .orbs { gap: 30px 26px; } }
.orb { width: 150px; transition: color var(--dur-2); }
.orb__ring {
  position: relative;
  width: 138px;
  height: 138px;
  padding: 4px;
  box-shadow: 0 18px 34px -18px rgba(13, 148, 136, .85);
  transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-3) var(--ease);
}
.orb__img { position: relative; isolation: isolate; border-width: 4px; }
.orb__img .icon { width: 48px; height: 48px; }
.orb__img img[src^="/dahuanet/img/categories/"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .6s var(--ease);
}
/* لایه‌ی نور سبزآبی از پایین که هنگام هاور پررنگ می‌شود */
.orb__img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .35), transparent 40%),
    linear-gradient(to top, rgba(13, 148, 136, .45), transparent 55%);
  opacity: .55;
  transition: opacity var(--dur-3) var(--ease);
  pointer-events: none;
}
.orb:hover .orb__ring { transform: translateY(-6px) scale(1.04); box-shadow: 0 26px 44px -18px rgba(20, 184, 166, .9); }
.orb:hover .orb__img img[src^="/dahuanet/img/categories/"] { transform: scale(1.14); filter: saturate(1.15); }
.orb:hover .orb__img::after { opacity: 1; }
.orb:nth-child(5n + 2) .orb__ring { background: conic-gradient(from var(--dn-angle), var(--cyan), var(--teal-700), var(--sky-200), var(--cyan)); }
.orb:nth-child(5n + 3) .orb__ring { background: conic-gradient(from var(--dn-angle), var(--emerald), var(--teal-700), var(--mint), var(--emerald)); }
.orb:nth-child(5n + 4) .orb__ring { background: conic-gradient(from var(--dn-angle), var(--amber), var(--teal-700), var(--sky-200), var(--amber)); }

/* ---------- کاشی‌های «محل نصب» ---------- */
.places {
  display: grid;
  gap: 14px;
  grid-auto-flow: column;
  grid-auto-columns: 136px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding-block: 6px 12px;
}
.places::-webkit-scrollbar { display: none; }
.places > * { scroll-snap-align: start; }
@media (min-width: 760px) {
  .places {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    overflow: visible;
  }
}
.place {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  text-align: center;
  font-weight: 800;
  transition: transform var(--dur-3) var(--ease), border-color var(--dur-3), color var(--dur-3), box-shadow var(--dur-3);
}
.place::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--noise), var(--grad-night);
  clip-path: circle(0% at 50% 34%);
  transition: clip-path .7s var(--ease);
}
.place .icon {
  width: 60px;
  height: 60px;
  padding: 14px;
  border-radius: 20px;
  background: var(--grad-icon);
  color: var(--teal-700);
  stroke-width: 1.5;
  transition: color var(--dur-3), background var(--dur-3), transform var(--dur-3) var(--ease-spring);
}
.place small { color: var(--fg-subtle); font-size: var(--fs-2xs); font-weight: 600; transition: color var(--dur-3); }
.place:hover { transform: translateY(-6px); border-color: transparent; color: #fff; box-shadow: var(--sh-3); }
.place:hover::after { clip-path: circle(150% at 50% 34%); }
.place:hover .icon { background: rgba(255, 255, 255, .16); color: #fff; transform: scale(1.1) rotate(-6deg); }
.place:hover small { color: rgba(255, 255, 255, .8); }

/* ---------- بنرها: چیدمان بنتو با چهار رنگ ---------- */
.banners { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .banners { grid-template-columns: repeat(2, 1fr); }
  .banners--1 { grid-template-columns: 1fr; }
  .banners--3 > :first-child { grid-row: span 2; }
  .banners--4 { grid-template-columns: 1.4fr 1fr 1fr; }
  .banners--4 > :first-child { grid-row: span 2; }
  .banners--4 > :last-child { grid-column: span 2; }
}
.banner {
  --banner-bg: linear-gradient(140deg, #0a524c 0%, #0b6b63 50%, #0c7f76 100%);
  --banner-glow: rgba(45, 212, 191, .55);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(70% 90% at 0% 0%, var(--banner-glow) 0%, transparent 60%),
    var(--noise),
    var(--banner-bg);
  color: #fff;
  box-shadow: 0 24px 50px -30px rgba(4, 47, 44, .6);
  transition: box-shadow var(--dur-3) var(--ease), transform .4s var(--ease);
  transform-style: preserve-3d;
}
.banner:nth-child(4n + 2) { --banner-bg: linear-gradient(140deg, #0e5a6e 0%, #0e7490 50%, #0b8aa6 100%); --banner-glow: rgba(34, 211, 238, .5); }
.banner:nth-child(4n + 3) { --banner-bg: linear-gradient(140deg, #064e3b 0%, #047857 50%, #0b8a6a 100%); --banner-glow: rgba(110, 231, 183, .45); }
.banner:nth-child(4n + 4) { --banner-bg: linear-gradient(140deg, #042f2c 0%, #115e59 55%, #0f766e 100%); --banner-glow: rgba(20, 184, 166, .55); }
.banner:hover { box-shadow: 0 34px 60px -28px rgba(4, 47, 44, .7); }
@media (min-width: 700px) { .banners--3 > :first-child, .banners--4 > :first-child { min-height: 360px; } }
.banner__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(270deg, rgba(4, 38, 36, .82) 0%, rgba(4, 38, 36, .5) 45%, transparent 85%),
    linear-gradient(0deg, rgba(4, 38, 36, .8) 0%, rgba(4, 38, 36, .15) 60%, transparent 85%);
  opacity: 0;
}
.banner:has(.banner__img)::after { opacity: 1; }
.banner:hover .banner__img { transform: scale(1.06); }
/* بنر بدون عکس: حلقه‌های لنز به‌جای تصویر */
.banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  inset-inline-end: -120px;
  top: -140px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, .2) 30px 31.5px);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 72%);
  mask-image: radial-gradient(circle, #000 35%, transparent 72%);
  transition: transform 1.2s var(--ease);
}
.banner:has(.banner__img)::before { display: none; }
.banner:hover::before { transform: rotate(25deg) scale(1.12); }
/* متن بنر روی پلاک شیشه‌ای تیره: هر چه عکس پشتش باشد، خوانا و هم‌قد می‌ماند */
.banner__copy {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 6px;
  width: fit-content;
  max-width: min(100%, 44ch);
  padding: 12px 16px 14px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(4, 38, 36, .66), rgba(4, 38, 36, .3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 40px -22px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  transform: translateZ(30px);
  transition: box-shadow var(--dur-3), background var(--dur-3);
}
/* خط نورانی بالای پلاک که با هاور تا انتها کشیده می‌شود */
.banner__copy::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 18px;
  width: 42px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  box-shadow: 0 0 12px rgba(245, 165, 36, .7);
  transition: width .7s var(--ease-out);
}
.banner:hover .banner__copy { box-shadow: inset 0 0 0 1px rgba(167, 243, 208, .4), 0 22px 46px -22px rgba(0, 0, 0, .75); }
.banner:hover .banner__copy::before { width: calc(100% - 36px); }

.banner__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: .14em;
  direction: ltr;
}
.banner__tag i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 8px #ff4d4f; animation: dn-pulse 1.4s ease-in-out infinite; }
.banner__title { font-size: var(--fs-xl); font-weight: 900; line-height: 1.4; letter-spacing: -.01em; }
.banners--3 > :first-child .banner__title,
.banners--4 > :first-child .banner__title { font-size: var(--fs-2xl); }
/* بنرهای کوچک (دو بنر وسط، و همه در موبایل): فقط تیتر و دکمه، تا پلاک عکس را نپوشاند */
@media (max-width: 699px) {
  .banner .banner__text { display: none; }
  .banner__title, .banners--4 > :first-child .banner__title { font-size: var(--fs-lg); }
}
@media (min-width: 700px) {
  .banners--4 > :nth-child(2) .banner__text,
  .banners--4 > :nth-child(3) .banner__text { display: none; }
}
.banner__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--on-dark-muted);
  font-size: var(--fs-xs);
  line-height: 1.9;
}
.banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  transition: color var(--dur-2), gap var(--dur-3) var(--ease);
}
.banner__cta .icon {
  width: 28px;
  height: 28px;
  padding: 7px;
  border-radius: 50%;
  background: #fff;
  color: var(--on-white-teal);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
  transition: background var(--dur-2), color var(--dur-2), transform var(--dur-3) var(--ease-spring);
}
.banner:hover .banner__cta { color: var(--accent); gap: 14px; }
.banner:hover .banner__cta .icon { background: var(--accent); color: var(--on-accent); transform: translateX(-3px); }
[dir="ltr"] .banner__cta .icon { scale: -1 1; }

/* پس از ظهور بنر، اجزای پلاک یکی‌یکی بالا می‌آیند */
.js .banner .banner__copy > * { transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
.js .banner:not(.is-in) .banner__copy > * { opacity: 0; transform: translateY(12px); }
.js .banner.is-in .banner__copy > :nth-child(1) { transition-delay: .35s; }
.js .banner.is-in .banner__copy > :nth-child(2) { transition-delay: .45s; }
.js .banner.is-in .banner__copy > :nth-child(3) { transition-delay: .55s; }
.js .banner.is-in .banner__copy > :nth-child(4) { transition-delay: .65s; }
/* پلاک خودش رنگ و کنتراست می‌دهد؛ سایه‌ی روی عکس فقط پایین را کمی تیره می‌کند */
.banner:has(.banner__img)::after { background: linear-gradient(0deg, rgba(4, 38, 36, .55) 0%, transparent 55%); }

/* ---------- محصولات منتخب ---------- */
.products-section .rail { --rail-item: 262px; }

/* ---------- نوار تخفیف ---------- */
.sale {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-inline: clamp(0px, 2vw, 24px);
  padding-block: var(--section-y);
  border-radius: var(--r-2xl);
  background: var(--noise), var(--grad-night);
  color: var(--on-dark);
}
.sale::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 680px;
  height: 680px;
  inset-inline-start: -220px;
  bottom: -340px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 40px, var(--ring-line) 40px 41.5px);
  animation: dn-spin 90s linear infinite;
}
.sale::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  inset-inline-end: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, .5), transparent 65%);
  filter: blur(10px);
  animation: dn-drift 16s ease-in-out infinite;
}
.sale h2 { color: #fff; }
.sale__head p { color: var(--on-dark-muted); }
.sale .section-head h2::after { background: linear-gradient(90deg, var(--amber), #ffd27a, var(--amber)); background-size: 200% 100%; }
.sale .eyebrow--dark { background: rgba(245, 165, 36, .18); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .5); color: #fff3d6; }
.sale .p-card { border-color: transparent; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55); }
.sale__more { margin-top: 28px; }

/* ---------- پکیج‌ها، مطالب ---------- */
.packages, .posts {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* ---------- روند خرید ---------- */
.steps-section .cta { margin-top: clamp(8px, 2vw, 16px); }

/* ---------- لکه‌های نور شناور در بخش‌های روشن ---------- */
.section--soft { overflow: hidden; isolation: isolate; }
.section--soft::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  inset-inline-start: -180px;
  top: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, .16), transparent 65%);
  animation: dn-drift 24s ease-in-out infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero__aurora span, .hero__visual::before { animation: none; }
}

/* ==========================================================================
   دیوار پایش هوشمند (_CctvWall)
   ========================================================================== */
.cctv-wall {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-inline: clamp(0px, 2vw, 24px);
  padding-block: var(--section-y);
  border-radius: var(--r-2xl);
  background:
    radial-gradient(50% 60% at 15% 50%, rgba(45, 212, 191, .22), transparent 70%),
    radial-gradient(40% 50% at 95% 10%, rgba(34, 211, 238, .16), transparent 70%),
    var(--noise),
    linear-gradient(160deg, #042f2c 0%, #063b37 55%, #0a4a45 100%);
  color: var(--on-dark);
}
.cctv-wall__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 10%, transparent 75%);
}
/* جاروی رادار بزرگ در گوشه */
.cctv-wall__bg::after {
  content: "";
  position: absolute;
  width: 760px;
  height: 760px;
  right: -380px;
  bottom: -380px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 300deg, rgba(45, 212, 191, .28) 360deg),
    repeating-radial-gradient(circle, transparent 0 58px, var(--ring-line) 58px 59.5px);
  animation: dn-spin 9s linear infinite;
}
.cctv-wall__inner { display: grid; align-items: center; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 1000px) { .cctv-wall__inner { grid-template-columns: .85fr 1.15fr; } }
.cctv-wall__copy { display: grid; gap: 22px; }
/* در موبایل نمایشگر درست زیر تیتر می‌آید، پیش از دکمه‌های قابلیت */
@media (max-width: 999px) {
  .cctv-wall__inner { gap: 22px; }
  .cctv-wall__copy { display: contents; }
  .cctv-wall .section-head { order: 1; }
  .cctv-wall .monitor { order: 2; }
  .cctv-features { order: 3; }
  .cctv-modes { order: 4; }
}
.cctv-wall .section-head { margin-bottom: 4px; }
.cctv-wall h2 { color: #fff; }
.cctv-wall .section-head p { color: var(--on-dark-muted); font-size: var(--fs-md); }
.cctv-wall .hl { background: var(--grad-text-dark); -webkit-background-clip: text; background-clip: text; }

.cctv-features { display: grid; gap: 10px; }
@media (min-width: 560px) and (max-width: 999px) { .cctv-features { grid-template-columns: 1fr 1fr; } }
.cctv-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--on-dark);
  text-align: start;
  transition: background var(--dur-2), color var(--dur-2), transform var(--dur-2) var(--ease), box-shadow var(--dur-2);
}
.cctv-feature:hover { background: var(--glass-strong); transform: translateX(-4px); }
.cctv-feature__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  color: var(--mint);
  transition: background var(--dur-2), color var(--dur-2);
}
.cctv-feature__body { display: grid; gap: 1px; line-height: 1.6; }
.cctv-feature__body b { font-size: var(--fs-sm); }
.cctv-feature__body small { color: var(--on-dark-muted); font-size: var(--fs-xs); }
.cctv-feature[aria-pressed="true"] { background: #fff; color: var(--on-white-ink); box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .55); }
.cctv-feature[aria-pressed="true"] .cctv-feature__icon { background: var(--grad-brand); color: #fff; }
.cctv-feature[aria-pressed="true"] small { color: var(--on-white-muted); }

.cctv-modes { display: inline-flex; justify-self: start; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.cctv-modes button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background var(--dur-2), color var(--dur-2);
}
.cctv-modes button:hover { color: #fff; }
.cctv-modes button[aria-pressed="true"] { background: #fff; color: var(--on-white-ink); }
.cctv-modes .icon { width: 1.05em; height: 1.05em; }

/* ---------- نمایشگر ---------- */
.monitor { position: relative; margin: 0 0 34px; }
.monitor::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 34%;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#0b1d1c, #031413);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}
.monitor__screen {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(160deg, #0d1f1e, #050f0f);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 40px 80px -30px rgba(0, 0, 0, .75),
    0 0 90px -20px rgba(45, 212, 191, .4);
}
.monitor__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.monitor__bar, .monitor__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 6px;
  color: rgba(204, 251, 241, .7);
  font-size: var(--fs-2xs);
  font-weight: 700;
  direction: ltr;
}
.monitor__live { display: inline-flex; align-items: center; gap: 6px; color: #ffb4b4; letter-spacing: .1em; }
.monitor__live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 8px #ff4d4f; animation: dn-pulse 1.4s ease-in-out infinite; }
.monitor__title { letter-spacing: .12em; }
.monitor__mode { padding: 1px 10px; border-radius: var(--r-pill); background: rgba(45, 212, 191, .18); color: var(--mint); direction: rtl; }
.monitor__status > span { display: inline-flex; align-items: center; gap: 6px; }
.monitor__status .icon { width: 14px; height: 14px; color: var(--aqua); }
.monitor__meter { display: inline-block; width: 60px; height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.monitor__meter i { display: block; width: 82%; height: 100%; background: var(--grad-spectrum); }
.monitor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* ---------- یک تصویر ---------- */
.feed {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #0b1515;
  color: #fff;
  font-size: clamp(9px, .8vw, 11px);
  transition: opacity .5s var(--ease), filter .5s var(--ease), box-shadow .5s var(--ease);
}
.feed__scene { width: 100%; height: 100%; transition: filter .6s var(--ease); }
/* خطوط اسکن و سایه‌ی لبه‌ی تصویر */
.feed::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .45) 100%);
  pointer-events: none;
}
/* قاب هشدار یا انتخاب */
.feed::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent;
  pointer-events: none;
  transition: box-shadow .4s var(--ease);
}
.feed__cam, .feed__rec, .feed__time, .feed__ai, .feed__count, .feed__alarm {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(2, 12, 13, .55);
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.feed__cam { top: 6px; right: 6px; }
.feed__rec { top: 6px; left: 6px; direction: ltr; color: #ffd0d0; letter-spacing: .08em; }
.feed__rec::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 6px #ff4d4f; animation: dn-pulse 1.2s ease-in-out infinite; }
.feed__time { bottom: 6px; left: 6px; direction: ltr; font-size: .92em; }
.feed__count { top: 6px; left: 50%; transform: translateX(-50%); }
.feed__count b { color: var(--mint); }
.feed__ai {
  bottom: 6px;
  right: 6px;
  background: rgba(13, 148, 136, .85);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.feed__ai .icon, .feed__alarm .icon { width: 1.1em; height: 1.1em; }
.feed__alarm {
  top: 50%;
  left: 50%;
  padding: 4px 10px;
  background: rgba(220, 38, 38, .9);
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: cw-alarm 9s linear infinite;
}

/* تمرکز روی یک قابلیت */
.cctv-wall[data-focus] .feed { opacity: .4; filter: saturate(.5); }
.cctv-wall[data-focus="human"] .feed[data-feed="human"],
.cctv-wall[data-focus="plate"] .feed[data-feed="plate"],
.cctv-wall[data-focus="heat"] .feed[data-feed="heat"],
.cctv-wall[data-focus="line"] .feed[data-feed="line"] { opacity: 1; filter: none; }
.cctv-wall[data-focus="human"] .feed[data-feed="human"]::after,
.cctv-wall[data-focus="plate"] .feed[data-feed="plate"]::after,
.cctv-wall[data-focus="heat"] .feed[data-feed="heat"]::after,
.cctv-wall[data-focus="line"] .feed[data-feed="line"]::after { box-shadow: inset 0 0 0 2px var(--aqua), 0 0 24px rgba(45, 212, 191, .5); }
.cctv-wall[data-focus="human"] .feed[data-feed="human"] .feed__ai,
.cctv-wall[data-focus="plate"] .feed[data-feed="plate"] .feed__ai,
.cctv-wall[data-focus="heat"] .feed[data-feed="heat"] .feed__ai,
.cctv-wall[data-focus="line"] .feed[data-feed="line"] .feed__ai { opacity: 1; transform: none; }

/* حالت‌های تصویر */
.feed__lamp, .feed__window { opacity: 0; transition: opacity .6s var(--ease); }
.cctv-wall[data-mode="night"] .feed__scene { filter: brightness(.6) saturate(1.45) contrast(1.05); }
.cctv-wall[data-mode="night"] .feed__lamp { opacity: 1; }
.cctv-wall[data-mode="night"] .feed__window { opacity: .7; }
.cctv-wall[data-mode="ir"] .feed__scene { filter: grayscale(1) brightness(1.08) contrast(1.35); }
.cctv-wall[data-mode="ir"] .feed__rec::after { content: "IR"; margin-inline-start: 4px; color: #fff; }

/* ---------- حرکت‌ها ----------
   جابه‌جایی‌ها transform سی‌اس‌اس هستند و حالت پایه‌ی هر کدام وسط مسیر است، تا بدون انیمیشن هم صحنه کامل باشد. */
.feed__walker--entrance { transform: translate(150px, 0); animation: cw-walk-ltr 11s linear infinite; }
.feed__walker--yard { transform: translate(150px, 0); animation: cw-walk-rtl 9s linear infinite; }
.feed__walker--shop { transform: translate(150px, 0); animation: cw-wander 14s ease-in-out infinite; }
.feed__walker use { animation: cw-bob .5s ease-in-out infinite alternate; }
.feed__walker--shop use { animation-duration: .7s; }
.feed__car { transform: translate(150px, 104px); animation: cw-park 12s var(--ease) infinite; }
.feed__plate { animation: cw-plate 12s linear infinite; }
.feed__heat { transform-box: fill-box; transform-origin: center; animation: cw-heat 3.2s ease-in-out infinite alternate; }
.feed__heat--2 { animation-delay: -1.2s; animation-duration: 2.6s; }
.feed__heat--3 { animation-delay: -2s; animation-duration: 3.8s; }
.feed__tripwire path:first-child { animation: cw-dash 1s linear infinite; }
.feed__walker--yard .feed__box { opacity: 0; animation: cw-yard-box 9s linear infinite; }
.feed[data-feed="line"]::after { animation: cw-alarm-frame 9s linear infinite; }

@keyframes cw-walk-ltr { from { transform: translate(-40px, 0); } to { transform: translate(360px, 0); } }
@keyframes cw-walk-rtl { from { transform: translate(340px, 0); } to { transform: translate(-40px, 0); } }
@keyframes cw-wander {
  0%, 100% { transform: translate(40px, 0); }
  30% { transform: translate(150px, -8px); }
  55% { transform: translate(178px, -8px); }
  80% { transform: translate(110px, 4px); }
}
@keyframes cw-bob { to { transform: translateY(-2px); } }
@keyframes cw-park {
  0% { transform: translate(350px, 104px); }
  30%, 72% { transform: translate(150px, 104px); }
  100% { transform: translate(-160px, 104px); }
}
@keyframes cw-plate { 0%, 30% { opacity: 0; } 36%, 70% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes cw-heat { from { transform: scale(.82); opacity: .7; } to { transform: scale(1.12); opacity: 1; } }
@keyframes cw-dash { to { stroke-dashoffset: -26; } }
@keyframes cw-yard-box { 0%, 50% { opacity: 0; } 53%, 76% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes cw-alarm { 0%, 52% { opacity: 0; } 54%, 74% { opacity: 1; } 56%, 60%, 64%, 68% { opacity: .55; } 76%, 100% { opacity: 0; } }
@keyframes cw-alarm-frame { 0%, 52% { box-shadow: inset 0 0 0 2px transparent; } 54%, 74% { box-shadow: inset 0 0 0 3px #ef4444, inset 0 0 40px rgba(239, 68, 68, .45); } 76%, 100% { box-shadow: inset 0 0 0 2px transparent; } }

/* انیمیشن‌ها فقط وقتی دیوار دیده می‌شود */
.cctv-wall:not(.is-live) .feed *,
.cctv-wall:not(.is-live) .feed::after,
.cctv-wall:not(.is-live) .cctv-wall__bg::after { animation-play-state: paused; }

@media (max-width: 520px) {
  .feed__cam { display: none; }
  .feed__count { font-size: .9em; }
}

/* ==========================================================================
   دوربین‌یاب (_CameraFinder)
   ========================================================================== */
.finder {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(18px, 3vw, 36px);
  border-radius: var(--r-2xl);
  background: var(--bg);
  box-shadow: var(--sh-3), inset 0 0 0 1px var(--line);
}
@media (min-width: 980px) { .finder { grid-template-columns: 1.2fr .85fr; } }
.finder__result .tracker-cam { top: 10px; left: 6px; width: clamp(120px, 11vw, 150px); }
.finder__form { display: grid; gap: 22px; align-content: start; }
.finder .section-head { margin-bottom: 0; }
.finder__group { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.finder__group legend { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0; font-weight: 800; }
.finder__step {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: var(--fs-xs);
}
.finder__places { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.finder__place { position: relative; cursor: pointer; }
.finder__place input { position: absolute; opacity: 0; pointer-events: none; }
.finder__place span {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: center;
  transition: background var(--dur-2), box-shadow var(--dur-2), color var(--dur-2), transform var(--dur-2) var(--ease-spring);
}
.finder__place .icon { width: 30px; height: 30px; stroke-width: 1.5; color: var(--teal-700); transition: color var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.finder__place:hover span { box-shadow: inset 0 0 0 1.5px var(--sky); }
.finder__place input:checked + span { background: var(--grad-brand); box-shadow: var(--sh-glow); color: #fff; transform: translateY(-3px); }
.finder__place input:checked + span .icon { color: #fff; transform: scale(1.12); }
.finder__place input:focus-visible + span { outline: 2px solid var(--aqua); outline-offset: 3px; }
.finder__row { display: grid; gap: 20px; align-items: end; }
@media (min-width: 640px) { .finder__row { grid-template-columns: 1fr auto; } }
.finder__range { display: flex; align-items: center; gap: 14px; }
.finder__range input { flex: 1; min-width: 0; accent-color: var(--teal); height: 6px; }
.finder__value { flex: none; min-width: 84px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--bg-tint); color: var(--teal-700); font-size: var(--fs-sm); text-align: center; }
.finder__qty input { -moz-appearance: textfield; }
.finder__switch { font-weight: 600; }
.finder__days .chip-row { flex-wrap: wrap; }

.finder__result {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--r-xl);
  background: var(--noise), var(--grad-night);
  color: var(--on-dark);
}
.finder__result::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  inset-inline-end: -170px;
  top: -170px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 32px, var(--ring-line) 32px 33.5px);
}
.finder__result-title { display: flex; align-items: center; gap: 8px; color: #fff; font-size: var(--fs-md); }
.finder__result-title .icon { color: var(--mint); }
.finder__big { display: flex; align-items: flex-end; gap: 12px; }
.finder__num {
  background: var(--grad-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(3.4rem, 2.4rem + 4vw, 5rem);
  font-weight: 900;
  line-height: 1;
}
.finder__num.is-bump { animation: dn-bump .45s var(--ease-spring); }
.finder__unit { display: grid; padding-bottom: 6px; font-size: var(--fs-xl); font-weight: 800; line-height: 1.4; }
.finder__unit small { color: var(--on-dark-muted); font-size: var(--fs-xs); font-weight: 600; }
.finder__split { height: 8px; overflow: hidden; border-radius: var(--r-pill); background: rgba(245, 165, 36, .85); }
.finder__split-in { display: block; width: var(--w, 50%); height: 100%; border-radius: inherit; background: var(--mint); transition: width .6s var(--ease); }
.finder__specs { display: grid; gap: 10px; font-size: var(--fs-sm); }
.finder__specs li { display: flex; align-items: center; gap: 10px; }
.finder__specs .icon { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--mint); }
.finder__specs b { color: #fff; font-size: var(--fs-md); }
.finder__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.finder__actions .btn--primary { background: #fff; color: var(--on-white-teal); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .5); }
.finder__note { color: var(--on-dark-muted); font-size: var(--fs-xs); line-height: 1.9; }
.finder__note a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- پیوند دوربین‌یاب در هیرو ---------- */
.hero__finder {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: var(--r-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--on-dark-muted);
  font-size: var(--fs-sm);
  transition: background var(--dur-2), color var(--dur-2), gap var(--dur-2);
}
.hero__finder b { color: #fff; }
.hero__finder:hover { background: var(--glass-strong); color: #fff; gap: 14px; }
.hero__finder-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--on-accent); }
.hero__finder-icon .icon { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .feed__walker--entrance, .feed__walker--yard, .feed__walker--shop, .feed__car, .feed__walker use,
  .feed__heat, .feed__plate, .feed__alarm, .feed[data-feed="line"]::after, .feed__walker--yard .feed__box,
  .cctv-wall__bg::after { animation: none !important; }
  .feed__plate { opacity: 1; }
}

/* ==========================================================================
   ویترین صفحه‌ی اصلی: بنر متحرک + پنل پیشنهادهای ویژه
   فضای بالای صفحه برای خرید است، نه فقط معرفی؛ بنر و کالای تخفیف‌دار کنار هم، همان لحظه‌ی ورود.
   ========================================================================== */
.showcase {
  position: relative;
  isolation: isolate;
  padding-block: clamp(18px, 3vw, 32px) clamp(8px, 2vw, 20px);
  background: var(--grad-soft);
}
.showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(13, 148, 136, .06) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(13, 148, 136, .06) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.showcase__grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .showcase__grid { grid-template-columns: minmax(0, 1fr) 390px; align-items: stretch; }
  .showcase__grid--solo { grid-template-columns: minmax(0, 1fr); }
}

/* هیرو درون ویترین: همان هیرو، به‌صورت کارت گرد و جمع‌وجورتر کنار پنل پیشنهادها */
.hero--card {
  display: grid;
  align-items: center;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
}
.hero--card .hero__inner { gap: clamp(16px, 2vw, 28px); }
@media (min-width: 1000px) { .hero--card .hero__inner { grid-template-columns: 1.25fr .75fr; } }
.hero--card h1 { font-size: var(--fs-2xl); line-height: 1.4; }
.hero--card p { font-size: var(--fs-sm); }
.hero--card .hero__copy { gap: 14px; }
.hero--card .hero__actions { gap: 10px; }
.hero--card .hero__actions .btn { min-height: 46px; padding-inline: 18px; font-size: var(--fs-sm); }
.hero--card .hero__visual { width: min(100%, 340px); }
.hero--card .hero__tag--2, .hero--card .hero__tag--3 { display: none; }
@media (max-width: 999px) { .hero--card .hero__visual { width: min(100%, 320px); } }
.hero--card .hero__tag { font-size: var(--fs-2xs); padding: 6px 10px; }
.hero--card .hero__tag--1 { right: 0; }
.hero--card .hero__tag--2 { left: 0; }
@media (min-width: 1000px) { .hero--card .hero__tag--1 { right: -4%; } }

/* ---------- پنل پیشنهادهای ویژه ---------- */
.spot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
}
.spot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -90px;
  top: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 165, 36, .22), transparent 65%);
}
.spot__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.spot__title { display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); font-weight: 900; line-height: 1.4; }
.spot__live { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #e5252a; box-shadow: 0 0 10px rgba(229, 37, 42, .7); }
.spot__live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #e5252a; animation: dn-ring-ping 1.8s var(--ease-out) infinite; }
.spot__sub { margin: 2px 0 0; color: var(--fg-muted); font-size: var(--fs-xs); }
.spot__more {
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, #e5252a, #ff5a4f);
  box-shadow: 0 10px 20px -10px rgba(229, 37, 42, .8);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  transition: transform var(--dur-3) var(--ease-spring);
}
.spot__more:hover { transform: translateY(-2px); color: #fff; }

.spot__stage { position: relative; min-height: 148px; }
.spot__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px);
  transition: opacity .45s var(--ease-out), transform .55s var(--ease-out), visibility 0s .45s, box-shadow var(--dur-2);
}
[dir="ltr"] .spot__item { transform: translateX(-14px); }
.spot__item.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.spot__item:hover { box-shadow: inset 0 0 0 1.5px var(--primary); }
.spot__item::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 22%;
  bottom: 22%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #e5252a;
}
.spot__media {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: var(--r);
  background: var(--grad-media);
  box-shadow: inset 0 0 0 1px var(--line);
}
.spot__media img { width: 88%; height: 88%; object-fit: contain; transition: transform .6s var(--ease-out); }
.spot__item:hover .spot__media img { transform: scale(1.08) rotate(-2deg); }
.spot__badge { position: absolute; top: -6px; inset-inline-start: -6px; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .4); }
.spot__body { display: grid; gap: 4px; min-width: 0; }
.spot__cat { color: var(--primary-strong); font-size: var(--fs-2xs); font-weight: 700; }
.spot__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.7;
}
.spot__body .price strong { color: #c8281c; font-size: var(--fs-md); }

.spot__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.spot__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--grad-media);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: transform var(--dur-3) var(--ease-spring), box-shadow var(--dur-2);
}
.spot__thumb img { width: 80%; height: 80%; object-fit: contain; opacity: .75; transition: opacity var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.spot__thumb:hover { transform: translateY(-3px); }
.spot__thumb:hover img, .spot__thumb.is-active img { opacity: 1; }
.spot__thumb.is-active { box-shadow: inset 0 0 0 2px var(--primary), 0 10px 20px -12px rgba(13, 148, 136, .8); }
.spot__thumb.is-active img { transform: scale(1.08); }

/* نوار اعتماد زیر ویترین عادی می‌نشیند (دیگر روی لبه‌ی هیرو نمی‌افتد) */
.showcase + .trust { margin-top: clamp(16px, 2.5vw, 28px); }

@media (max-width: 520px) {
  .spot__media { width: 92px; height: 92px; }
}
