
html, body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222;
  overflow-x: clip; /* prevent 1-2px desktop overflow issues */
}

/*
  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; }

.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: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  margin: 18px 0 12px;
}

.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; } }

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}
/* 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: left; }
  .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-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .18s ease, box-shadow .18s ease;
}

.film-card__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-card__poster img,
.poster-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.film-card__poster img { transition: transform .25s ease; }

.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(-3px);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.18);
}

.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{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover; /* fill the panel */
  object-position: center;
  border-radius: 18px;
}

/* Better cropping for left/right panels */
.side-banner--left img{ object-position: left center; }
.side-banner--right img{ object-position: right 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;
  }
  .layout{ position: relative; z-index: 1; }
  .page-center{ max-width: 1280px; }
}
