/* Dedicated film detail pages */
:root {
  --film-red: #d71920;
  --film-ink: #141419;
  --film-muted: #6d6d76;
  --film-paper: #f5f3ef;
}

body {
  color: var(--film-ink);
  background: var(--film-paper);
  font-family: Arial, Helvetica, sans-serif;
}

.film-hero {
  position: relative;
  min-height: 510px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.film-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 5, 9, 0.96) 0%, rgba(5, 5, 9, 0.79) 48%, rgba(5, 5, 9, 0.32) 100%),
    linear-gradient(0deg, rgba(5, 5, 9, 0.88) 0%, rgba(5, 5, 9, 0.08) 70%);
}

.film-hero-content {
  width: 100%;
  padding-top: 100px;
  padding-bottom: 64px;
}

.film-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: #ff6267;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.film-hero h1 {
  max-width: 850px;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-transform: uppercase;
}

.film-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.film-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: #f2f2f4;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.film-hero-meta i {
  color: #ff6267;
}

.film-hero-intro {
  max-width: 710px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.75;
}

.film-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.film-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 21px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 5px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.film-btn:hover {
  transform: translateY(-2px);
}

.film-btn-primary {
  color: #fff;
  background: var(--film-red);
}

.film-btn-primary:hover {
  color: #fff;
  background: #b9141b;
}

.film-btn-outline {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.film-btn-outline:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.6);
}

.film-main {
  padding: 70px 0 76px;
}

.film-poster-card {
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(25, 25, 30, 0.13);
}

.film-poster-card > img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

.film-poster-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--film-ink);
}

.film-poster-caption span:first-child {
  color: #ff6267;
}

.film-story-label {
  display: block;
  margin-bottom: 8px;
  color: var(--film-red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.film-story h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.film-story-text {
  margin-bottom: 30px;
  color: #515159;
  font-size: 17px;
  line-height: 1.85;
}

.film-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 30px;
  background: #fff;
  border: 1px solid #e6e3de;
  border-radius: 10px;
}

.film-fact {
  padding: 18px 20px;
  border-bottom: 1px solid #e6e3de;
}

.film-fact:nth-child(odd) {
  border-right: 1px solid #e6e3de;
}

.film-fact:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.film-fact-label {
  display: block;
  margin-bottom: 5px;
  color: #8a8884;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.film-fact-value {
  display: block;
  color: #24242a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.film-links-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #ece9e3;
  border-radius: 9px;
}

.film-links-panel .film-btn-primary:hover {
  color: #fff;
}

.film-links-panel .film-btn-dark {
  color: #fff;
  background: var(--film-ink);
}

.film-links-panel .film-btn-dark:hover {
  color: #fff;
  background: #303039;
}

.film-related {
  margin-top: 72px;
  padding-top: 42px;
  border-top: 1px solid #dcd8d1;
}

.film-related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.film-related-header h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.film-related-header > a {
  color: var(--film-red);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.film-related-card {
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e1db;
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.film-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 32px rgba(25, 25, 30, 0.12);
}

.film-related-card > a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.film-related-image {
  height: 220px;
  overflow: hidden;
  background: #ddd;
}

.film-related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.film-related-card:hover .film-related-image img {
  transform: scale(1.05);
}

.film-related-body {
  padding: 19px;
}

.film-related-body span {
  display: block;
  margin-bottom: 6px;
  color: var(--film-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.film-related-body h3 {
  margin-bottom: 13px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.film-related-body strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #45454c;
  font-size: 12px;
}

/* Star cast */
.film-cast,
.film-gallery {
  margin-top: 72px;
  padding-top: 42px;
  border-top: 1px solid #dcd8d1;
}

.film-section-header {
  margin-bottom: 26px;
}

.film-section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.film-section-header p {
  max-width: 640px;
  margin: 0;
  color: var(--film-muted);
  font-size: 14px;
  line-height: 1.6;
}

.film-cast-card {
  height: 100%;
  padding: 18px 12px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e1db;
  border-radius: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.film-cast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(25, 25, 30, 0.11);
}

.film-cast-photo {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  overflow: hidden;
  background: #efece7;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(25, 25, 30, 0.12);
}

.film-cast-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}

.film-cast-card:hover .film-cast-photo img {
  transform: scale(1.06);
}

.film-cast-card h3 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.film-cast-card span {
  display: block;
  color: var(--film-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Gallery */
.film-gallery-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #0d0d12;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.film-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.film-gallery-item:hover img {
  transform: scale(1.07);
  opacity: 0.92;
}

.film-gallery-zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  background: rgba(10, 10, 15, 0.32);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.film-gallery-item:hover .film-gallery-zoom,
.film-gallery-item:focus-visible .film-gallery-zoom {
  opacity: 1;
}

#galleryModal .modal-content {
  background: transparent;
}

#galleryModalImg {
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* Lightbox controls — placed outside the image so photos stay unobstructed */
.modal-dialog:has(.gallery-modal-content) {
  max-width: min(1180px, 94vw);
}

.gallery-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

#galleryModalImg {
  flex: 0 1 auto;
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.gallery-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1080;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-close:hover {
  background: var(--film-red);
  border-color: var(--film-red);
  transform: scale(1.06);
}

.gallery-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-nav:hover {
  background: var(--film-red);
  border-color: var(--film-red);
  transform: scale(1.06);
}

.gallery-counter {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

@media (max-width: 767.98px) {
  .gallery-stage {
    gap: 6px;
  }

  .gallery-nav {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  #galleryModalImg {
    max-height: 68vh;
  }

  .gallery-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
}

@media (max-width: 991.98px) {
  .film-hero {
    min-height: 470px;
  }

  .film-poster-card {
    max-width: 430px;
    margin: 0 auto 42px;
  }

  .film-main {
    padding-top: 48px;
  }
}

@media (max-width: 575.98px) {
  .film-hero {
    min-height: 520px;
    background-position: 62% center;
  }

  .film-hero-content {
    padding-top: 80px;
    padding-bottom: 42px;
  }

  .film-hero h1 {
    font-size: 40px;
  }

  .film-hero-intro {
    font-size: 15px;
    line-height: 1.65;
  }

  .film-hero-actions,
  .film-links-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .film-facts {
    grid-template-columns: 1fr;
  }

  .film-fact,
  .film-fact:nth-child(odd) {
    border-right: 0;
    border-bottom: 1px solid #e6e3de;
  }

  .film-fact:last-child {
    border-bottom: 0;
  }

  .film-related-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mahaparinirvan hero — wide title artwork banner.
   The source image is a very wide strip, so it is anchored right (where the
   title sits) and the overlay is darkened on the left for readable text. */
.film-hero--mahaparinirvan {
  background-position: center 42%;
  background-size: cover;
  background-color: #0a0704;
}

.film-hero--mahaparinirvan::before {
  background: linear-gradient(90deg, rgba(5, 5, 9, 0.92) 0%, rgba(5, 5, 9, 0.72) 40%, rgba(5, 5, 9, 0.2) 78%, rgba(5, 5, 9, 0.05) 100%),
    linear-gradient(0deg, rgba(5, 5, 9, 0.82) 0%, rgba(5, 5, 9, 0.05) 65%);
}

@media (max-width: 767.98px) {
  .film-hero--mahaparinirvan {
    background-position: 58% center;
    min-height: 560px;
  }

  /* Long single-word title must not overflow the screen */
  .film-hero--mahaparinirvan h1 {
    font-size: clamp(28px, 8.6vw, 38px);
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
  }

  .film-hero--mahaparinirvan .film-kicker {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 400px) {
  .film-hero--mahaparinirvan h1 {
    font-size: 27px;
  }
}
