/* OF — Ask Deb Videos
   Enqueued early on wp_enqueue_scripts as a file (never inline, never from a shortcode)
   so LiteSpeed CSS Combine cannot fold it into Salient's mobile @media block. */

.adv-wrap { width: 100%; }

.adv-heading {
  font-size: 28px;
  line-height: 38px;
  color: #231F20;
  margin: 0 0 24px;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
}

.adv-card,
body .adv-card {
  display: block;
  text-decoration: none;
  color: #231F20;
}

.adv-thumb {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #0a0a0a;
}

.adv-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.adv-card:hover .adv-thumb img { transform: scale(1.05); }

.adv-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.adv-play > span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .25);
  position: relative;
  transition: transform .3s ease;
}

.adv-play > span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #231F20;
}

.adv-card:hover .adv-play > span { transform: scale(1.08); }

.adv-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 5px 7px;
  letter-spacing: .02em;
}

.adv-title {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.35;
  color: #231F20;
  font-weight: 500;
}

.adv-card:hover .adv-title { text-decoration: underline; }

.adv-viewall {
  margin-top: 34px;
  text-align: center;
}

body .adv-btn {
  display: inline-block;
  min-width: 230px;
  padding: 0 22px;
  height: 54px;
  line-height: 54px;
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 0;
  background: #231F20;
  color: #fff;
  text-decoration: none;
  transition: opacity .25s ease;
}

body .adv-btn:hover { opacity: .82; color: #fff; }

/* Archive page: let the grid reflow rather than pinning 6 across. */
.adv-grid.adv-grid-all {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  row-gap: 40px;
}

/* The theme prints the featured image under the post header. On a video post that is the
   9:16 poster at full content width, sitting directly above the player showing the same
   frame — hide it and let the player be the first thing you see. */
body.askdeb-video .featured-media-under-header__featured-media { display: none; }

/* Single video post player — 9:16, capped so it never dominates the page. */
.adv-player {
  max-width: 420px;
  margin: 0 auto 10px;
}

.adv-player video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  background: #0a0a0a;
}

.adv-player-meta {
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b6b6b;
  text-align: center;
}

/* Below 1000px the row becomes a swipe rail — same technique as the team
   and articles rails on the PM page. */
@media (max-width: 999px) {
  .adv-grid,
  .adv-grid.adv-grid-all {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding-bottom: 8px;
  }

  .adv-grid .adv-card {
    flex: 0 0 46%;
    scroll-snap-align: start;
  }

  .adv-title { font-size: 14px; }
}

@media (max-width: 600px) {
  .adv-grid .adv-card { flex: 0 0 58%; }
}
