/* Видео prigon.mp4 поверх всего в шапке, справа */
header {
  position: relative;
}
.hero-video-top {
  position: absolute;
  top: 0;
  right: -28px;
  z-index: 99999;
  width: 52.2%;
  max-width: 684px;
  height: 100%;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: visible;
}
.hero-video-top .hero-video-wrap {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}
.hero-video-top video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}
.hero-video-top .hero-video-play-pause {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(21, 105, 170, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-size: 20px;
  z-index: 5;
  pointer-events: auto;
}
.hero-video-top .hero-video-play-pause:hover {
  background: #1569aa;
}
.hero-video-top .hero-video-play-pause.hero-video-btn-hidden,
.hero-video-top .hero-video-wrap.video-playing .hero-video-play-pause {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.hero-video-top .hero-video-play-pause {
  transition: opacity 0.4s ease, background 0.2s;
}
.hero-video-top .hero-video-play-icon {
  margin-left: 3px;
}
.hero-video-top .hero-video-btn {
  flex: 0 0 auto;
  pointer-events: auto;
  margin-top: 0.25rem;
  width: 90%;
}

/* Offers carousel: видно 3 карточки + края соседних, кнопки по бокам по центру */
.offers-carousel-viewport {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  padding: 24px 78px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.offers-carousel-viewport .carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 0;
  justify-content: flex-start;
  align-items: stretch;
  -webkit-overflow-scrolling: touch;
}
.offers-carousel-viewport .carousel-track::-webkit-scrollbar {
  display: none;
}
.offers-carousel-viewport .carousel-track {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.offers-carousel-viewport .mobile-card {
  flex: 0 0 auto;
  width: 250px;
  min-width: 250px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}
.offers-carousel-viewport .mobile-card.is-center {
  opacity: 1;
}
.offers-carousel-viewport .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(21, 105, 170, 0.9);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.offers-carousel-viewport .carousel-arrow:hover {
  background: #1569aa;
}
.offers-carousel-viewport .carousel-prev {
  left: 16px;
}
.offers-carousel-viewport .carousel-prev::before {
  content: "\2039";
}
.offers-carousel-viewport .carousel-next {
  right: 16px;
}
.offers-carousel-viewport .carousel-next::before {
  content: "\203A";
}

/* Карусель видеоотзывов — как в "Новая папка" */
.youtube {
  background: #1C1C1C;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 200ms ease-out;
  cursor: pointer;
}
.youtube .youtube-poster {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 0;
  display: block;
}

.video-section {
  overflow-x: hidden;
}
.video-carousel {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
  overflow: visible;
}
.video-carousel-viewport {
  width: 100%;
  position: relative;
  height: 480px;
  overflow: visible;
}
.video-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: block !important;
  flex-wrap: nowrap !important;
  margin-top: 0 !important;
  overflow: visible;
}
.video-carousel-track .youtube {
  position: absolute;
  top: 0;
  left: 50%;
  width: 62%;
  height: 100% !important;
  transform: translateX(-50%) scale(0.8);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
  z-index: 1;
  margin-top: 0 !important;
  pointer-events: none;
  touch-action: manipulation;
  cursor: pointer;
}
.video-carousel-track .youtube.center {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  z-index: 3;
  filter: none;
  pointer-events: auto;
}
.video-carousel-track .youtube.side-left {
  transform: translateX(-96%) scale(0.82);
  opacity: 0.55;
  z-index: 2;
  filter: brightness(0.78);
}
.video-carousel-track .youtube.side-right {
  transform: translateX(-4%) scale(0.82);
  opacity: 0.55;
  z-index: 2;
  filter: brightness(0.78);
}
.video-carousel-track .youtube.hidden {
  transform: translateX(-50%) scale(0.7);
  opacity: 0;
  z-index: 1;
}
.video-carousel-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(21, 105, 170, 0.9);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}
.video-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ========== Мобильная адаптация (до 700px) ========== */
@media screen and (max-width: 700px) {
  /* Первый экран: порядок заголовок → видео → кнопка → список; видео на всю ширину */
  .hero-video-top {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    margin-top: 0.75rem;
    order: 0;
  }
  .hero-video-top .hero-video-wrap {
    width: 100%;
  }
  .hero-video-top {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center;
  }
  .hero-video-top video {
    max-height: 90vh;
    width: 100%;
  }
  .hero-video-top {
    min-height: 380px;
  }
  .hero-video-top .hero-video-btn {
    width: 100%;
    max-width: 100%;
    margin-top: 0.2rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-video-top .hero-video-play-pause {
    width: 44px;
    height: 44px;
  }

  .offers-carousel-viewport {
    padding: 16px 44px;
    max-width: 100%;
  }
  .offers-carousel-viewport .carousel-arrow {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .offers-carousel-viewport .carousel-prev {
    left: 8px;
  }
  .offers-carousel-viewport .carousel-next {
    right: 8px;
  }
  .offers-carousel-viewport .mobile-card {
    min-width: 220px;
    max-width: 260px;
  }

  .video-carousel {
    position: relative;
    display: block;
    margin-top: 30px;
  }
  .video-carousel-viewport {
    height: 420px;
  }
  .video-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    font-size: 26px;
    z-index: 5;
  }
  .video-carousel-btn.prev {
    left: 6px;
  }
  .video-carousel-btn.next {
    right: 6px;
  }
  .video-carousel-track .youtube {
    width: 76%;
  }
  .video-carousel-track .youtube.side-left {
    transform: translateX(-86%) scale(0.82);
  }
  .video-carousel-track .youtube.side-right {
    transform: translateX(-14%) scale(0.82);
  }
  .video-carousel-track .youtube.center {
    transform: translateX(-50%) scale(0.92);
  }
}
