/* ========================================
   FILMS PAGE
======================================== */
/* ========================================
   FILMS HERO 3D POSTER REVEAL
======================================== */
.films-hero-3d {
  position: relative;
  min-height: 70vh; /* 🔥 reduce height */
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 191, 0, 0.12), transparent 22%),
    radial-gradient(circle at 15% 30%, rgba(120, 60, 255, 0.08), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(0, 160, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #040404 0%, #070707 45%, #020202 100%);
  padding: 100px 0 10px;
}

.films-hero-3d__bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 215, 120, 0.08), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

.films-hero-3d__noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.films-hero-3d__inner {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.films-hero-3d__content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
  transform: translateY(25px);    /*text button move down abit*/
}

.films-hero-3d__desc {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 19px;
  line-height: 1.9;
}

.films-hero-3d__actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* posters section */
.films-hero-3d__posters {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 34px;
  perspective: 1800px;
  min-height: 520px;
  padding-top: 10px;
}


/* ========================================
   FILMS PAGE
======================================== */

body.modal-open {
  overflow: hidden;
}

/* ========================================
   FILMS HERO
======================================== */
.films-hero-3d {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 191, 0, 0.12), transparent 22%),
    radial-gradient(circle at 15% 30%, rgba(120, 60, 255, 0.08), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(0, 160, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #040404 0%, #070707 45%, #020202 100%);
  padding: 140px 0 70px;
}

.films-hero-3d__bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 215, 120, 0.08), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

.films-hero-3d__noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.films-hero-3d__inner {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.films-hero-3d__content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 40px;
  transform: translateY(25px);
}

.films-hero-3d__desc {
  max-width: 760px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 19px;
  line-height: 1.9;
}

.films-hero-3d__actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ========================================
   BUTTON
======================================== */
.btn--gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  color: #111111;
  background: linear-gradient(135deg, #ffd54a, #ffbf00, #ff9f1a);
  box-shadow: 0 14px 30px rgba(255, 191, 0, 0.22);
  border: none;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(255, 191, 0, 0.3);
}

/* ========================================
   FILMS HERO CAROUSEL
======================================== */
.films-hero-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  margin-top: 10px;
  overflow: hidden;
  padding: 10px 0 20px;
  background: transparent;
  transform: translateY(-30px);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: seamless-marquee 28s linear infinite;
  will-change: transform;
}

.carousel-group {
  display: flex;
  align-items: stretch;
  gap: 22px;
  flex-shrink: 0;
}

.carousel-item {
  flex: 0 0 auto;
  width: 200px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}

.carousel-card {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 14px;
  transform: rotateY(-8deg);
  transition: transform 0.45s ease, filter 0.45s ease, box-shadow 0.45s ease;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(255, 191, 0, 0.18);
  filter: contrast(1.05) brightness(0.9);
  mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
}

.carousel-item:hover {
  z-index: 4;
}

.carousel-item:hover .carousel-card img {
  transform: rotateY(0deg) translateY(-8px) scale(1.04);
  filter: brightness(1) contrast(1.05);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, 0.82),
    0 0 34px rgba(255, 191, 0, 0.2);
}

@keyframes seamless-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ========================================
   FILMS FILTER
======================================== */
.films-filter {
  background: #070707;
  padding: 24px 0 10px;
}

.films-filter__inner {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.films-filter__chip {
  border: 1px solid rgba(255, 191, 0, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.28s ease;
}

.films-filter__chip:hover,
.films-filter__chip.active {
  background: linear-gradient(135deg, #ffd54a, #ffbf00, #ff9f1a);
  color: #111111;
  border-color: transparent;
}

/* ========================================
   MOVIES CATALOG GRID
======================================== */
.movies-catalog {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-item {
  cursor: pointer;
}

.movie-item__poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111111;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-item__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-item__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.08)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-item__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 62px;
  height: 62px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.movie-item:hover .movie-item__poster {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(255, 191, 0, 0.14);
}

.movie-item:hover .movie-item__poster img {
  transform: scale(1.05);
  filter: brightness(0.86);
}

.movie-item:hover .movie-item__poster::after {
  opacity: 1;
}

.movie-item:hover .movie-item__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-item__play:hover {
  background: rgba(255, 191, 0, 0.95);
  color: #111111;
}

.movie-item__info {
  padding: 10px 4px 0;
}

.movie-item__info h3 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.4;
}

.movie-item__info p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  margin: 0;
}

/* hidden by filter / pagination */
.movie-item.hidden {
  display: none !important;
}

/* ========================================
   PAGINATION
======================================== */
.movies-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 191, 0, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.page-btn:hover,
.page-btn.active {
  background: linear-gradient(135deg, #ffd54a, #ffbf00, #ff9f1a);
  color: #111111;
  border-color: transparent;
}

@media (max-width: 1300px) {
  .movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .movies-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .movies-catalog {
    width: calc(100% - 24px);
  }

  .movies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .movies-grid {
    grid-template-columns: 1fr;
  }
}