/* WordPress-specific adjustments on top of main.css. */

/* Menus are output as lists. */
header nav ul,
.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
header nav ul {
  display: flex;
  gap: 27px;
}
header nav .current-menu-item > a,
header nav .current-menu-ancestor > a,
header nav .current-page-ancestor > a,
header nav .current_page_parent > a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-links li {
  margin: 0;
}

/* Sticky header below the WordPress admin bar when logged in. */
.admin-bar header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar header {
    top: 46px;
  }
}

/* Gallery before the script has arranged it into rows (or without JavaScript). */
.justified-gallery:not(.is-justified) {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px;
}
.justified-gallery:not(.is-justified) .jg-item {
  flex-basis: calc(var(--ratio) * 220px);
}
a.justified-gallery {
  display: flex;
}

/* Text pages (legal notices, contact) and the biography body. */
.page-content {
  max-width: 760px;
  min-height: 40svh;
  padding: 60px 3vw 140px;
  font: 16px/1.7 var(--font);
}
.page-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bio > div > p a {
  border-bottom: 1px solid currentColor;
}
.bio figure img {
  filter: grayscale(1) contrast(1.12);
}

/* Image credits (media library "Caption"): small grey line under an image. */
.image-credit {
  display: block;
  color: var(--mute);
  font-size: 11px;
  line-height: 1.4;
}
.exhibition-detail-hero figure {
  flex-direction: column;
  gap: 10px;
}
.exhibition-detail-hero .image-credit {
  align-self: stretch;
  text-align: center;
}
/* Poster and exhibition images share the hero: slides are stacked in one cell so the
   area keeps the height of the tallest image and does not jump when switching. */
.exhibition-slider .slides {
  display: grid;
  width: 100%;
}
.exhibition-slider .slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s, visibility 0.35s;
}
.exhibition-slider .slide.active {
  visibility: visible;
  opacity: 1;
}
.slider-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.slider-nav button {
  padding: 4px 8px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 18px/1 var(--font);
  cursor: pointer;
}
.slider-nav button:hover {
  opacity: 0.55;
}
.slider-count {
  min-width: 44px;
  color: var(--mute);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
/* Exhibition list: "Solo / show", "Group / show" in place of the number. */
.exhibition-list a {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}
.exhibition-type {
  display: flex;
  flex-direction: column;
  color: var(--mute);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Slider arrows on the left and right of the image. */
.exhibition-slider[data-slider] {
  position: relative;
  padding-left: 76px;
  padding-right: 76px;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.2s;
}
.slider-arrow:hover {
  opacity: 0.6;
}
.slider-prev {
  left: 16px;
}
.slider-next {
  right: 16px;
}
.slider-arrow img {
  width: 100%;
  height: auto;
  filter: none;
}
.arrows-a .slider-arrow img {
  width: 30px;
}
.arrows-b .slider-arrow img {
  width: 34px;
}

/* List preview: keep a line under the image for its credit, shown with the active image. */
.exhibition-preview img {
  bottom: 26px;
  height: calc(100% - 26px);
}
.exhibition-preview-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.35s;
}
.exhibition-preview-credit.active {
  opacity: 1;
}
.exhibition-thumb-credit {
  display: none;
}

/* Archive: key figures on the left ("500 reportages"), numbers large and right-aligned so
   the labels line up, sized to leave room for the MPP text on the right. */
.key-figures {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.9em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.key-figures li {
  display: contents;
}
.key-number {
  font: 400 clamp(28px, 2.5vw, 42px) / 1.05 var(--font);
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.key-label {
  font: 400 clamp(17px, 1.6vw, 26px) / 1.2 var(--font);
  letter-spacing: -0.01em;
}
.key-label-only {
  grid-column: 1 / -1;
}
/* Both columns centred on each other, so the figures and the MPP text balance. */
.archive-intro {
  align-items: center;
  padding-top: 44px;
  padding-bottom: 44px;
}
.archive-mpp {
  align-self: center;
}
.archive-mpp p {
  font-size: 15px;
}

/* Empty states while content is being entered. */
.fgc-empty {
  padding: 60px 3vw 120px;
  color: var(--mute);
}

@media (max-width: 760px) {
  .exhibition-list a {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .exhibition-slider[data-slider] {
    padding-left: 44px;
    padding-right: 44px;
  }
  .slider-arrow {
    width: 32px;
    height: 32px;
  }
  .slider-prev {
    left: 6px;
  }
  .slider-next {
    right: 6px;
  }
  .arrows-a .slider-arrow img {
    width: 22px;
  }
  .arrows-b .slider-arrow img {
    width: 24px;
  }
  .archive-intro {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .exhibition-thumb-credit {
    display: block;
    grid-column: 2;
  }
  .exhibition-detail-hero figure {
    height: auto;
    padding: 25px 20px;
  }
  .exhibition-detail-hero figure img {
    max-height: 65svh;
  }
  header nav ul {
    gap: 12px;
  }
  .page-content {
    padding: 45px 20px 90px;
  }
}
