/* TBM Auto Appraiser — home page video cards (#videos)
   Portrait (9:16) cards. Phones and tablets: a swipe row that bleeds to the screen edge,
   with the next card peeking in. Desktop: one centered row of up to 300px cards (3 videos today). Behavior: assets/js/videos.js */

/* No visible heading, so the cards start right away: tighter than the standard section padding */
#videos { padding: clamp(48px, 6vw, 80px) 0; }

.reels {
  --reel-w: min(68vw, 250px);
  display: flex;
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.reel { flex: 0 0 var(--reel-w); scroll-snap-align: start; }

/* The 9:16 frame: holds the cover button, then the <video> once played */
.reel-play,
.reel-video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  background: var(--navy);
  box-shadow: var(--shadow);
}
.reel-video { object-fit: cover; }

.reel-play {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  isolation: isolate;
}
.reel-play::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 12, 26, 0) 55%, rgba(7, 12, 26, 0.55) 100%);
  pointer-events: none;
}
.reel-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.reel-play:hover .reel-poster { transform: scale(1.04); }

/* Sits in the lower third so it doesn't cover the speaker's face */
.reel-icon {
  position: absolute;
  top: 70%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(7, 12, 26, 0.35);
  transform: translate(-50%, -50%);
  transition: transform .2s ease, background-color .2s ease;
}
.reel-icon svg { width: 26px; height: 26px; margin-left: 4px; fill: currentColor; }
.reel-play:hover .reel-icon { transform: translate(-50%, -50%) scale(1.08); background: #fff; }

.reel-time {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(7, 12, 26, 0.7);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.reel-title { margin-top: 14px; font-size: 1.125rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }

.reels-more { margin: 28px 0 0; text-align: center; }
.reels-more .text-link { display: inline; }
.reels-more .icon { width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; }

/* Placeholder cards (no video yet): branded navy cover, no hover motion */
.reel--soon .reel-play {
  cursor: default;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(120% 70% at 30% 15%, #2a3f7a 0%, var(--navy-2) 55%, var(--navy-3) 100%);
}
.reel--soon .reel-play:hover .reel-icon { transform: translate(-50%, -50%); background: rgba(255, 255, 255, 0.94); }

.reel-video.is-error { opacity: .4; }

@media (min-width: 1000px) {
  .reels {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 300px);
    justify-content: center;
    gap: 32px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel-poster, .reel-icon { transition: none; }
  .reel-play:hover .reel-poster { transform: none; }
}
