/* ==========================================================================
   ENTERTAINMENTS PAGE (entertainments.html) — loads after css/global.css
   Movies laptop showcase + Music Top 10 three-card carousel.
   (Restored from your earlier 7.css — these rules were missing from the
   new base stylesheet.)
   ========================================================================== */

.entertainments-page {
  padding-top: 50px;
  padding-bottom: 40px;
}

.ent-section {
  width: 100%;
}

.ent-section-header {
  margin-bottom: 24px;
}

.ent-main-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.ent-main-subtitle {
  font-size: 0.95rem;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   1. MOVIES — LAPTOP SHOWCASE
   -------------------------------------------------------------------------- */
.movies-showcase-box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 20px 0;
}

/* The frame clips the image so the hover zoom stays inside it.
   The shadow sits on the frame (not the image) so clipping can't cut it off. */
.laptop-frame {
  width: 100%;
  max-width: 760px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.22));
}

.laptop-frame img {
  width: 100%;             /* fluid: always fits its container */
  height: auto;            /* keeps the image's own proportions */
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

/* Subtle zoom on hover and on keyboard focus */
.laptop-frame:hover img,
.laptop-frame:focus-visible img {
  transform: scale(1.04);
}
.laptop-frame:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 4px;
}

/* Poster cards (2:3) — ready for when individual film posters are added:
   <a href="…" class="movie-poster"><img src="…" alt="Film title"></a> */
.movie-poster {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.movie-poster:hover img,
.movie-poster:focus-visible img {
  transform: scale(1.04);
}
.movie-poster:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   2. MUSIC — 3-CARD CAROUSEL (driven by js/pages/entertainments.js)
   -------------------------------------------------------------------------- */
.music-carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-bottom: 10px;
}

.music-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.music-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.music-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}

.music-item-card {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.music-item-card:hover {
  transform: translateY(-5px);
}

.music-item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}

.music-carousel-dots .m-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0f172a;
  border: none;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.music-carousel-dots .m-dot.active {
  opacity: 1;
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   3. RESPONSIVE & REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .ent-main-title { font-size: 1.6rem; }

  /* ---- Music carousel: ONE card per view, swipe / scroll-snap ---- */
  .music-carousel-track {
    position: relative;               /* card offsets measured from the track */
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;            /* dots show position instead */
    transform: none !important;       /* desktop slide transform is set inline by JS */
    transition: none;
  }
  .music-carousel-track::-webkit-scrollbar { display: none; }

  /* Flatten 3 slides × 3 cards into 9 cards that snap one at a time */
  .music-slide,
  .music-card-grid {
    display: contents;
  }
  .music-item-card {
    flex: 0 0 100%;                   /* 100% width per card */
    scroll-snap-align: start;
    scroll-snap-stop: always;         /* one card per swipe */
    aspect-ratio: 4 / 3;              /* portrait tablets: not a screen-filling square */
  }
  .music-item-card:hover { transform: none; }

  .music-carousel-dots { margin-top: 18px; }
}

@media (max-width: 576px) {
  .music-item-card { aspect-ratio: 1 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  .music-carousel-track { transition: none; scroll-behavior: auto; }
  .laptop-frame img,
  .movie-poster img { transition: none; }
}
