/* ===== توضیح فایل: استایل منوی بالای سایت (هدر) و حالت‌های موبایل/اسکرول ===== */

/* =========================================================
   استایل هدر ویدیویی تمام‌صفحه با افکت‌های هوش مصنوعی (GRS)
   یک فایل مستقل و کامل CSS — فقط مخصوص بخش هدر ویدیویی صفحه اصلی
   ========================================================= */

/* =========================================================
   1. FULLSCREEN HEADER — ۱. هدر تمام‌صفحه (کانتینر اصلی ویدیوی پس‌زمینه)
   ========================================================= */
.video-fullscreen-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: #080a10;
}

/* =========================================================
   2. VIDEO LAYER — ۲. لایه‌ی ویدیو (کادر نگه‌دارنده ویدیوی پس‌زمینه)
   ========================================================= */
.video-fullscreen-video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

/* =========================================================
   3. VIDEO — ۳. تگ ویدیو (تنظیمات پوشش کامل صفحه و برش تصویر)
   ========================================================= */
.video-fullscreen-wrap video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center center;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  z-index: 1;
  /* توجه: هرگز روی خود ویدیو filter نذار (brightness/blur/...)
     چون در کروم شتاب‌دهی سخت‌افزاری پخش ویدیو رو غیرفعال می‌کنه
     و باعث لگ شدید می‌شه. تیرگی از طریق لایه‌ی گرادیان روی ویدیو
     (بخش ۴، .video-fx-gradient) انجام می‌شه، نه فیلتر. */
}

/* =========================================================
   4. DARK GRADIENT — ۴. گرادیان تیره روی ویدیو (برای خوانا شدن متن روی ویدیو)
   ========================================================= */
.video-fx-gradient {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(4, 5, 8, 0.71) 22%,
      rgba(4, 5, 8, 0.65) 55%,
      rgba(4, 5, 8, 0.67) 65%,
      rgba(4, 5, 8, 0.82) 100%
    ),
    radial-gradient(
      ellipse at center,
      rgba(213, 28, 57, 0.13) 20%,
      rgba(4, 5, 8, 0.55) 75%
    );
}

/* =========================================================
   6. MAIN BLUE AI ORB — ۶. دایره نورانی آبی اصلی (افکت انیمیشنی هوش مصنوعی)
   ========================================================= */
.video-fx-scan {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  z-index: 4;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(40, 110, 255, 0.45) 0%,
    rgba(40, 110, 255, 0.28) 28%,
    rgba(40, 110, 255, 0.14) 34%,
    rgba(40, 110, 255, 0.06) 50%,
    transparent 72%
  );
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  animation: fxCenter 7s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

/* =========================================================
   7. RED AI ORB — ۷. دایره نورانی قرمز (افکت انیمیشنی مکمل)
   ========================================================= */
.video-fx-scan::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -220%;
  left: -140%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(213, 28, 57, 0.55) 0%,
    rgba(213, 28, 57, 0.34) 18%,
    rgba(213, 28, 57, 0.18) 34%,
    rgba(213, 28, 57, 0.07) 52%,
    transparent 72%
  );
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  animation: fxRed 4s ease-in-out infinite;
  will-change: transform, opacity;
}

/* =========================================================
   8. GREEN / BLUE AI ORB — ۸. دایره نورانی سبز/آبی (افکت انیمیشنی مکمل)
   ========================================================= */
.video-fx-scan::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  top: 60%;
  left: 90%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(0, 190, 125, 0.5) 0%,
    rgba(0, 190, 125, 0.3) 10%,
    rgba(0, 190, 125, 0.14) 36%,
    rgba(40, 110, 255, 0.07) 52%,
    transparent 72%
  );
  opacity: 0.6;
  transform: translate3d(0, 0, 0);
  animation: fxGreen 4.5s ease-in-out infinite;
  animation-delay: 1.2s;
  will-change: transform, opacity;
}

/* =========================================================
   9. BLUE CENTER ANIMATION — ۹. انیمیشن حرکت دایره آبی مرکزی (کی‌فریم)
   ========================================================= */
@keyframes fxCenter {
  0% {
    transform: translate3d(-35px, 20px, 0) scale(0.7);
    opacity: 0.35;
  }
  25% {
    transform: translate3d(-10px, -5px, 0) scale(0.95);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(25px, -15px, 0) scale(1.15);
    opacity: 0.7;
  }
  75% {
    transform: translate3d(5px, -30px, 0) scale(1.05);
    opacity: 0.6;
  }
  100% {
    transform: translate3d(-15px, -30px, 0) scale(0.8);
    opacity: 0.45;
  }
}

/* =========================================================
   10. RED ANIMATION — ۱۰. انیمیشن حرکت دایره قرمز (کی‌فریم)
   ========================================================= */
@keyframes fxRed {
  0% {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0.25;
  }
  20% {
    transform: translate3d(35px, -10px, 0) scale(0.85);
    opacity: 0.4;
  }
  40% {
    transform: translate3d(80px, -20px, 0) scale(1.1);
    opacity: 0.6;
  }
  60% {
    transform: translate3d(125px, 10px, 0) scale(1.25);
    opacity: 0.7;
  }
  80% {
    transform: translate3d(150px, 30px, 0) scale(1.05);
    opacity: 0.5;
  }
  100% {
    transform: translate3d(80px, -30px, 0) scale(0.75);
    opacity: 0.35;
  }
}

/* =========================================================
   11. GREEN ANIMATION — ۱۱. انیمیشن حرکت دایره سبز (کی‌فریم)
   ========================================================= */
@keyframes fxGreen {
  0% {
    transform: translate3d(0, 0, 0) scale(0.65);
    opacity: 0.25;
  }
  20% {
    transform: translate3d(-30px, -20px, 0) scale(0.85);
    opacity: 0.4;
  }
  40% {
    transform: translate3d(-70px, -40px, 0) scale(1.08);
    opacity: 0.5;
  }
  60% {
    transform: translate3d(-110px, -5px, 0) scale(1.2);
    opacity: 0.55;
  }
  80% {
    transform: translate3d(-140px, 20px, 0) scale(1.05);
    opacity: 0.4;
  }
  100% {
    transform: translate3d(-80px, -20px, 0) scale(0.75);
    opacity: 0.3;
  }
}

/* =========================================================
   12. CONTENT / TEXT — ۱۲. جایگاه محتوا/متن روی هدر (وسط‌چین عمودی)
   ========================================================= */
.video-fullscreen-wrap .v-middle {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 10;
}

/* =========================================================
   13. MAIN TITLE — ۱۳. عنوان اصلی هدر (h1)
   ========================================================= */
.video-fullscreen-wrap h1 {
  position: relative;
  font-size: 90px;
  font-weight: 700;
  margin-bottom: 0;
  color: #fff;
  line-height: 1em;
  display: inline-grid;
  z-index: 11;
}

/* =========================================================
   14. COMPANY SUBTITLE — ۱۴. زیرعنوان شرکت (h5)
   ========================================================= */
.video-fullscreen-wrap h5 {
  position: relative;
  font-family: "peyda", sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: #fff;
  margin: 15px 0;
  z-index: 11;
}

/* =========================================================
   15. COMPANY NAME — ۱۵. نام شرکت داخل زیرعنوان (span)
   ========================================================= */
.video-fullscreen-wrap h5 span {
  display: inline-block;
  position: relative;
  font-weight: lighter;
  font-size: 21px;
  color: #fff;
  margin-right: 20px;
  z-index: 11;
}

/* =========================================================
   16. AI BUTTON — ۱۶. دکمه‌های زیر هدر
   ========================================================= */
.video-fullscreen-wrap .button-1,
.video-fullscreen-wrap .button-2 {
  position: relative;
  z-index: 12;
  font-size: 14px;
}

/* =========================================================
   17. AI BUTTON CLICK — ۱۷. لینک‌های داخل محتوای هدر
   ========================================================= */
.video-fullscreen-wrap .v-middle a {
  position: relative;
  z-index: 12;
}

/* =========================================================
   18. MOBILE — ۱۸. حالت موبایل (ریسپانسیو زیر ۷۶۸px)
   ========================================================= */
@media (max-width: 768px) {
  .video-fullscreen-wrap {
    height: 100svh;
    min-height: 100svh;
  }
  .video-fullscreen-wrap h1 {
    font-size: 48px;
  }
  .video-fullscreen-wrap h5 span {
    font-size: 16px;
    margin-right: 0;
  }
  .video-fx-scan {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
  }
  .video-fx-scan::before {
    width: 240px;
    height: 240px;
  }
  .video-fx-scan::after {
    width: 280px;
    height: 280px;
  }
}

/* =========================================================
   19. SMALL MOBILE — ۱۹. حالت موبایل کوچک (ریسپانسیو زیر ۴۸۰px)
   ========================================================= */
@media (max-width: 480px) {
  .video-fullscreen-wrap h1 {
    font-size: 38px;
  }
  .video-fullscreen-wrap h5 span {
    font-size: 14px;
  }
}

/* =========================================================
   20. ACCESSIBILITY — ۲۰. دسترس‌پذیری (غیرفعال‌کردن انیمیشن برای کاربرانی که حرکت کم را ترجیح می‌دهند)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .video-fx-scan,
  .video-fx-scan::before,
  .video-fx-scan::after {
    animation: none !important;
  }
}
