/* =========================================================
   LATEST MOVIES — premium auto-scrolling poster carousel
   Scoped entirely under .movies-section / .movies-carousel so
   it never touches the site's global (light) design tokens.
   Sits directly below .platforms-section and continues the
   same dark, premium accent styling.
   ========================================================= */

.movies-section{
  position: relative;
  overflow: hidden;
  padding: 90px 0 110px;
  background: linear-gradient(180deg, #0a1530 0%, #071129 55%, #060b17 100%);
  color: #eaf6ff;
}

.movies-section::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, #f7fbff);
  pointer-events: none;
}

.movies-head{
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.movies-title{
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.2;
  color: #f4f9ff;
}

.movies-sub{
  margin-top: 16px;
  color: #9db3d6;
  font-size: 1.02rem;
}

/* ---------- Carousel ---------- */
.movies-carousel{
  position: relative;
  z-index: 1;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.movies-carousel::-webkit-scrollbar{ display: none; height: 0; }

.movies-track{
  display: flex;
  align-items: flex-start;
  gap: 22px;
  width: max-content;
  padding: 6px 40px;
  cursor: grab;
  user-select: none;
}
.movies-track.is-dragging{ cursor: grabbing; }

.movie-card{
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 1024px){ .movie-card{ width: 165px; } }
@media (max-width: 640px){ .movie-card{ width: 130px; } }

.movie-media{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 32px -16px rgba(0,0,0,.6);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.movie-card:hover .movie-media{
  transform: scale(1.05);
  border-color: rgba(127,224,255,.5);
  box-shadow: 0 22px 46px -12px rgba(31,124,255,.55), 0 0 26px rgba(127,224,255,.4);
}

/* Premium dark placeholder with a subtle glow behind every poster, so a
   missing/blank image still looks intentional instead of a broken icon. */
.movie-glow{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(127,224,255,.32), transparent 60%),
    linear-gradient(200deg, rgba(31,124,255,.26), rgba(6,11,23,.92));
  animation: movieGlowPulse 3.8s ease-in-out infinite;
}

@keyframes movieGlowPulse{
  0%, 100%{ opacity: .7; }
  50%{ opacity: 1; }
}

.movie-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 1;
  transition: opacity .3s ease;
  pointer-events: none;
}

.movie-media img.movie-img-missing{ opacity: 0; }

/* ---------- Reveal + focus ---------- */
.movies-section .m-reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.movies-section .m-reveal.in{
  opacity: 1;
  transform: translateY(0);
}

.movie-media:focus-visible{
  outline: 3px solid #7fe0ff;
  outline-offset: 3px;
}

@media (min-width: 1600px){
  .movies-section{ padding: 110px 0 130px; }
}
