/* ------------------------ */
/*   FILMTV CAROUSEL        */
/* ------------------------ */

.filmtv-section {
  position: relative;
  height: 100vh;
  width: 100%;
  display: block;
  touch-action: pan-y;
  overflow: hidden;
}

.film-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.film-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ------------------------ */
/*        POSTERS           */
/* ------------------------ */

.film-poster {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 260px;
  height: 390px;

  transform-origin: center;
  will-change: transform;

  margin: 0;
  padding: 0;

  cursor: pointer;

  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.film-poster:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
  border-radius: 10px;
}

/* clips the image + dim overlay to one shared rounded box so their
   edges can't drift apart into a visible seam when the poster is
   scaled during click/navigation. Kept separate from .film-poster
   itself so the title/credit below aren't clipped too. */
.film-poster__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
}

.film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  backface-visibility: hidden;
}

/* active glow */
.film-poster.active {
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.2));
  z-index: 999;
}

/* dim overlay on non-active posters — inherits the frame's clip,
   so it's always pixel-perfect aligned with the image beneath it */
.film-poster__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.film-poster.active .film-poster__frame::before {
  opacity: 0;
}

/* ------------------------ */
/*   META (title / credit)  */
/* ------------------------ */

.film-poster__meta {
  position: relative;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
}

.film-poster.active .film-poster__meta {
  opacity: 1;
  visibility: visible;
  transform: translateY(1px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.film-poster__title {
  margin: 0 0 4px;
  font-size: 2.25rem;
  line-height: 2.5rem;
  letter-spacing: -.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.film-poster__credit {
  display: block;
  white-space: nowrap;
  width: max-content;
  margin: 0;
  color: #111;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1.3rem;
  text-transform: uppercase;
  letter-spacing: .05rem;
}

/* ------------------------ */
/*   DOTS                    */
/* ------------------------ */

.film-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.film-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.film-dot.active {
  background: #111;
  transform: scale(1.5);
}

.film-dot:focus-visible {
  outline: 1px solid #111;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .film-poster {
    width: 150px;
    height: 225px;
  }

  .film-poster__meta {
    margin-top: 10px;
  }

  .film-poster__title {
    font-size: 1.7rem;
    line-height: 1.7rem;
    letter-spacing: -.1rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .film-poster__credit {
    font-size: 9px;

  }

  .film-dots {
    bottom: 16px;
  }
}