:root {
  --bg: #ffffff;
  --text: #1c1c1c;
  --muted: #6d6d6d;
  --gold: #c4a574;
  --gold-dark: #a88854;
  --line: #ececec;
  --card: #ffffff;
}

html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.site-header {
  z-index: 30;
}
.is-home .site-header,
.is-film .site-header {
  position: absolute;
  inset-inline: 0;
  top: 0;
}
.inner-page .site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
}
.header-end {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.header-nav {
  display: none;
  gap: 1.15rem;
  font-size: 0.92rem;
}
.inner-page .header-nav,
.is-film .header-nav {
  display: flex;
}
.is-home .header-nav { display: none; }
.is-film .header-nav a { color: rgba(255,255,255,0.92); }
.is-film .header-nav a:hover { color: var(--gold); }
.inner-page .header-nav a:hover { color: var(--gold-dark); }
.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  color: var(--gold);
}
.is-home .brand-logo,
.is-film .brand-logo { color: #f3ead8; }
.brand-mark { width: 42px; height: 42px; }
.brand-text { text-align: center; line-height: 1.1; }
.brand-text strong { display: block; font-size: 0.78rem; letter-spacing: 0.16em; }
.brand-text small { display: block; font-size: 0.62rem; letter-spacing: 0.28em; }

.menu-toggle {
  width: 42px;
  height: 32px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: #222;
}
.is-home .menu-toggle span,
.is-film .menu-toggle span { background: #fff; }

.menu-list { display: grid; gap: 0.8rem; font-size: 1.05rem; }
.menu-list a:hover { color: var(--gold-dark); }

.hero-slider, .hero-slide { height: min(92vh, 820px); }
.hero-slide {
  height: min(92vh, 820px);
  background: #1a1a1a center/cover no-repeat;
  position: relative;
  display: grid;
  place-items: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.55));
}
.hero-fallback {
  background:
    radial-gradient(800px 400px at 70% 20%, rgba(196,165,116,0.28), transparent),
    linear-gradient(180deg, #2a2420, #111);
}
.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 1.5rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.hero-copy p {
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: 1.6rem;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
}
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots {
  position: absolute;
  inset-inline: 0;
  bottom: 28px;
  margin: 0;
  z-index: 2;
}
.hero-dots [data-bs-target] {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: 0;
}
.hero-dots .active { background: var(--gold); }

.btn-gold, .btn-outline-gold, .btn-outline-light {
  display: inline-block;
  border-radius: 4px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline-light:hover { background: #fff; color: #111; }

.home-section, .section { padding: 4rem 0; }
.section-head, .page-hero .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.8rem;
}
.section-head h2, .page-hero h1, .block h2 { font-weight: 800; margin: 0; }
.section-head a, .text-link { color: var(--muted); font-size: 0.92rem; }
.section-head a:hover, .text-link:hover { color: var(--gold-dark); }

.media-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}
.carousel-track {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.4rem 0.2rem 1rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  color: #444;
  line-height: 1;
}
.poster-card, .award-card, .review-card, .crew-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.poster-card { width: 190px; }
.poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #eee;
  margin-bottom: 0.8rem;
}
.poster img, .poster-lg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background: #f3f0ea;
}
.poster-card h3, .award-card h3, .crew-card h3 { font-size: 1rem; margin: 0 0 0.15rem; }
.poster-card p, .award-card p, .crew-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.year { font-size: 0.82rem !important; }

.award-card { width: 170px; text-align: center; }
.trophy { height: 120px; display: grid; place-items: center; }
.trophy svg { width: 88px; height: 88px; }

.review-card {
  width: min(340px, 80vw);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  padding: 1.3rem 1.2rem 1rem;
  border-radius: 6px;
}
.quote-mark { color: var(--gold); font-size: 2.4rem; line-height: 1; display: block; }
.review-card p { min-height: 5.2rem; color: #333; }
.review-card footer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.8rem;
}
.review-card img, .avatar img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.review-card span { color: var(--muted); font-size: 0.8rem; display: block; }

.crew-card { width: 140px; text-align: center; }
.avatar {
  width: 118px;
  height: 118px;
  margin: 0 auto 0.7rem;
  position: relative;
}
.avatar img { width: 100%; height: 100%; }
.avatar.featured::after {
  content: "★";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.collaborate-banner {
  min-height: 320px;
  background:
    linear-gradient(rgba(20,18,16,0.62), rgba(20,18,16,0.62)),
    radial-gradient(circle at 30% 40%, #4a433c, #151515);
  color: #fff;
  display: grid;
  align-items: center;
  padding: 3.5rem 0;
}
.collaborate-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.collaborate-inner h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.8rem; }
.collaborate-inner p { max-width: 36rem; opacity: 0.9; }
.people-icon { width: 140px; color: var(--gold); opacity: 0.9; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 1.2rem;
  color: #444;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto 1.2fr;
  gap: 2rem;
  align-items: start;
}
.site-footer h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.8rem; }
.site-footer p { color: var(--muted); }
.footer-brand { text-align: center; }
.footer-brand .brand-logo { color: var(--gold); }
.socials { display: flex; gap: 0.8rem; margin-top: 0.6rem; font-size: 0.88rem; }
.newsletter { display: flex; gap: 0.4rem; margin-top: 0.8rem; }
.newsletter input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.4rem;
  margin: 2.2rem 0 1rem;
  font-size: 0.9rem;
  color: #555;
}
.copyright { text-align: center; color: #999; font-size: 0.82rem; margin: 0; }

.page-hero {
  padding: 3rem 0 0.5rem;
}
.page-hero p { color: var(--muted); margin: 0.4rem 0 0; }
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.5rem;
}
.film-card-body h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.en-title, .meta, .empty-note { color: var(--muted); }
.film-intro { padding: 2.5rem 0 4rem; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.spec-grid dt { color: var(--muted); font-size: 0.82rem; }
.spec-grid dd { margin: 0; font-weight: 600; }
.block { margin-top: 2.8rem; }
.synopsis { line-height: 2; white-space: pre-line; }
.trailer-grid, .people-grid, .gallery-grid { display: grid; gap: 1.2rem; }
.trailer-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.people-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.person-card, .critic-card, .award-list li {
  background: #fff;
  border: 1px solid var(--line);
}
.person-card { padding: 0 0 1rem; text-align: center; }
.person-card img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 0.7rem; }
.critic-list { display: grid; gap: 1rem; }
.critic-card { display: flex; gap: 1rem; padding: 1rem; }
.award-list { list-style: none; padding: 0; display: grid; gap: 0.8rem; }
.award-list li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem; }
.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery-item img { width: 100%; height: 150px; object-fit: cover; }
.banner-carousel img { max-height: 520px; object-fit: cover; width: 100%; }
.poster-lg { aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.form-success { color: #2e7d4f; }
.content-page { padding-bottom: 4rem; }
.content-page .lead { color: var(--muted); line-height: 2; max-width: 44rem; }

.admin-body {
  background: #f4f1ea;
  color: #1d1b16;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.admin-body a { color: #7a5b12; }
.admin-top { background: #111114; color: #f6f1e7; }
.admin-top .navbar-brand, .admin-top .nav-link { color: #f6f1e7 !important; }
.admin-wrap { padding: 2rem 0 4rem; }
.admin-card {
  background: #fff;
  border: 1px solid #e6dfd0;
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.collection-item {
  border: 1px dashed #d7ccb4;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.9rem;
  background: #fbfaf6;
}
.thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; }
.video-thumb { width: 180px; max-height: 100px; }
.form-label { font-weight: 600; }
.table a { color: #8a6a16; }
.admin-body .btn-gold { color: #fff; }

.film-hero {
  min-height: 78vh;
  background: #161616 center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 7rem 0 4.5rem;
}
.film-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.62) 55%);
}
.film-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  color: #fff;
  width: 100%;
}
.crumbs {
  display: flex;
  gap: 0.45rem;
  font-size: 0.82rem;
  opacity: 0.8;
  margin-bottom: 1.4rem;
}
.film-hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  margin: 0;
}
.film-hero-copy .en-title {
  font-size: 1.15rem;
  opacity: 0.85;
  margin: 0.25rem 0 1rem;
}
.film-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}
.film-hero-meta span:not(:last-child)::after {
  content: " | ";
  opacity: 0.55;
}
.film-hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.film-hero-actions .btn-gold,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.film-hero-actions svg { width: 16px; height: 16px; }
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.75);
  color: #fff;
  background: transparent;
  border-radius: 4px;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.film-hero-poster {
  width: min(260px, 32vw);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
  margin-bottom: -6rem;
  position: relative;
  z-index: 2;
}
.film-body { padding: 5.5rem 0 1rem; background: #fff; }
.film-info-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.05fr;
  gap: 2.2rem;
  align-items: start;
}
.film-info-grid h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem; }
.subhead { margin-top: 1.6rem; }
.main-player {
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.player-caption { color: var(--muted); margin: 0.45rem 0 0; font-size: 0.9rem; }
.teaser-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.teaser-card {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: start;
  color: var(--muted);
  font-size: 0.82rem;
}
.teaser-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
  display: block;
  margin-bottom: 0.35rem;
}
.play-badge {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0.9rem;
}
.spec-list { display: grid; gap: 0.7rem; }
.spec-list > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.6rem; }
.spec-list dt { color: var(--muted); font-weight: 500; }
.spec-list dd { margin: 0; font-weight: 600; }
.director-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.director-row img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.gallery-still {
  flex: 0 0 auto;
  width: min(280px, 70vw);
}
.gallery-still img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

@media (max-width: 1100px) {
  .header-nav { display: none !important; }
  .film-info-grid { grid-template-columns: 1fr 1fr; }
  .film-media { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .film-hero-inner { flex-direction: column-reverse; align-items: start; }
  .film-hero-poster { width: 180px; margin-bottom: -3rem; }
  .film-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-bar { padding: 0.9rem 1rem; }
  .hero-slider, .hero-slide { height: 78vh; }
  .collaborate-inner { flex-direction: column; text-align: center; }
  .footer-grid, .media-carousel { grid-template-columns: 1fr; }
  .carousel-btn { display: none; }
}
