/* اسلایدر: ویدیو فقط در بخش stage */
.site-hero {
  /* قاب ۱۶:۹ (مثل ۱۹۲۰×۱۰۸۰) — حداکثر عرض نمایش */
  --hero-frame-max-w: 48rem;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.site-hero__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: min(60vh, 600px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* فلش‌ها: چپ = قبلی، راست = بعدی (لبهٔ فیزیکی صفحه) */
.site-hero__edge {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.site-hero__edge:hover,
.site-hero__edge:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.site-hero__edge:active {
  transform: translateY(-50%) scale(0.96);
}

.site-hero__edge--prev {
  left: clamp(0.35rem, 1.5vw, 0.85rem);
}

.site-hero__edge--next {
  right: clamp(0.35rem, 1.5vw, 0.85rem);
}

.site-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(5, 12, 22, 0.55) 38%,
    rgba(8, 18, 32, 0.45) 62%,
    rgba(0, 0, 0, 0.25) 100%
  );
  pointer-events: none;
}

.site-hero__inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  row-gap: 1.25rem;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: min(1300px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.75rem)
    max(
      var(--header-pad-x, 1.25rem),
      calc(var(--header-pad-x, 1.25rem) + 2.75rem)
    );
  padding-top: clamp(1.1rem, 2.5vw, 1.5rem);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-hero--ready .site-hero__inner {
  opacity: 1;
  transform: translateY(0);
}

.site-hero__col--text {
  min-width: 0;
  box-sizing: border-box;
  align-self: center;
  text-align: start;
}

.site-hero__text-card {
  width: 100%;
  max-width: 32rem;
  margin-inline-end: auto;
}

.site-hero__text-body {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-hero__text-body.is-anim-out {
  opacity: 0;
  transform: translateY(0.4rem);
}

.site-hero__text-body.is-anim-in {
  animation: site-hero-text-in 0.5s ease forwards;
}

@keyframes site-hero-text-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-hero__title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.site-hero__sub {
  margin: 0 0 1.1rem;
  max-width: 30rem;
  font-size: clamp(0.9rem, 1.1vw, 0.98rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.site-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.5rem 1.35rem;
  border-radius: 0 30px 0 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.site-hero__btn:hover,
.site-hero__btn:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
  outline: none;
}

.site-hero__btn:active {
  transform: scale(0.98);
}

.site-hero__col--media {
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: min(100%, var(--hero-frame-max-w, 48rem));
  margin-inline: auto;
}

.site-hero__frame {
  position: relative;
  width: 100%;
  max-width: min(100%, var(--hero-frame-max-w, 48rem));
  box-sizing: border-box;
  margin-inline: auto;
  /* همان نسبت ۱۹۲۰×۱۰۸۰ (۱۶:۹) */
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 0 30px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background: #0a1420;
}

.site-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.site-hero__img.is-visible {
  opacity: 1;
}

/* موبایل: زیر هم + وسط دقیق در عرض (بدون width:100% روی گریدآیتم) */
@media (max-width: 900px) {
  .site-hero__stage {
    min-height: min(64vh, 540px);
  }

  .site-hero__edge {
    width: 42px;
    height: 42px;
  }

  .site-hero__edge--prev {
    left: clamp(0.25rem, 1.2vw, 0.5rem);
  }

  .site-hero__edge--next {
    right: clamp(0.25rem, 1.2vw, 0.5rem);
  }

  .site-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    gap: 0.75rem;
    padding-bottom: 1.4rem;
    padding-inline: max(var(--header-pad-x, 1rem), calc(var(--header-pad-x, 1rem) + 2.25rem));
  }

  .site-hero__col--text {
    order: 1;
    width: 100%;
    text-align: center;
  }

  .site-hero__text-card {
    margin-inline: auto;
    max-width: 26rem;
  }

  .site-hero__sub {
    margin-inline: auto;
  }

  .site-hero__col--media {
    order: 2;
    width: 100%;
    max-width: min(100%, var(--hero-frame-max-w, 48rem));
    margin-inline: 0;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-hero__inner,
  .site-hero__img,
  .site-hero__edge,
  .site-hero__text-body {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .site-hero--ready .site-hero__inner {
    transform: none;
  }

  .site-hero__text-body.is-anim-in {
    animation: none;
  }
}

/* بقیه صفحه */
.site-page {
  position: relative;
  z-index: 2;
  min-height: 30vh;
  padding: 2rem var(--header-pad-x, 1.25rem) 3rem;
  color: rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
}
