/**
 * @file
 * Hero video slider — full-bleed video, left-aligned title + outlined button.
 *
 * Desktop: fixed 455px height, video cropped and centred.
 * Mobile (<768px): true 16:9 ratio, content nudged clear of the back arrow.
 */

 .video-hero {
  position: relative;
  width: 100%;
  height: 455px;
  overflow: hidden;
  background: #000;
}

.video-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.video-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Video fills the box; excess is cropped equally on all sides so the
   frame stays centred horizontally and vertically. */
.video-hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Subtle scrim so white text stays readable over bright footage. */
.video-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

/* Overlay spans the slider; the inner .container gives the title and
   button the standard Bootstrap container width and gutters. */
.video-hero__overlay {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}

.video-hero__title,
.video-hero__button {
  max-width: 42rem;
}

.video-hero__title {
  margin: 0 0 1.25rem;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.video-hero__button {
  display: inline-block;
  padding: 0.85rem 2rem;
  border: 2px solid #fff;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.video-hero__button:hover,
.video-hero__button:focus {
  background-color: var(--blue-hover);
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--blue-hover);
}

/* Make the block full width inside Barrio's .row region. */
.region-featured-top > .block-views-blockhero-video-slider-block-1 {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Prev/next arrows flush on the slider edges. */
.video-hero__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 0;
  border-radius: 0;
  background: var(--body);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.video-hero__arrow svg {
  display: block;
}

.video-hero__arrow:hover,
.video-hero__arrow:focus-visible {
  background: var(--brand-links);
}

.video-hero__arrow--prev {
  left: 0;
}

.video-hero__arrow--next {
  right: 0;
}

.video-hero__arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Mobile: 16:9 ratio; content nudged clear of the back arrow. */
@media (max-width: 767px) {
  .video-hero {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Nudge the content in from the left so it clears the back arrow. */
  .video-hero__overlay .container {
    padding-left: 3.25rem;
  }

  .video-hero__title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
  }

  .video-hero__button {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
  }
}

/* Respect reduced motion: no fade, videos still rotate. */
@media (prefers-reduced-motion: reduce) {
  .video-hero__slide {
    transition: none;
  }
}