/* Gallery slider. Scoped so the shared site styles stay unchanged. */

.cinema {
  background: var(--plum);
  color: var(--ivory);
  padding: 1.25rem 0 1.5rem;
}

.cinema-head {
  margin-bottom: 0.85rem;
}

.cinema-head h2,
.cinema-head p {
  color: var(--ivory);
}

.cinema-head p {
  margin-bottom: 0;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 auto 0.85rem;
}

.gallery-filters[hidden] {
  display: none;
}

.gallery-chip {
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--ivory);
  font: 600 0.95rem/1.2 var(--font);
  cursor: pointer;
}

.gallery-chip[aria-pressed="true"] {
  background: var(--gold);
  color: var(--plum);
}

.gallery-frame {
  position: relative;
  width: min(var(--max), 100%);
  margin-inline: auto;
}

.gallery-main {
  height: clamp(16rem, 92vw, calc(100dvh - 18rem));
  min-height: 16rem;
  background: #2b1722;
  overflow: hidden;
}

.gallery-main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #2b1722;
}

.gallery-main picture {
  display: contents;
}

.gallery-main img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(1);
}

.gallery-main .swiper-slide-active img {
  animation: gallery-zoom 8s ease-out both;
}

@keyframes gallery-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.gal-nav,
.gal-pause {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--gold);
  background: rgba(62, 34, 48, 0.82);
  color: var(--ivory);
  font: 600 0.95rem/1.2 var(--font);
  cursor: pointer;
}

.gal-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 44px;
  padding: 0;
}

.gal-prev { left: 0.5rem; }
.gal-next { right: 0.5rem; }

.gal-nav span {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
}

.gallery-bar {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.55rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  pointer-events: none;
}

.gallery-bar .gal-pause {
  pointer-events: auto;
  padding: 0.4rem 0.85rem;
}

.gal-count {
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: rgba(62, 34, 48, 0.82);
  color: var(--ivory);
  font: 600 0.95rem/1.3 var(--label);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.gallery-thumbs {
  width: min(var(--max), calc(100% - 1rem));
  margin: 0.65rem auto 0;
  padding-bottom: 0.2rem;
}

.gallery-thumbs .swiper-slide {
  height: 4.6rem;
  border: 2px solid transparent;
  opacity: 0.7;
  box-sizing: border-box;
}

.gallery-thumbs .swiper-slide-thumb-active {
  border-color: var(--gold);
  opacity: 1;
}

.thumb-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #2b1722;
  cursor: pointer;
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.gallery-status {
  color: var(--ivory);
}

.gallery-fallback {
  list-style: none;
  margin: 1rem auto 0;
  padding: 0;
  width: min(var(--max), calc(100% - 2rem));
  display: grid;
  gap: 0.75rem;
}

.gallery-fallback img {
  width: 100%;
  height: auto;
}

.cinema :focus-visible {
  outline: 3px solid #e9d29a;
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .cinema { padding: 1.75rem 0 2rem; }
  .gallery-main { height: clamp(22rem, calc(100dvh - 16rem), 44rem); }
  .gallery-thumbs .swiper-slide { height: 5.4rem; }
  .gal-prev { left: 0.85rem; }
  .gal-next { right: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-main .swiper-slide-active img,
  .gallery-main img {
    animation: none;
    transform: none;
  }
}

#videos .video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#videos .video-play {
  aspect-ratio: auto;
  display: grid;
  gap: 0.35rem;
  background: transparent;
  text-align: center;
}

#videos .video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--plum);
  border: 1px solid #d9bc78;
}

#videos .video-thumb picture {
  position: absolute;
  inset: 0;
}

#videos .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#videos .video-label {
  color: var(--gold-ink);
  font: 600 0.95rem/1.3 var(--label);
  letter-spacing: 0.08em;
}

.video-box {
  width: min(26rem, calc(100% - 1rem));
  max-height: calc(100% - 1rem);
  border: 1px solid var(--gold);
  padding: 0.65rem;
  background: var(--plum);
  color: var(--ivory);
}

.video-box::backdrop {
  background: rgba(62, 34, 48, 0.78);
}

.video-box-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.55rem;
}

.video-box-bar p {
  margin: 0;
  color: var(--ivory);
}

.video-box-bar button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--gold);
  background: var(--ivory);
  color: var(--plum);
  cursor: pointer;
  font: 600 1rem/1 var(--label);
}

.video-box-frame {
  aspect-ratio: 9 / 16;
  background: #2b1722;
}

.video-box-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 720px) {
  #videos .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
