/* videos-carousel.css — horizontal click-through carousel for
   the videos page. Inspired by the React Card component the
   client pasted, simplified to: no hover overlay, no infinite
   loop, just prev/next + responsive cards-per-view. */

.videos__carousel {
  position: relative;
  margin: var(--space-lg) 0 var(--space-md);
  /* Set cards-per-view in CSS so the correct number of slides is
     laid out immediately on load. Without this the slides default
     to 1 (full-width) for a frame until the JS sets it, which read
     as a flash of one giant video then a snap to the row. JS still
     sets the same value — these just kill the first-paint flash. */
  --cards-per-view: 1;
}

@media (min-width: 700px) {
  .videos__carousel { --cards-per-view: 2; }
}

@media (min-width: 1024px) {
  .videos__carousel { --cards-per-view: 3; }
}

.videos__viewport {
  overflow: hidden;
  border-radius: 8px;
}

.videos__track {
  display: flex;
  gap: 0;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.videos__slide {
  flex: 0 0 calc(100% / var(--cards-per-view, 1));
  padding: 0 var(--space-sm);
  box-sizing: border-box;
}

.videos__slide .video-card {
  margin: 0;
}
.videos__slide .video-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-black);
}
.videos__slide .video-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.videos__slide .video-card__title {
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-cream);
  line-height: 1.3;
}

/* Prev/next nav buttons */
.videos__nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-cream);
  border: 1px solid rgba(170, 202, 255, 0.25);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
  user-select: none;
}
.videos__nav-btn:hover:not(:disabled) {
  background: rgba(91, 194, 221, 0.35);
}
.videos__nav-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}
.videos__nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.videos__nav-btn--prev { left: -10px; }
.videos__nav-btn--next { right: -10px; }

@media (max-width: 600px) {
  .videos__nav-btn { width: 40px; height: 40px; }
  .videos__nav-btn--prev { left: -4px; }
  .videos__nav-btn--next { right: -4px; }
}

/* Dot indicators */
.videos__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}
.videos__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(192, 186, 178, 0.3);
  cursor: pointer;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.videos__dot.is-active {
  background: var(--color-cyan);
  transform: scale(1.2);
}

/* Below-carousel CTA: link to the full YouTube channel */
.videos__cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}
.videos__yt-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.9rem 1.6rem;
  text-decoration: none;
  color: var(--color-cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.videos__yt-cta svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
