/* ==========================================================================
   Video Block
   File: assets/css/template-parts/video-block.css
   ========================================================================== */

/* ── Custom properties ──────────────────────────────────────── */
.video-block {
  --vb-padding: var(--hng-section-pad, clamp(2rem, 5vw, 4rem));
  --vb-gap: var(--hng-row-gap, clamp(1.5rem, 3vw, 2.5rem));
  --vb-player-radius: var(--radius-image, 40px);
  --vb-heading-size: var(--hng-h1-size, clamp(2.25rem, 4.5vw, 3.625rem));
  --vb-sub-size: var(--hng-body-size, clamp(1rem, 1.5vw, 1.25rem));
  --vb-play-size: clamp(56px, 8vw, 80px);
  --vb-mute-size: 2.2rem;
  --vb-player-bg: rgba(20, 8, 2, 0.72);
  margin-bottom: var(--hng-block-gap, 8%);
}

/* ── Outer section ──────────────────────────────────────────── */
.video-block {
  width: 100%;
  /* padding: clamp(1.5rem, 6vw, 6rem); */
  box-sizing: border-box;
}

/* ── Inner wrapper ──────────────────────────────────────────── */
.video-block__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--vb-gap);
}

/* ── Text area (heading + subheading) ──────────────────────── */
.video-block__text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-block__heading {
  margin: 0;
  font-family: "ITCAvantGarde", sans-serif;
  font-weight: 600 !important;
  font-style: normal;
  font-stretch: normal;
  font-size: var(--hng-h2-size, clamp(2.25rem, 4.5vw, 3.625rem));
  line-height: 1.1;
  color: var(--hng-orange, #f58220);
}

.video-block__subheading {
  margin: 0;
  font-family: "ITCAvantGarde", sans-serif;
  font-weight: 400 !important;
  font-style: normal;
  font-stretch: normal;
  font-size: var(--hng-body-size, clamp(1rem, 1.5vw, 1.25rem));
  line-height: 1.6;
  color: #ffffff;
}

/* ── Player wrapper ─────────────────────────────────────────── */
.video-block__player-wrap {
  position: relative;
  width: 75%;
  /* max-width: 1200px; */
  margin: 0 auto;
  border-radius: var(--vb-player-radius);
  overflow: hidden;
  background: var(--vb-player-bg);
  cursor: pointer;
  /* 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
}

/* ── <video> element ────────────────────────────────────────── */
.video-block__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--vb-player-radius);
}

/* ── Play / Pause button (centred overlay) ──────────────────── */
.video-block__play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--vb-play-size);
  height: var(--vb-play-size);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition:
    opacity 0.25s,
    transform 0.2s;
  z-index: 2;
}

.video-block__play-btn:hover {
  transform: scale(1.08);
}

/* Default: show play, hide pause */
.video-block__icon-play {
  display: block;
}
.video-block__icon-pause {
  display: none;
}

/* Playing state: show pause, fade out until hover */
.video-block__player-wrap.is-playing .video-block__play-btn {
  opacity: 0;
}
.video-block__player-wrap.is-playing:hover .video-block__play-btn {
  opacity: 1;
}
.video-block__player-wrap.is-playing .video-block__icon-play {
  display: none;
}
.video-block__player-wrap.is-playing .video-block__icon-pause {
  display: block;
}

.video-block__play-btn svg {
  width: 100%;
  height: 100%;
}

/* ── Mute button (bottom-right corner) ─────────────────────── */
.video-block__mute-btn {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  width: var(--vb-mute-size);
  height: var(--vb-mute-size);
  padding: 0.35rem;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.2s;
}

.video-block__mute-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.video-block__mute-btn svg {
  width: 100%;
  height: 100%;
}

/* Default: video starts muted, so show muted icon */
.video-block__icon-muted {
  display: block;
}
.video-block__icon-unmuted {
  display: none;
}

/* When unmuted: swap icons */
.video-block__player-wrap.is-unmuted .video-block__icon-muted {
  display: none;
}
.video-block__player-wrap.is-unmuted .video-block__icon-unmuted {
  display: block;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .video-block {
    --vb-padding: 1.25rem;
  }
}

