/* ============================================================
   BOSFOR — film exhibit panel + lightbox styles
   ============================================================ */

.exhibit { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.exhibit__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px) saturate(0.6);
  -webkit-backdrop-filter: blur(6px) saturate(0.6);
  opacity: 0;
}
.anim-ready .exhibit__backdrop { transition: opacity .7s var(--ease); }
.exhibit.is-open { pointer-events: auto; }
.exhibit.is-open .exhibit__backdrop { opacity: 1; }

.exhibit__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(720px, 94vw);
  background: #050505;
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  will-change: transform;
}
.anim-ready .exhibit__panel { transition: transform .85s var(--ease-in-out), box-shadow .85s var(--ease-in-out); }
.exhibit.is-open .exhibit__panel { transform: none; box-shadow: -40px 0 120px rgba(0,0,0,0.8); }

.exhibit__scroll { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.exhibit__scroll::-webkit-scrollbar { width: 6px; }
.exhibit__scroll::-webkit-scrollbar-thumb { background: var(--ink-12); }

.exhibit__close {
  position: absolute; top: 22px; right: 22px; z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink-25);
  background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: background .4s, transform .4s var(--ease);
}
.exhibit__close:hover { background: #fff; transform: rotate(90deg); }
.exhibit__close span { position: absolute; width: 16px; height: 1.4px; background: #fff; }
.exhibit__close:hover span { background: #000; }
.exhibit__close span:first-child { transform: rotate(45deg); }
.exhibit__close span:last-child { transform: rotate(-45deg); }

.exhibit__share {
  position: absolute; top: 22px; left: 22px; z-index: 6;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink-25);
  background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  color: #fff;
  transition: background .4s, transform .4s var(--ease), opacity .3s;
}
.exhibit__share svg { width: 20px; height: 20px; }
.exhibit__share:hover { background: #fff; color: #000; transform: translateY(1px); }
.exhibit__share.is-busy { opacity: 0.55; pointer-events: none; }

.exhibit__hero { position: relative; height: 46vh; min-height: 320px; }
.exhibit__hero .art { position: absolute; inset: 0; }
.exhibit__hero::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(180deg, transparent 40%, #050505 100%);
}

.exhibit__body { padding: 0 clamp(26px, 5vw, 56px) 60px; margin-top: -56px; position: relative; z-index: 4; }
.exhibit__festline { color: var(--ink-60); margin-bottom: 18px; }
.exhibit__title { font-size: clamp(40px, 8vw, 88px); margin-bottom: 39px; line-height: 0.84; text-wrap: balance; }
/* margin-top схлопывается с body — двигаем transform’ом */
.exhibit__panel .exhibit__title {
  position: relative;
  top: -50px;
  margin-bottom: -11px; /* 39 - 50: не оставляем дыру под названием */
}
.exhibit__latin { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-60); margin-top: -26px; margin-bottom: 26px; }
.exhibit__latin span { color: var(--ink-40); }
.exhibit__meta { padding-bottom: 26px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.exhibit__metaline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-60); }
.exhibit__metaline--sub { color: var(--ink-40); }
.exhibit__metaline .status[data-status="in-production"]::before { animation: none; }
.exhibit__metaline .status { font-size: inherit; }
.exhibit__dot { color: var(--ink-40); font-size: 1.35em; line-height: 0; font-weight: 700; opacity: 0.85; }

.exhibit__cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 4vw, 56px); padding-top: 26px; }
.exhibit__cols.is-solo { grid-template-columns: 1fr; }
.exhibit__syn h4, .exhibit__facts h4 { margin-bottom: 16px; }
.exhibit__syn p { font-size: 15px; line-height: 1.65; color: var(--ink-90); margin-bottom: 16px; }
.exhibit__syn-en { color: var(--ink-40) !important; font-size: 13.5px !important; font-style: italic; }
.exhibit__facts dl { display: flex; flex-direction: column; }
.exhibit__facts dl > div { display: flex; justify-content: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--ink-07); }
.exhibit__facts dt { flex: 0 0 84px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-40); }
.exhibit__facts dd { font-size: 13px; text-align: left; color: var(--ink-90); line-height: 1.6; }

.exhibit__award { display: flex; gap: 18px; align-items: flex-start; margin: 10px 0 8px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 4px; background: var(--ink-07); }
.exhibit__laurel { flex: none; font-size: 32px; line-height: 1; color: var(--white); margin-top: 2px; }
.exhibit__award-body { min-width: 0; flex: 1; }
.exhibit__award-list { display: flex; flex-direction: column; margin-top: 8px; }
.exhibit__hrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.exhibit__award-list .exhibit__hrow:first-child { padding-top: 4px; border-top: 0; }
.exhibit__award-list .exhibit__hrow:last-child { padding-bottom: 0; }
.exhibit__award-name { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0; line-height: 1.3; }
.exhibit__award-fest { font-size: 11px; letter-spacing: .08em; color: var(--ink-40); white-space: nowrap; }
.exhibit__award-en { color: var(--ink-40); }

/* ВРЕМЕННЫЙ переключатель вариантов блока наград */
.exhibit__award[hidden], .exhibit__award2[hidden], .exhibit__award3[hidden], .exhibit__award4[hidden], .exhibit__award5[hidden], .exhibit__award6[hidden] { display: none; }
.exhibit__avswitch { display: flex; gap: 16px; align-items: baseline; margin: 40px 0 14px; color: var(--ink-40); }
.exhibit__avswitch button { background: none; border: 0; padding: 0 0 3px; cursor: pointer; color: var(--ink-40); font: inherit; letter-spacing: inherit; text-transform: inherit; border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.exhibit__avswitch button:hover { color: var(--ink-60); }
.exhibit__avswitch button.is-active { color: var(--white); border-bottom-color: var(--white); }

/* вариант 2 — минимальный список: без плашки, без лавра, одна строка на награду */
.exhibit__award2 { margin: 10px 0 8px; }
.exhibit__award2-row { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.45; margin-top: 10px; }
.exhibit__award2 .u-label + .exhibit__award2-row { margin-top: 14px; }
.exhibit__award2-row span { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; color: var(--ink-40); }

/* вариант 3 — всегда 3 в ряд; неполный последний ряд (1 или 2) центрируется */
.exhibit__award3 {
  --award-gap: 10px; /* только между соседними ячейками в ряду */
  --award-cols: 3;
  --award-cell: calc((100% - (var(--award-cols) - 1) * var(--award-gap)) / var(--award-cols));
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--award-gap);
  row-gap: 10px;
  justify-content: center; /* 1 или 2 в последнем ряду — по центру */
  /* в смешанном ряду текст центрируется относительно высокой картинки */
  align-items: center;
  margin: 50px 0 0;
  padding: 0;
}
.exhibit__plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 var(--award-cell);
  width: var(--award-cell);
  max-width: var(--award-cell);
  margin: 0;
  padding: 0;
  text-align: center;
  box-sizing: border-box;
  height: auto;
  overflow: visible;
  container-type: inline-size;
  container-name: plaque;
}
/* картинка-приз: ширина ячейки, высота по исходному кадру (без квадрата-пустышки) */
.exhibit__plaque--img {
  margin: 0;
  display: block;
}
.exhibit__plaque-laurel {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
}
/* текстовая награда: высота по контенту */
.exhibit__plaque--text {
  max-width: var(--award-cell);
}
.exhibit__plaque-prize {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 100px;
  margin: 0;
  padding: 0 6px;
  box-sizing: border-box;
}
.exhibit__plaque-prize em {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(15px, 10cqw, 19px);
  line-height: 1.25;
  text-wrap: balance;
  width: 100%;
}
/* венок на фоне текста — потолок 100px */
.exhibit__plaque-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  margin: 0;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  filter: brightness(0) invert(1);
  opacity: 0.14;
}
/* фестиваль + год отдельными строками, чуть ярче muted */
.exhibit__plaque-fest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-60);
  position: relative;
  z-index: 1;
  line-height: 1.3;
  margin: 0;
}
.exhibit__plaque-fest-name,
.exhibit__plaque-fest-year { display: block; }
.exhibit__award3 .exhibit__plaque--img .exhibit__plaque-fest { display: none; }
@media (max-width: 720px) {
  .exhibit__award3 { --award-cols: 2; }
}

/* вариант 4 — венки поверх обложки: вертикальный ряд слева вверху над exhibit__hero */
.exhibit__award4 { position: absolute; z-index: 5; top: clamp(20px, 3vh, 32px); left: clamp(26px, 5vw, 56px); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.exhibit__wrow { display: flex; align-items: center; gap: 12px; padding: 6px 18px 6px 8px; border-radius: 100px; background: rgba(6,6,8,.4); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* вариант 5 — только сами венки поверх обложки, без подписей и подложек, в ряд */
.exhibit__award5 { position: absolute; z-index: 5; top: clamp(20px, 3vh, 32px); left: clamp(26px, 5vw, 56px); display: flex; align-items: center; flex-wrap: wrap; gap: clamp(10px, 1.6vw, 20px); }
.exhibit__wreath5 { flex: none; width: clamp(52px, 6.4vw, 78px); height: auto; color: #fff; filter: drop-shadow(0 2px 10px rgba(0,0,0,.5)); }
.exhibit__wreath5 svg { display: block; width: 100%; height: auto; }

/* вариант 6 — присланная картинка (растр), без подписей и подложек, в столбик */
.exhibit__award6 { position: absolute; z-index: 5; top: clamp(20px, 3vh, 32px); left: clamp(26px, 5vw, 56px); display: flex; flex-direction: column; align-items: flex-start; gap: clamp(16px, 2.6vh, 34px); }
.exhibit__wreath6 { flex: none; width: clamp(84px, 9vw, 132px); height: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,.55)); }
.exhibit__wrow-ic { flex: none; width: 46px; height: 24px; color: #fff; }
.exhibit__wrow-ic svg { display: block; width: 100%; height: 100%; }
.exhibit__wrow-tx { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.exhibit__wrow-tx b { font-family: var(--serif); font-weight: 600; font-size: 14px; }
.exhibit__wrow-tx i { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: rgba(255,255,255,.62); }

.exhibit__gallery { display: flex; gap: 10px; margin-top: 48px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
.exhibit__gallery::-webkit-scrollbar { display: none; }
.exhibit__gallery-bar { position: relative; margin-top: 24px; height: 18px; cursor: pointer; touch-action: none; }
.exhibit__gallery-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; border-radius: 100px; background: var(--ink-12); transform: translateY(-50%); }
.exhibit__gallery-fill { position: absolute; left: 0; top: 50%; height: 2px; width: 0; border-radius: 100px; background: var(--ink-40); transform: translateY(-50%); pointer-events: none; }
.exhibit__gallery-dot { position: absolute; left: 0; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(0, -50%); cursor: grab; touch-action: none; box-shadow: 0 1px 5px rgba(0,0,0,0.5); transition: width .25s var(--ease), height .25s var(--ease); }
.exhibit__gallery-bar:hover .exhibit__gallery-dot, .exhibit__gallery-dot.is-drag { width: 18px; height: 18px; }
.exhibit__gallery-dot.is-drag { cursor: grabbing; }
.exhibit__still { flex: 0 0 auto; width: clamp(230px, 42vw, 300px); aspect-ratio: 16 / 10; border-radius: 3px; overflow: hidden; position: relative; }
/* Poster cell hugs the portrait poster (2:3) — same row height as the landscape cells, width follows, no empty space. */
.exhibit__still--poster { width: auto; height: clamp(143.75px, 26.25vw, 187.5px); aspect-ratio: 2 / 3; }
/* Gallery thumbs are independent of lightbox / .art — fixed cell, cover fill, *-sm sources. */
.exhibit__thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .9s var(--ease);
  background: transparent;
}
.exhibit__still::after { content: "⤢"; position: absolute; right: 12px; bottom: 8px; z-index: 4; font-size: 16px; color: #fff; opacity: 0; transition: opacity .4s; }
.exhibit__still:hover .exhibit__thumb { transform: scale(1.06); }
.exhibit__gallery.is-rubber { will-change: transform; }
.exhibit__gallery.is-rubber > * { pointer-events: none; }
.exhibit__still:hover::after { opacity: 0.9; }
.exhibit__still--video::after { content: none; }
.exhibit__yt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.exhibit__still--video:hover .exhibit__yt { transform: scale(1.06); }
.exhibit__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(10,10,12,0.5); border: 1px solid rgba(255,255,255,0.7); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); transition: background .3s var(--ease); }
.exhibit__still--video:hover .exhibit__play { background: rgba(10,10,12,0.8); }
.exhibit__play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%); border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.exhibit__vlabel { position: absolute; left: 10px; top: 9px; z-index: 4; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,0.42); padding: 3px 7px; border-radius: 2px; }

.exhibit__avail { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 44px; }

/* where-to-watch: text-link lists + cinema note (handles many platforms) */
.exhibit__watch { margin-top: 52px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(24px, 4vw, 56px); }
.watchgroup .u-label { display: block; margin-bottom: 16px; }
.watchlist { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.watchlist li { border-bottom: 1px solid var(--line); }
.watchlist a, .watchlink {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 2px; font-size: 15px; color: var(--ink-90);
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.watchlist a:hover, .watchlink:hover { color: #fff; padding-left: 8px; }
.watchlist__ar { font-size: 12px; color: var(--ink-40); transition: transform .35s var(--ease), color .3s; }
.watchlist a:hover .watchlist__ar, .watchlink:hover .watchlist__ar { color: #fff; transform: translateX(4px); }
.watchlink { display: inline-flex; border-bottom: 1px solid var(--line); }
.watchgroup__note { font-size: 14px; line-height: 1.5; color: var(--ink-60); max-width: 28ch; margin-bottom: 10px; }

/* aggregators — external database / ratings links as monochrome pills */
.exhibit__aggs { margin-top: 48px; }
.exhibit__aggs .u-label { display: block; margin-bottom: 16px; }
.agglist { display: flex; flex-wrap: wrap; gap: 10px; }
.agg {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-90); padding: 12px 18px;
  border: 1px solid var(--line); border-radius: 100px;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.agg:hover { background: #fff; color: #000; border-color: #fff; }
.agg__ar { font-size: 11px; color: var(--ink-40); transition: color .4s var(--ease); }
.agg:hover .agg__ar { color: #000; }

@media (max-width: 600px) {
  .exhibit__cols { grid-template-columns: 1fr; }
  .exhibit__still { width: 76vw; }
  .exhibit__still--poster { width: auto; height: 47.5vw; }
}

/* ---- lightbox ---- */
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,0.95); display: grid; place-items: center; opacity: 0; pointer-events: none; }
.anim-ready .lightbox { transition: opacity .5s var(--ease); }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
/* Image stage hugs the media; video keeps a 16:9 player box. No letterbox fill. */
.lightbox__stage { position: relative; max-width: min(94vw, 1600px); max-height: calc(100vh - 100px); background: transparent; }
.lightbox__stage--video { width: min(94vw, 1600px); aspect-ratio: 16 / 9; box-shadow: 0 40px 140px rgba(0,0,0,0.7); }
.lightbox__stage--image { width: auto; height: auto; aspect-ratio: auto; box-shadow: none; }
.lightbox__img {
  display: block; max-width: min(94vw, 1600px); max-height: calc(100vh - 100px);
  width: auto; height: auto; object-fit: contain;
  box-shadow: 0 40px 140px rgba(0,0,0,0.55);
}
.lightbox__yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__close { position: absolute; top: 26px; right: 30px; font-size: 22px; color: #fff; opacity: 0.7; }
.lightbox__close:hover { opacity: 1; }
.lightbox__count { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; color: var(--ink-60); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 26px; color: #fff; width: 60px; height: 60px; opacity: 0.6; transition: opacity .3s; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__prev { left: 2vw; }
.lightbox__next { right: 2vw; }
