/* Public exhibition page. Loaded only by exhibition-page.php. */

.exhibition-page {
  padding: 1.5rem 0 3rem;
  color: #333;
}

.exhibition__back {
  margin: 0.5rem 0 0;
}

.exhibition__back a {
  color: #2c2c86;
  font-weight: 700;
  text-decoration: none;
}

.exhibition__back a:hover {
  color: #007bff;
}

.exhibition__title {
  margin: 0.45rem 0 0.55rem;
  color: #2c2c2c;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
}

.exhibition__dates {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

.exhibition__status {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(114, 113, 135, 0.16);
  color: #55556a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.exhibition__description {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.exhibition__description p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

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

.exhibition-page a:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.exhibition-video {
  width: 100%;
  max-width: 1200px;
  margin: 1.5rem auto 0;
}

.exhibition-video__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #1c1c2e;
}

.exhibition-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.exhibition-video__play:hover {
  color: #fff;
}

.exhibition-video__play[hidden] {
  display: none;
}

.exhibition-video__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #2c2c86;
}

.exhibition-video__icon::before {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}

.exhibition-video__label {
  max-width: 18rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.exhibition-video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.exhibition-gallery {
  margin-top: 2.25rem;
}

.exhibition-gallery__title {
  margin: 0 0 1rem;
  color: #2c2c86;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.exhibition-gallery__empty {
  margin: 0;
  padding: 1rem 1.15rem;
  background: #fff;
  border-radius: 12px;
  color: #555;
}

.exhibition-gallery__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exhibition-item__figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.exhibition-item__link {
  display: block;
  background: #f3f3f5;
  cursor: zoom-in;
}

.exhibition-item__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f3f3f5;
}

.exhibition-item__caption {
  padding: 0.9rem 1rem 1.05rem;
}

.exhibition-item__title {
  margin: 0 0 0.35rem;
  color: #2c2c86;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.exhibition-item__description {
  margin: 0 0 0.55rem;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.55;
}

.exhibition-item__description:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .exhibition-gallery__list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .exhibition__title {
    font-size: 1.45rem;
  }

  .exhibition-gallery__title {
    font-size: 1.15rem;
  }
}

/* Fullscreen exhibit viewer. The node is created by exhibition-viewer.js. */

.ex-viewer {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 20, 0.96);
  color: #fff;
}

.ex-viewer[hidden] {
  display: none;
}

.ex-viewer__progress {
  flex: 1 1 5rem;
  align-self: center;
  min-width: 4.5rem;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  pointer-events: none;
}

.ex-viewer__progress[hidden] {
  display: none;
}

.ex-viewer__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #7a7ae0;
  transform: scaleX(0);
  transform-origin: left center;
}

body.ex-viewer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.ex-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.75rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  padding: 0.65rem 0.75rem;
}

.ex-viewer__count {
  flex: 0 0 auto;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.ex-viewer__tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
  gap: 0.4rem;
}

.ex-viewer__play {
  white-space: nowrap;
}

.ex-viewer__tools button,
.ex-viewer__nav {
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ex-viewer__tools button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.7rem;
}

.ex-viewer__tools button:hover,
.ex-viewer__nav:hover {
  background: #2c2c86;
}

.ex-viewer__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.ex-viewer__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.ex-viewer__stage.is-dragging {
  cursor: grabbing;
}

.ex-viewer__image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.ex-viewer__stage.is-animate .ex-viewer__image {
  transition: opacity 400ms linear;
}

.ex-viewer__image.is-fading {
  opacity: 0;
}

.ex-viewer__image--incoming {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.ex-viewer__image--incoming.is-visible {
  opacity: 1;
}

.ex-viewer__image.is-loading {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ex-viewer__stage.is-animate .ex-viewer__image {
    transition: none;
  }
}

.ex-viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  font-size: 1.6rem;
  line-height: 1;
}

.ex-viewer__nav--prev {
  left: 0.5rem;
}

.ex-viewer__nav--next {
  right: 0.5rem;
}

.ex-viewer__meta {
  flex: 0 1 auto;
  max-height: 30vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.75rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.ex-viewer__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.ex-viewer__title:empty {
  display: none;
}

.ex-viewer__text p {
  margin: 0 0 0.45rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  line-height: 1.5;
}

.ex-viewer__text p:last-child {
  margin-bottom: 0;
}

.ex-viewer__status {
  margin: 0.35rem 0 0;
  color: #f3d0d0;
}

.ex-viewer button:focus-visible,
.ex-viewer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
