/* =====================================================================
   about-flex-section — full-screen carousel
===================================================================== */

.about-flex {
  position: relative;
  width: 100vw;
  margin: 0;
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.about-flex__static,
.about-flex__viewport {
  width: 100vw;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

/* Embla manages slide movement itself; native horizontal scroll-snap
   on the shared carousel viewport breaks arrows and drag on inner pages. */
.wp-block-lazyblock-about-flex-section .about-flex__viewport {
  overflow: hidden !important;
  scroll-snap-type: none !important;
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: auto !important;
  overscroll-behavior-x: auto !important;
}

.about-flex__static .about-flex__slide,
.about-flex__track {
  height: 100%;
}

.about-flex__track {
  display: flex;
  flex-wrap: nowrap;
  width: auto;
  gap: 0;
  padding: 0;
  margin: 0;
  align-items: stretch;
}

.about-flex__slide {
  position: relative;
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  min-width: 100vw;
  margin: 0;
  overflow: hidden;
  background: #f4f4f4;
}

/* Кликабельный слайд (вся область переходит по data-slide-link через JS,
   с учётом drag-thresholds, чтобы не ломать swipe Embla) */
.about-flex__slide[data-slide-link] { cursor: pointer; }

/* Медиа: фото/видео cover */
.about-flex__media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 1;
}

.about-flex__imgWrap,
.about-flex__videoWrap {
  position: absolute;
  inset: 0;
}

.about-flex__imgWrap[hidden],
.about-flex__videoWrap[hidden] { display: none !important; }

.about-flex__img,
.about-flex__video,
.about-flex__embed iframe,
.about-flex__videoWrap video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  background: #2a2c33;
}

/* Кнопка play */
.about-flex__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  cursor: pointer;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .25s ease, transform .25s ease;
}
.about-flex__play:hover { background: rgba(0, 0, 0, .55); }
.about-flex__play img { width: 36px; height: 36px; }

/* Подпись + описание поверх медиа */
.about-flex__content {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: clamp(40px, 8vh, 96px) clamp(24px, 5.7vw, 82px);
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 12vh, 140px);
}

.about-flex__content > * { pointer-events: auto; }

/* Подпись (ярлык секции) — top-left */
.about-flex__label {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 200;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: capitalize;
  color: #000;
}

/* Описание */
.about-flex__copy {
  max-width: 520px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 10px;
  line-height: 1.8;
  color: #595959;
}

.about-flex__description p { margin: 0 0 1em; }
.about-flex__description p:last-child { margin-bottom: 0; }

.about-flex__more {
  display: inline-block;
  margin-top: 14px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 500;
  font-size: 8px;
  letter-spacing: .04em;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 5;
}
.about-flex__more:hover { text-decoration: underline; }

/* ----- Цвет текста ----- */
.about-flex__slide.is-text-light .about-flex__label { color: #ffffff; }
.about-flex__slide.is-text-light .about-flex__copy  { color: #b8b8b8; }

.about-flex__slide.is-text-dark .about-flex__label  { color: #000000; }
.about-flex__slide.is-text-dark .about-flex__copy   { color: #595959; }

/* ----- Позиция описания ----- */
.about-flex__slide.is-pos-left  .about-flex__copy { align-self: flex-start; }
.about-flex__slide.is-pos-center .about-flex__copy { align-self: center; }
.about-flex__slide.is-pos-right .about-flex__copy { align-self: flex-end; }

/* Стрелки — оставляем позиционирование от глобального .home блока,
   стилизуем размер/цвет здесь */
.about-flex__btn {
  width: 30px;
  height: 30px;
  z-index: 6;
}
.about-flex__btn img { width: 100%; height: 100%; display: block; }

/* Если только один слайд — стрелок нет (PHP не рендерит карусель) */

/* ===== MOBILE ===== */
@media (max-width: 991px) {
  .about-flex__static,
  .about-flex__viewport {
    height: 100vh;
    min-height: 480px;
  }

  .about-flex__content {
    padding: clamp(24px, 6vh, 48px) clamp(16px, 5vw, 30px);
    gap: clamp(40px, 8vh, 80px);
  }

  .about-flex__copy { max-width: 100%; }
  .about-flex__description { display: none; }

  .about-flex__play { width: 72px; height: 72px; }
  .about-flex__play img { width: 26px; height: 26px; }
}
