/* ─── Video facade (click-to-play poster) ───────────────────────────────── */
/* Shared by single-video placements on feature/industry/use-case/comparison
   pages and by grid cards on /videos. */

.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #C4CDD5;
  cursor: pointer;
}

.video-facade__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s, filter 0.3s;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.18));
}

.video-facade:hover .video-facade__play,
.video-facade:focus-visible .video-facade__play {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-facade__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 9, 41, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

/* ─── Video row inside the alternating features list ────────────────────── */
/* Matches the sizing .b-features-item__img img gets in style.css so a video
   row lines up with the image rows around it, plus a soft halo and a
   play-icon chip so it reads as "watch this" rather than another screenshot. */

.b-features-item__img .video-facade {
  width: 528px;
  max-width: 100%;
  box-shadow: 0 0 0 8px rgba(9, 97, 219, 0.06), 0 30px 60px -30px rgba(20, 50, 120, 0.4);
}

.b-features-item--video .b-features-item__text strong::before {
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #0961DB;
}

/* ─── Single video placement (feature/industry/use-case/comparison pages) ── */

.video-placement__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.video-placement__lead-in {
  margin: 0 0 1.5rem;
  color: #5A6577;
  font-size: 17px;
  line-height: 1.6;
}

.video-placement__related-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #0961DB;
  font-weight: 500;
  font-size: 14px;
}

.video-placement__related-link:hover {
  text-decoration: underline;
}

/* ─── /videos page: category nav ─────────────────────────────────────────── */

.videos-nav {
  position: sticky;
  top: 0;
  /* Stays below the header's .b-dropdown (z-index: 20) so an open Features/
     Industries/Use Cases menu always renders above this bar, never under it. */
  z-index: 15;
  padding: 0.75rem 0;
  margin: 0 0 2.5rem;
  background: #fff;
  border-bottom: 1px solid #E1EEFD;
}

.videos-nav__inner {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
}

.videos-nav__inner::-webkit-scrollbar {
  display: none;
}

.videos-nav__link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.125rem;
  border: 1px solid #D6E8FD;
  border-radius: 999px;
  color: #0961DB;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.videos-nav__link:hover,
.videos-nav__link:focus,
.videos-nav__link.is-active {
  border-color: #0961DB;
  color: #fff;
  background: #0961DB;
  box-shadow: 0 8px 20px rgba(9, 97, 219, 0.25);
  text-decoration: none;
}

/* ─── /videos page: sections ─────────────────────────────────────────────── */

.videos-section {
  scroll-margin-top: 90px;
}

.videos-section__intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: #5A6577;
  font-size: 17px;
  line-height: 1.6;
}

.videos-grid--featured {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.videos-grid--featured .video-card__title {
  font-size: 19px;
}

.video-card__related-link {
  display: inline-flex;
  margin-top: 0.75rem;
  color: #0961DB;
  font-weight: 500;
  font-size: 13px;
}

.videos-section__more-links {
  max-width: 720px;
  margin: 2.5rem auto 0;
  text-align: center;
  color: #5A6577;
  font-size: 15px;
}

.videos-section__more-links a {
  color: #0961DB;
  font-weight: 500;
}

/* ─── Video modal ─────────────────────────────────────────────────────────── */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 9, 41, 0.75);
}

.video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
}

.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
  border: 0;
  cursor: pointer;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.video-modal-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  .videos-grid--featured {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .videos-grid--featured {
    grid-template-columns: 1fr;
  }

  .videos-nav__inner {
    /* Eight pills don't fit this width; keep them left-aligned so the
       horizontal scroll always starts from the first category. */
    justify-content: flex-start;
  }
}
