/* Film sayfaları: afiş ve künye, fragman ve filmden kareler, film hakkında ve oyuncular.
   Sayfalar _arac/film_sayfasi.py ile üretilir. */

/* ---------- Afiş + künye ---------- */

.film-detail{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:40px 56px 0;
}

.back-link{
  display:inline-block;
  margin:0 0 32px;
  font-size:14.5px;
  font-weight:500;
  color:var(--muted);
  text-decoration:underline;
  text-decoration-color:transparent;
  text-underline-offset:4px;
  transition:color .15s ease, text-decoration-color .15s ease;
}

.back-link:hover{
  color:var(--ink);
  text-decoration-color:currentColor;
}

.film-layout{
  display:grid;
  grid-template-columns:320px minmax(0, 1fr);
  gap:64px;
  align-items:start;
}

.film-poster{
  position:relative;
  width:100%;
  aspect-ratio:1 / 1.414;
  border-radius:var(--radius);
  overflow:hidden;
  background:linear-gradient(160deg, #3a3a3a, #161616);
  box-shadow:0 22px 40px -22px rgba(0,0,0,0.4);
}

.film-poster-photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Afişi henüz olmayan filmlerde yer tutucu: film makarası izi + film adı */
.film-poster-glyph{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:28px;
  text-align:center;
  font-family:var(--serif);
  font-size:27px;
  line-height:1.15;
  color:rgba(255,255,255,0.9);
}

.film-poster-glyph::before{
  content:"";
  width:24px;
  height:24px;
  border-radius:50%;
  border:1.5px solid rgba(255,255,255,0.45);
  box-shadow:inset 0 0 0 5px rgba(255,255,255,0.10);
}

.film-info{ padding-top:6px; }

.film-title{
  margin:0;
  font-family:var(--serif);
  font-weight:400;
  font-size:clamp(38px, 4.6vw, 62px);
  line-height:1.04;
  letter-spacing:-0.01em;
  color:var(--ink);
  text-wrap:balance;
}

.film-kind{
  margin:14px 0 0;
  font-size:16px;
  color:var(--muted);
}

.film-logline{
  margin:32px 0 0;
  max-width:34em;
  font-size:20px;
  line-height:1.55;
  color:var(--ink);
}

/* Izgara yerine esnek sıra: her kutu en uzun isim kadar genişler, isim bölünmez */
.film-facts{
  display:flex;
  flex-wrap:wrap;
  gap:22px 32px;
  max-width:720px;
  margin:40px 0 0;
  padding:26px 0 0;
  border-top:1px solid var(--line);
}

/* Kutu en az 140px; uzun isimli kutu isim kadar büyür, satırdaki boşluk paylaşılır */
.film-facts div{ flex:1 0 auto; min-width:140px; }

.film-facts dt{
  margin:0 0 4px;
  font-size:14px;
  color:var(--muted);
}

.film-facts dd{
  margin:0;
  font-size:16.5px;
  font-weight:500;
  line-height:1.4;
  color:var(--ink);
}

.film-facts dd span{ display:block; }

/* Senaryo: her isim kendi satırında, uzun isim de tek satırda kalır */
.film-facts .isimler span{ white-space:nowrap; }

/* Özeti bulunmayan filmlerde özet yerine teknik ekip */
.film-ekip{ margin-top:0; }

/* ---------- Filmden kareler ---------- */

.film-stills{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:96px 56px 0;
}

.film-stills h2,
.film-about h2{
  margin:0 0 24px;
  font-family:var(--serif);
  font-weight:400;
  font-size:30px;
  line-height:1.15;
  color:var(--ink);
}

.stills-grid{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.stills-grid[data-n="1"]{ grid-template-columns:minmax(0, 1fr); }
.stills-grid[data-n="3"],
.stills-grid[data-n="5"],
.stills-grid[data-n="6"],
.stills-grid[data-n="9"]{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
.stills-grid[data-n="7"],
.stills-grid[data-n="8"]{ grid-template-columns:repeat(4, minmax(0, 1fr)); }

.still{
  display:block;
  width:100%;
  aspect-ratio:3 / 2;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:4px;
  background:#e8e8e6;
  cursor:zoom-in;
}

.still img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:opacity .2s ease;
}

.still:hover img{ opacity:0.88; }

/* Fragman solda, kareler sağda iki sütun: 6 karede fragman kutusu 16:9'a yakın durur */
.stills-grid.has-trailer{ grid-template-columns:minmax(0, 3.84fr) repeat(2, minmax(0, 1fr)); }
.has-trailer .trailer-cell{ grid-row:1 / span 3; }
.has-trailer .trailer{ height:100%; aspect-ratio:auto; }

/* Fragman: karelerin ilk kutucuğu, üzerinde oynat düğmesi */
.trailer{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:3 / 2;
  overflow:hidden;
  border-radius:4px;
  background:#161616;
  color:#ffffff;
}

.trailer img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.trailer::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.32);
  transition:background .2s ease;
}

.trailer:hover::after{ background:rgba(0,0,0,0.22); }

.trailer-play{
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:15px;
  font-weight:600;
}

.trailer-play svg{
  width:48px;
  height:48px;
  padding:13px 12px 13px 14px;
  border-radius:50%;
  background:#ffffff;
  fill:var(--ink);
}

/* ---------- Film hakkında + oyuncular ---------- */

.film-about{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:96px 56px 104px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 300px;
  gap:80px;
  align-items:start;
}

.film-about p{
  margin:0 0 20px;
  max-width:64ch;
  font-size:17px;
  line-height:1.75;
  color:var(--text);
}

.film-about p:last-child{ margin-bottom:0; }

.cast h2{
  margin-bottom:16px;
  font-size:22px;
}

.cast ul{
  list-style:none;
  margin:0;
  padding:0;
  columns:2;
  column-gap:20px;
}

.cast li{
  break-inside:avoid;
  padding:3px 0;
  font-size:16px;
  font-weight:500;
  line-height:1.4;
}

/* Alt bilgiden önceki son bölüm nefes alsın (hakkında bölümü olmayan filmlerde) */
.film-detail:has(+ .site-footer),
.film-stills:has(+ .site-footer){ padding-bottom:104px; }

/* ---------- Kare büyütme penceresi ---------- */

.lightbox{
  width:100vw;
  height:100vh;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  background:rgba(12,12,12,0.95);
  color:#ffffff;
}

.lightbox::backdrop{ background:rgba(12,12,12,0.95); }

.lightbox img{
  position:absolute;
  top:64px; bottom:64px;
  left:96px; right:96px;
  width:calc(100% - 192px);
  height:calc(100% - 128px);
  object-fit:contain;
}

.lb-kapat,
.lb-onceki,
.lb-sonraki{
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  background:none;
  color:#ffffff;
  cursor:pointer;
}

.lb-kapat{
  top:18px;
  right:24px;
  padding:8px 4px;
  font-size:15px;
  font-weight:500;
}

.lb-onceki,
.lb-sonraki{
  top:50%;
  width:52px;
  height:52px;
  margin-top:-26px;
  border-radius:50%;
  background:rgba(255,255,255,0.08);
}

.lb-onceki{ left:24px; }
.lb-sonraki{ right:24px; }

.lb-onceki:hover,
.lb-sonraki:hover{ background:rgba(255,255,255,0.16); }

.lb-onceki svg,
.lb-sonraki svg{ width:12px; height:20px; }

.lb-sayac{
  position:absolute;
  left:0; right:0;
  bottom:22px;
  text-align:center;
  font-size:14px;
  color:rgba(255,255,255,0.7);
}

.lightbox :focus-visible{ outline-color:#ffffff; }

/* ---------- Dar ekranlar ---------- */

@media (max-width:960px){
  .film-detail{ padding:28px 28px 0; }
  .film-layout{ grid-template-columns:minmax(0, 1fr); gap:32px; }
  .film-poster{ max-width:260px; }
  .film-stills{ padding:72px 28px 0; }
  .stills-grid[data-n]{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .stills-grid[data-n="1"]{ grid-template-columns:minmax(0, 1fr); }
  .has-trailer .trailer-cell{ grid-row:auto; grid-column:1 / -1; }
  .has-trailer .trailer{ aspect-ratio:16 / 9; }
  .film-about{ grid-template-columns:minmax(0, 1fr); gap:48px; padding:72px 28px 88px; }
}

@media (max-width:600px){
  .film-logline{ font-size:18px; }
  .film-stills h2,
  .film-about h2{ font-size:26px; }
  .stills-grid[data-n]{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
  .stills-grid[data-n="1"]{ grid-template-columns:minmax(0, 1fr); }
  .lightbox img{ left:12px; right:12px; width:calc(100% - 24px); }
  .lb-onceki,
  .lb-sonraki{ top:auto; bottom:10px; margin-top:0; }
  .lb-sayac{ bottom:26px; }
}
