
/* Universal border-box: padding/border count inside width, so `width:100%`
   elements never overflow their parent. Fixes recurring layout overflow. */
*, *::before, *::after { box-sizing: border-box; }

/* ===== Design tokens ===== */
:root {
  --font-sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.06);
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 18px 44px rgba(17, 24, 39, 0.16);
  --accent: #e11d2a;          /* cinema red — used for focus / active accents */
  --accent-ink: #fff;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html, body {
  margin: 0;
  font-family: var(--font-sans);
  background: #f5f5f5;
  color: #222;
  overflow-x: clip; /* prevent 1-2px desktop overflow issues */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

/* Keyboard accessibility: visible focus ring without hurting mouse users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/*
  Side background images (left/right) for wide screens.
  - Uses background-size: cover to auto-fit images without breaking layout.
  - Safe fallback: hidden on smaller screens.

  Enable by setting CSS variables:
    body { --side-bg-left: url('/static/img/left.jpg'); --side-bg-right: url('/static/img/right.jpg'); }
*/
.has-side-bg {
  --side-bg-left: none;
  --side-bg-right: none;
  /* Scrollbar compensation: (100vw - 100%) ~= scrollbar width on desktop */
  --sbw: calc(100vw - 100%);
  --content-max: 1200px;
}

.side-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  /*
    IMPORTANT:
    - 100vw includes the vertical scrollbar on desktop, which can create horizontal overflow
      (a blank strip on the right).
    - Subtract scrollbar width (var(--sbw)) to match the real visible viewport.
  */
  width: max(0px, calc((100vw - var(--sbw) - var(--content-max)) / 2));
  min-width: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.side-bg--left { left: 0; background-image: var(--side-bg-left); }
.side-bg--right { right: 0; background-image: var(--side-bg-right); }

.side-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
}

@media (max-width: 1280px) {
  .side-bg { display: none; }
}
a { color: inherit; text-decoration: none; }
.layout { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.header__left { display: flex; align-items: center; gap: 12px; }
.header__right { display: flex; align-items: center; gap: 10px; }
.header__actions { display: flex; align-items: center; gap: 10px; }
.logo-text { font-weight: 800; letter-spacing: 2px; }
.header__city select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.95);
  color: #111;
  min-width: 180px;
  font-weight: 700;
}

.header__city select option { color: #111; }
.header__nav {
  display: flex;
  gap: 16px;
}
.header__nav a {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  opacity: 0.95;
}
.header__nav a:hover { opacity: 1; transform: translateY(-1px); }

.header__login{
  font-size: 14px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.15);
}
.header__login--ghost{ background: transparent; }
.header__burger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
}

/* Mobile drawer controls are hidden on desktop by default */
.header__navTop,
.header__navClose,
.header__menuLabel {
  display: none;
}

/* Mobile navigation drawer helpers */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 60;
}

body.nav-lock {
  overflow: hidden;
}
.main { flex: 1; padding: 16px; box-sizing: border-box; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Shared UI skeleton (same feel across Home / Розклад / Фільм) */
.page {
  padding: 4px 0 20px;
}

.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(17,24,39,0.08);
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 22px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.muted { color: rgba(0,0,0,0.62); }

/* Micro animations (subtle) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeUp .35s ease both; }
@media (prefers-reduced-motion: reduce) { .animate-in { animation: none; } }

/* Hero */
.hero{
  padding: 0;
  border-radius: 18px;
  margin-bottom: 14px;
  color: #fff;
  background: linear-gradient(180deg, #3a3a3a 0%, #2f2f2f 100%);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}
.hero__inner{
  padding: 26px 28px;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero__title{
  margin: 0 0 10px 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
}
.hero__subtitle{
  margin: 0 auto;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.92;
}
.hero__booking{
  margin-top: 10px;
  font-weight: 600;
  opacity: 0.95;
}
@media (max-width: 680px){
  .hero__inner{ padding: 18px 16px; text-align: center; }
  .hero__title{ font-size: 24px; }
  .hero__subtitle{ max-width: 100%; }
}


/* Home slider */
.home-slider{ margin: 12px 0 22px 0; }
.slider{ position:relative; border-radius: 16px; overflow:hidden; }
.slider__track{ display:flex; transition: transform 350ms ease; }
.slider__slide{ min-width:100%; display:block; position:relative; }
.slider__slide img{ width:100%; height:260px; object-fit:cover; display:block; }
.slider__caption{ position:absolute; left:14px; bottom:12px; right:14px; padding:10px 12px; border-radius: 14px; font-weight:900; font-size:18px; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.slider__btn{ position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; border-radius:999px; border:1px solid rgba(255,255,255,0.35); background: rgba(0,0,0,0.35); color:#fff; font-size:28px; line-height:36px; cursor:pointer; }
.slider__btn--prev{ left:10px; }
.slider__btn--next{ right:10px; }
.slider__dots{ position:absolute; left:0; right:0; bottom:10px; display:flex; gap:8px; justify-content:center; }
.slider__dot{ width:9px; height:9px; border-radius:999px; background: rgba(255,255,255,0.35); border:1px solid rgba(0,0,0,0.15); cursor:pointer; }
.slider__dot.is-active{ background: rgba(255,255,255,0.85); }

.footer {
  padding: 0;
  font-size: 14px;
}

.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 12px 0;
}

.footer__socials{ display:flex; align-items:center; gap:10px; }

.footer__social{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  color:#fff;
  text-decoration:none;
  transition: transform .18s ease, background .18s ease;
}
.footer__social svg{ width:18px; height:18px; fill: currentColor; }
.footer__social:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.08); }

.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.film-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(17,24,39,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.film-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #e9edf3;
  overflow: hidden;
}

/* Poster image fills the fixed 2:3 box exactly (crop, never letterbox),
   so every card has an identical poster regardless of the source ratio. */
.film-card__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ddd;
  color: #6b7280;
}

.film-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.18));
  opacity: 0;
  transition: opacity .18s ease;
  display: flex;
  align-items: flex-end;
}

.film-card__overlay-inner {
  padding: 12px;
  color: #fff;
  width: 100%;
}

.film-card__overlay-meta {
  font-size: 12px;
  opacity: .95;
  margin-bottom: 4px;
}

.film-card__overlay-desc {
  font-size: 12px;
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.film-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.film-card:hover .film-card__overlay { opacity: 1; }
.film-card:hover .film-card__poster img { transform: scale(1.03); }
.film-card__body {
  padding: 10px 12px;
}

.schedule-film-card {
  display: flex;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
  transition: transform .18s ease, box-shadow .18s ease;
}

.schedule-film-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

/* Schedule mode buttons */
.schedule-modes{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.schedule-modes a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:14px;
  border:1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.18);
}
.schedule-modes a.active{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}

.schedule-film-card__poster img,
.schedule-film-card__poster .poster-placeholder {
  width: 120px;
  height: 170px;
  object-fit: contain;
}

.schedule-film-card__titlelink {
  color: inherit;
  text-decoration: none;
}

.schedule-film-card__titlelink:hover {
  text-decoration: underline;
}
.schedule-film-card__seances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.seance-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: #f3f4f6;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(17,24,39,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
}

.seance-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(17, 24, 39, 0.10);
}

.seance-pill--static {
  cursor: default;
}

.seance-pill--static:hover {
  transform: none;
  box-shadow: none;
}

/* Film detail redesign */
.film-detail { padding: 8px 0 24px; }

.film-detail__top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  padding: 18px;
}

.film-detail__poster img {
  width: 100%;
  border-radius: 14px;
  display: block;
}

.poster-placeholder--big {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: #e5e7eb;
  display: grid;
  place-items: center;
  color: #6b7280;
}

.film-detail__title {
  margin: 0 0 12px;
  font-size: 38px;
  letter-spacing: -0.02em;
}

.film-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  padding-top: 6px;
}

.film-meta__item { display: grid; gap: 2px; }
.film-meta__label { font-size: 12px; color: #6b7280; }
.film-meta__value { font-size: 14px; color: #111827; }

.film-seances { margin-top: 16px; }
.film-seances__title { font-weight: 700; margin-bottom: 10px; }
.film-seances__list { display: flex; flex-wrap: wrap; gap: 10px; }

.film-detail__description,
.film-detail__trailer {
  margin-top: 16px;
  padding: 18px;
}

.section-title { margin: 0 0 10px; font-size: 18px; }
.film-detail__text { color: #111827; line-height: 1.6; white-space: pre-wrap; }

.trailer-frame {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0e14;
}

.trailer-frame iframe { width: 100%; height: 100%; }

@media (max-width: 900px) {
  .film-detail__top { grid-template-columns: 1fr; }
  .film-detail__title { font-size: 30px; }
  .film-meta { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .main { padding: 12px 0; }
  .container { padding: 0 12px; }
  .hero { padding: 26px 14px; }
  .films-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .film-card__body { padding: 10px; }
  .film-card__title { font-size: 14px; }
  .schedule-film-card { flex-direction: column; }
  .schedule-film-card__poster { width: 100%; height: auto; aspect-ratio: 2 / 3; }
  .schedule-film-card__poster img { height: 100%; object-fit: contain; }
}

/* Account */
.account{ display:flex; justify-content:center; }
.account-card{ max-width:720px; width:100%; padding:16px; border-radius:16px; }
.account-card h1{ margin:0 0 6px 0; }
.account-card .muted{ margin:0 0 16px 0; opacity:0.85; }
.family-card{ border-radius:18px; padding:16px; background: rgba(0,0,0,0.18); border:1px solid rgba(255,255,255,0.18); }
.family-card__title{ font-weight:900; letter-spacing:1px; opacity:0.9; }
.family-card__number{ font-weight:900; font-size:28px; margin-top:10px; }
.family-card__points{ margin-top:8px; font-weight:700; }
.mt{ margin-top:14px; }

/* Admin */
.admin-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-main { padding: 16px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid #eee;
  padding: 8px;
  text-align: left;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 600;
  border: 0;
}

.btn-secondary {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e8e8e8;
  color: #111;
  font-weight: 600;
  border: 0;
}

.link-danger {
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.form {
  max-width: 900px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
}

.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; margin-bottom: 6px; }
.input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-actions { display: flex; gap: 10px; margin-top: 12px; }

.admin-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-form { display: flex; gap: 8px; align-items: center; }
.note { opacity: 0.8; font-size: 14px; }

/* Auth */
.auth-layout {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: #111;
}
.auth-form {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
}
.auth-form input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.auth-form button {
  margin-top: 4px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #111;
  color: #fff;
  font-weight: 600;
}

.flash-list { list-style: none; padding: 0; color: #c00; }

@media (max-width: 768px) {
  .header__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-tap-highlight-color: transparent;
  }

  /* Ensure burger stays visible and not pushed out by city/login on small screens */
  .header__right { gap: 8px; }
  .header__actions { flex: 1; min-width: 0; gap: 8px; justify-content: flex-end; }
  .header__city { flex: 1; min-width: 0; }
  .header__city select { width: 100%; max-width: 220px; }
  .header__login { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .header__burger { flex: 0 0 44px; }


  .header__nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(82vw, 360px);
    padding: 16px;
    flex-direction: column;
    gap: 10px;
    background: rgba(14, 14, 18, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    transform: translateX(-105%);
    transition: transform 260ms cubic-bezier(.2,.8,.2,1);
    z-index: 70;
    overflow-y: auto;
  }

  .header__navTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header__navTitle {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .9;
  }

  .header__navClose {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
  }

  .header__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: #fff;
    font-weight: 600;
  }

  .header__nav a::after {
    content: "›";
    opacity: 0.65;
    margin-left: 12px;
  }

  body.nav-open .header__nav {
    transform: translateX(0);
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Staggered reveal */
  body.nav-open .header__nav a {
    animation: navItemIn 360ms cubic-bezier(.2,.8,.2,1) both;
  }
  body.nav-open .header__nav a:nth-of-type(1) { animation-delay: 40ms; }
  body.nav-open .header__nav a:nth-of-type(2) { animation-delay: 70ms; }
  body.nav-open .header__nav a:nth-of-type(3) { animation-delay: 100ms; }
  body.nav-open .header__nav a:nth-of-type(4) { animation-delay: 130ms; }
  body.nav-open .header__nav a:nth-of-type(5) { animation-delay: 160ms; }
}

@keyframes navItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

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


/* City chooser modal (first visit) */
.city-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,.70);
}

.city-modal{
  width: min(860px, 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  background: rgba(40,40,40,.92);
  background-image: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.12));
  border: 1px solid rgba(255,255,255,.12);
}

.city-modal-header{
  padding: 22px 22px 10px;
  text-align: center;
}

.city-modal-title{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.city-modal-cards{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 22px 22px;
}

.city-card{
  appearance: none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  border-radius: 16px;
  padding: 18px 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.city-card:hover{
  transform: translateY(-2px);
  background: rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.22);
}

.city-card:active{
  transform: translateY(0px);
}

.city-card-logo{
  width: 150px;
  max-width: 80%;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.35));
}

.city-card-name{
  margin-top: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

@media (max-width: 640px){
  .city-modal-cards{ grid-template-columns: 1fr; }
  .city-card-logo{ width: 170px; }
}

/* ===== Film detail (unified light layout) ===== */
.film-page{
  padding: 24px 0 40px;
}

.film-sheet{
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}

.film-hero{
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 20px;
  padding: 22px;
}

.film-poster img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

.film-title{
  font-size: 36px;
  line-height: 1.12;
  margin: 4px 0 12px;
}

.film-meta{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  margin-top: 6px;
}

.meta-item{display:flex; flex-direction:column; gap:2px;}
.meta-label{font-size: 12px; opacity:.65;}
.meta-value{font-size: 16px; font-weight: 600;}

.film-booking{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef2f6;
  border: 1px solid rgba(0,0,0,.06);
  font-size: 14px;
  line-height: 1.4;
}

.film-schedule{
  background: #eef0f3;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 14px;
  height: fit-content;
}

.schedule-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 10px;}
.schedule-title{font-weight: 800;}
.schedule-day select{
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}

.schedule-hall{padding: 10px 0; border-top: 1px solid rgba(0,0,0,.06);}
.schedule-hall:first-child{border-top:0; padding-top:0;}
.hall-name{font-weight: 700; margin-bottom: 8px;}
.hall-times{display:flex; flex-wrap:wrap; gap:10px;}
.time-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 64px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  font-weight: 800;
}
.schedule-empty{opacity:.7; padding: 10px 0;}

.film-desc{
  padding: 18px 22px 18px;
  font-size: 16px;
  line-height: 1.55;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.film-trailer{
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.video-wrap{
  max-width: 980px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
  background: #000;
  aspect-ratio: 16/9;
}

.video-wrap iframe{
  width: 100%;
  height: 100%;
  display:block;
}

/* --- Date pills (schedule + film page) --- */
.schedule-dates{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.schedule-date-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border-radius:999px;
  background:#d8d8d8;
  color:#222;
  font-weight:700;
  font-size:13px;
  border:0;
  text-decoration:none;
  line-height:1;
  min-height:34px; /* finger friendly */
}

.schedule-date-btn.active{
  background:#fff;
  box-shadow:0 0 0 2px rgba(0,0,0,.25) inset;
}

/* More compact inside the film sidebar card */
.film-schedule-box .schedule-dates{gap:6px;}
.film-schedule-box .schedule-date-btn{padding:7px 9px; font-size:12px; min-height:32px;}

@media (max-width: 992px){
  .film-hero{grid-template-columns: 240px 1fr;}
  .film-schedule{grid-column: 1 / -1;}
}

@media (max-width: 640px){
  .film-page{padding: 14px 0 26px;}
  .film-hero{grid-template-columns: 1fr; padding: 16px;}
  .film-title{font-size: 26px;}
  .film-meta{grid-template-columns: 1fr 1fr;}
  .film-desc{padding: 14px 16px 14px;}
  .film-trailer{padding: 14px 16px 16px;}
  .film-sheet{border-radius: 14px;}
}

/* =============================
   Schedule / Film detail tweaks
   ============================= */

.schedule-tabs, .schedule-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.schedule-tabs .tab,
.schedule-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 14px;
  background: #d9d9d9;
  color: #222;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.1;
  min-width: 76px;
}

.schedule-tabs .tab.active,
.schedule-day.active {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* --- Schedule list layout (vertical rows) --- */
.schedule-list{display:flex; flex-direction:column; gap:12px;}
.schedule-row{
  display:flex;
  gap:14px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 2px 10px rgba(0,0,0,0.06);
  overflow:hidden;
}
.schedule-row__poster{display:block; width:92px; flex:0 0 92px;}
.schedule-row__poster img{width:100%; height:100%; object-fit:cover; aspect-ratio:2/3; display:block;}
.schedule-row__body{padding:12px 12px 12px 0; flex:1 1 auto; min-width:0;}
.schedule-row__title{display:block; font-weight:900; text-decoration:none; color:#111; margin-top:2px;}
.schedule-row__title:hover{text-decoration:underline;}
.schedule-row__genre{opacity:.75; font-weight:800; margin-top:4px; font-size:13px;}
.schedule-row__seances{display:flex; flex-wrap:wrap; gap:8px; margin-top:10px;}

@media (max-width: 640px){
  .schedule-row{gap:12px;}
  .schedule-row__poster{width:80px; flex-basis:80px;}
  .schedule-row__body{padding:10px 10px 10px 0;}
}

.schedule-film {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}

.schedule-film__poster { position: relative; display: block; }
.schedule-film__poster img { width: 100%; display:block; aspect-ratio: 2 / 3; object-fit: cover; }

.schedule-film__info { padding: 10px 12px 12px; }
.schedule-film__title { font-weight: 900; margin-bottom: 8px; }

.schedule-film__times { display:flex; flex-wrap: wrap; gap: 8px; }
.seance-pill {
  background: #f1f2f4;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 13px;
}
.seance-pill .muted { font-weight: 800; opacity: .7; }

.seance-pill--dark{
  background:#111;
  color:#fff;
}
.seance-pill--dark .muted{color:rgba(255,255,255,0.82); opacity:1; font-weight:800; margin-left:6px;}

.film-seances-list{display:flex; flex-wrap:wrap; gap:8px;}



/* ===== Side banners + centered content layout ===== */
.page-shell{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:24px;
  padding:0;
  width: 100%;
  margin: 0;
}


.page-center{
  width:100%;
  max-width:1220px;
  min-width:0;
  padding:18px 0 40px;
  position:relative;
}

/* Center column visual separation on wide screens */
.page-center::before{
  content:"";
  position:absolute;
  inset:-14px -12px;
  background: rgba(245,245,245,0.92);
  border-radius:22px;
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  z-index:-1;
}


/* Full-height side panels (fills the whole side column) */
.side-banner{
  flex:0 0 300px;
  width:300px;
  position:sticky;
  top:88px; /* header height */
  height: calc(100vh - 88px);
  overflow:hidden;
  border-radius:18px;
  background:#0f0f0f;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

/* Soft blurred edges using a blurred duplicate as background.
   Requires --sb-img CSS variable on the aside (set in template). */
.side-banner::before{
  content:"";
  position:absolute;
  inset:-22px;
  background-image: var(--sb-img);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: .95;
  z-index: 0;
}

/* Vignette to soften edges and improve readability */
.side-banner::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.35) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.10), rgba(0,0,0,.22));
  pointer-events:none;
  z-index: 2;
}

.side-banner__link{
  display:block;
  width:100%;
  height:100%;
  text-decoration:none;
  position:relative;
  z-index: 1;
}

.side-banner img{
  position: relative;
  z-index: 1; /* sit above the blurred ::before fill */
  width:100%;
  height:100%;
  display:block;
  object-fit: fill; /* stretch to fill the whole panel — no crop, no black bars */
  object-position: center;
  border-radius: 18px;
}

/* Keep the full image centered on both panels (blurred ::before fills the rest) */
.side-banner--left img,
.side-banner--right img{ object-position: center; }

/* Hide banners on smaller screens to avoid breaking layout */
@media (max-width: 1280px){
  .side-banner{ display:none; }
  .page-shell{ padding: 0 12px 24px; }
  .page-center{ max-width: 100%; padding-top: 12px; }
}

/* On slightly smaller desktops reduce side width */
@media (max-width: 1480px){
  .side-banner{ flex-basis: 260px; width: 260px; }
}
/* Ensure main containers don't overflow inside centered column */
.main{ width:100%; }
.container{ max-width: 100%; }


/* ===== Ultra-wide background blend (4K+) ===== */
@media (min-width: 2000px){
  body{ background: #0e0e0e; }
  body::before{
    content:"";
    position: fixed;
    inset: 0;
    background-image: var(--bg-side, none);
    background-size: cover;
    background-position: center;
    filter: blur(70px) brightness(.70) saturate(1.05);
    transform: scale(1.12);
    z-index: 0;
    pointer-events: none; /* background decor must never intercept clicks (4K bug) */
  }
  .layout{ position: relative; z-index: 1; }
  .page-center{ max-width: 1280px; }
}


/* Film detail alignment fix */
.film-hero--aligned{
  grid-template-columns: 280px 1fr;
  align-items: start;
}

.film-left-column{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.film-kino-rating{
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:fit-content;
  min-height:52px;
  padding:10px 14px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
}

.film-kino-rating__logo{
  width:74px;
  height:auto;
  display:block;
}

.film-kino-rating__value{
  font-size:20px;
  line-height:1;
  font-weight:800;
  color:#111;
}

.film-schedule-box{
  width:100%;
  background:#eef0f3;
}

.schedule-head--stacked{
  align-items:flex-start;
  flex-direction:row;
}

.schedule-head--stacked .schedule-title{
  white-space:nowrap;
}

.schedule-head--stacked .schedule-dates{
  justify-content:flex-end;
}

.video-wrap video{
  width:100%;
  height:100%;
  display:block;
  background:#000;
}

@media (max-width: 992px){
  .film-hero--aligned{grid-template-columns:240px 1fr;}
}

@media (max-width: 640px){
  .film-hero--aligned{grid-template-columns:1fr;}
  .schedule-head--stacked{flex-direction:column; align-items:flex-start;}
  .schedule-head--stacked .schedule-dates{justify-content:flex-start;}
  .film-kino-rating{width:100%; justify-content:flex-start;}
}


.film-poster-column{
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* .film-kino-rating* and .video-wrap video are defined once above (deduplicated). */
.film-schedule--right{
  align-self:start;
}

@media (max-width: 992px){
  .film-hero--with-rating{
    grid-template-columns:240px 1fr;
  }

  .film-schedule--right{
    grid-column:1 / -1;
  }
}

@media (max-width: 640px){
  .film-hero--with-rating{
    grid-template-columns:1fr;
  }

  .film-kino-rating{
    width:100%;
    justify-content:flex-start;
  }
}

/* ===== Schedule 3D poster badge ===== */
.schedule-row__poster{
  position:relative;
  overflow:hidden;
  border-radius:14px 0 0 14px;
}

.schedule-format-badge{
  position:absolute;
  top:8px;
  left:8px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:6px 10px 6px 8px;
  border-radius:999px;
  color:#fff;
  font-weight:900;
  font-size:13px;
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:linear-gradient(135deg, rgba(13,33,76,.96) 0%, rgba(35,111,246,.96) 58%, rgba(63,214,255,.94) 100%);
  border:1px solid rgba(255,255,255,.42);
  box-shadow:0 10px 22px rgba(5,14,34,.26);
  backdrop-filter:blur(6px) saturate(130%);
}

.schedule-format-badge__icon{
  width:26px;
  height:auto;
  flex:0 0 auto;
  display:block;
}

.schedule-format-badge__text{
  display:inline-block;
}

@media (max-width: 640px){
  .schedule-format-badge{
    top:6px;
    left:6px;
    min-height:26px;
    padding:5px 8px 5px 7px;
    gap:5px;
    font-size:12px;
  }
  .schedule-format-badge__icon{ width:22px; }
}

/* =====================================================================
   Freshen-up layer (2026): display headings, hero CTA, floating call,
   "Сьогодні" strip, hover-to-preview trailer.
   Appended intentionally so it overrides earlier rules predictably.
   ===================================================================== */

/* --- Cinematic display font for key headings --- */
.hero__title,
.section-title,
.page-title,
.film-title,
.today__title {
  font-family: "Oswald", var(--font-sans);
  letter-spacing: .4px;
}
.hero__title { text-transform: uppercase; letter-spacing: 1px; }

/* --- Hero refresh + CTA buttons --- */
.hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(1200px 400px at 50% -20%, rgba(225,29,42,.28), transparent 60%),
    linear-gradient(180deg, #24262b 0%, #17181c 100%);
}
.hero__inner{ position:relative; z-index:1; }
/* Decorative popcorn-with-shades behind the title (transparent, non-interactive) */
.hero__decor{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(320px, 70%);
  opacity:.45;
  z-index:0;
  pointer-events:none;
}
.hero__decor svg{ width:100%; height:auto; display:block; }
@media (max-width:680px){ .hero__decor{ width:220px; opacity:.42; } }
.hero__cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  margin-top:18px;
}
@media (max-width:680px){ .hero__cta{ justify-content:center; } }

.btn-cta{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:13px 22px;
  border-radius:var(--radius-pill);
  font-weight:700;
  font-size:15px;
  text-decoration:none;
  border:1px solid transparent;
  transition:transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.btn-cta svg{ width:18px; height:18px; fill:currentColor; }
.btn-cta:hover{ transform:translateY(-2px); }
.btn-cta--primary{
  background:var(--accent);
  color:var(--accent-ink);
  box-shadow:0 10px 24px rgba(225,29,42,.34);
}
.btn-cta--primary:hover{ box-shadow:0 14px 30px rgba(225,29,42,.44); }
.btn-cta--ghost{
  background:rgba(255,255,255,.10);
  color:#fff;
  border-color:rgba(255,255,255,.28);
}
.btn-cta--ghost:hover{ background:rgba(255,255,255,.18); }

/* --- Floating "call to book" button --- */
.call-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1200;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:14px 20px;
  border-radius:var(--radius-pill);
  background:var(--accent);
  color:#fff;
  font-weight:700;
  font-size:15px;
  text-decoration:none;
  box-shadow:0 12px 30px rgba(225,29,42,.42);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease);
}
.call-fab:hover{ transform:translateY(-2px); box-shadow:0 16px 36px rgba(225,29,42,.5); }
.call-fab svg{ width:20px; height:20px; fill:currentColor; }
.call-fab__text{ white-space:nowrap; }
/* Gentle pulse to draw the eye (respects reduced motion) */
.call-fab::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:0 0 0 0 rgba(225,29,42,.5);
  animation:callPulse 2.4s var(--ease) infinite;
}
@keyframes callPulse{
  0%{ box-shadow:0 0 0 0 rgba(225,29,42,.45); }
  70%{ box-shadow:0 0 0 16px rgba(225,29,42,0); }
  100%{ box-shadow:0 0 0 0 rgba(225,29,42,0); }
}
@media (prefers-reduced-motion: reduce){ .call-fab::before{ animation:none; } }
@media (max-width:520px){
  /* Compact icon-only FAB on small phones to avoid covering content */
  .call-fab{ right:14px; bottom:14px; padding:15px; }
  .call-fab__text{ display:none; }
}

/* --- Today's showtimes on the "now playing" card --- */
.film-card__times{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin-top:10px;
}
.film-card__times-label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:var(--accent);
  margin-right:2px;
}
.film-card__time{
  font-size:12px;
  font-weight:700;
  padding:4px 9px;
  border-radius:var(--radius-pill);
  background:#15171c;
  color:#fff;
}
.film-card__time--more{ background:#eef2f7; color:#111; }

/* --- Symmetric film cards (uniform grid) --- */
.film-card{ display:flex; flex-direction:column; height:100%; }
.film-card__body{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:12px 12px 14px;
}
.film-card__title{
  margin:0;
  font-size:16px;
  font-weight:700;
  line-height:1.25;
  /* always reserve 2 lines so titles of different length align */
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:2.5em;
}
.film-card .genres{
  margin:0;
  font-size:13px;
  line-height:1.3;
  color:#6b7280;
  /* single line, ellipsis — keeps the times row aligned across the row */
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.film-card__times{ margin-top:auto; padding-top:10px; }

/* --- Hover-to-preview trailer (desktop only) --- */
.film-card__trailer{
  position:absolute; inset:0; z-index:4;
  border:0; width:100%; height:100%;
  object-fit:cover;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease;
  background:#000;
}
.film-card.is-previewing .film-card__trailer{ opacity:1; }
.film-card.is-previewing .film-card__overlay{ opacity:0; }
.film-card__playhint{
  position:absolute; z-index:3; left:10px; bottom:10px;
  width:34px; height:34px; border-radius:999px;
  display:grid; place-items:center;
  background:rgba(0,0,0,.6); color:#fff;
  border:1px solid rgba(255,255,255,.35);
  backdrop-filter:blur(4px);
  opacity:0; transition:opacity .18s ease;
  pointer-events:none;
}
.film-card:hover .film-card__playhint{ opacity:1; }
.film-card.is-previewing .film-card__playhint{ opacity:0; }
.film-card__playhint svg{ width:16px; height:16px; fill:#fff; margin-left:2px; }
@media (hover:none){ .film-card__playhint{ display:none; } }

/* --- Multi-number call chooser --- */
/* button variants of pill controls must reset native button styling */
button.call-fab,
button.btn-cta{ border:0; cursor:pointer; font-family:inherit; }
button.btn-cta{ border:1px solid transparent; }

.call-sheet{
  position:fixed;
  right:18px;
  bottom:78px;
  z-index:1201;
  width:min(288px, calc(100vw - 32px));
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.28);
  padding:8px;
  opacity:0;
  transform:translateY(10px) scale(.98);
  transform-origin:bottom right;
  transition:opacity .18s var(--ease), transform .18s var(--ease);
}
.call-sheet.is-open{ opacity:1; transform:none; }
.call-sheet__title{
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color:#6b7280; padding:9px 10px 7px;
}
.call-sheet__item{
  display:flex; align-items:center; gap:12px;
  padding:12px; border-radius:12px;
  color:#111; text-decoration:none; font-weight:700; font-size:16px;
}
.call-sheet__item svg{ width:20px; height:20px; fill:var(--accent); flex:0 0 auto; }
.call-sheet__item:hover{ background:#f3f5f9; }
@media (max-width:520px){
  .call-sheet{ right:14px; bottom:74px; }
}

/* --- Film page: aligned session rows with 2D/3D format --- */
.film-seances-list--rows{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.seance-pill.seance-row{
  display:grid;
  grid-template-columns:auto auto 1fr auto; /* time · format · hall · price */
  align-items:center;
  gap:10px;
  width:100%;
  box-sizing:border-box;
  padding:10px 14px;
  border-radius:14px;
}
.seance-row__time{ font-weight:900; font-size:15px; letter-spacing:.3px; }
.seance-row__hall{ opacity:.85; font-weight:700; font-size:13px; }
.seance-row__price{ text-align:right; font-weight:800; font-size:13px; white-space:nowrap; }
.seance-fmt{
  justify-self:start;
  font-size:11px;
  font-weight:800;
  letter-spacing:.4px;
  line-height:1;
  padding:4px 8px;
  border-radius:var(--radius-pill);
}
.seance-fmt--2d{ background:rgba(255,255,255,.16); color:#fff; }
.seance-fmt--3d{ background:linear-gradient(135deg,#2360f6 0%,#3fd6ff 100%); color:#fff; }
