/* ──  exhibition page ──────────────────────────────────── */

html, body {
  overflow: hidden;
  height: 100%;
}

.corner-nav .nav-top-left {
  width: 50vw;
}

.nav-top-right, .nav-bottom-left {
  visibility: hidden;
}
/* ── Two-column layout ───────────────────────────────────────── */
.exhibition-layout {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

/* ── Left: Key image + gallery (vertical scroll) ─────────────── */
.exh-image-col {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f0f0f0;
}

.exh-key-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.exh-gallery-item {
  margin: 0;
  border-top: 1px solid #e8e8e8;
}

.exh-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.exh-gallery-item figcaption {
  font-size: 13px;
  padding: 0.4rem 0.75rem 0.75rem;
  color: #555;
  font-family: var(--font-serif);
}

/* ── Right: Content ──────────────────────────────────────────── */
.exh-content-col {
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem 6rem 0 6rem;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.2;
}

.exh-meta {
  margin-bottom: 2rem;
}

.exh-title {
  font-family: var(--font-serif);
  /* font-size: 25px; */
  /* text-decoration: 1px black underline; */
  font-weight: normal;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 1rem;
}

.exh-dates {
  margin-bottom: 0.25em; 
  text-align: center;
    margin-bottom: 5rem;
}

.exh-artists {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 0.5em;
  /* text-align: center; */
    margin-bottom: 1rem;


}

.exh-artists li {
  padding: 0;
  line-height: 1.4;
}

.exh-body {
  margin-bottom: 2rem;
}

.exh-body p {
  margin-bottom: 1em;
  line-height: 1.5;
}


/* ── Essays trigger (vertical label, between image and text) ─── */
/*
  Sits at the horizontal midpoint of the page (50% = dividing
  line between the two equal columns), vertically centred.
  Text reads upward via writing-mode + rotate.
*/
.essays-trigger {
  position: fixed;
  left: 52%;
  top: 50%;
  /* centre it on the column divider, rotate text so it reads bottom-to-top */
  transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  z-index: 250;
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 1em;
  cursor: pointer;
  color: var(--color-black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  white-space: nowrap;
  padding: 1rem 0.35rem;
}

.essays-trigger:hover {
  opacity: 0.6;
}

/* ── Essays panel (slides in from the RIGHT) ─────────────────── */
.essays-panel {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: 20vw;
  height: 100%;
  text-align: center;
  background: var(--color-accent); /* yellow-green, matching mockup */
  border-left: none;
  z-index: 300;
  padding: 1.5rem 2rem 4rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}

.essays-panel.is-open {
  transform: translateX(0);
}

.essays-panel-close {
  position: absolute;
  top: 1.5rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-serif);
}

.essays-panel-heading {
  font-family: var(--font-serif);
  /* font-size: 16px; */
  font-weight: normal;
  margin-bottom: 6rem;
}

.essays-panel-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.essays-panel-list li {
  padding: 0;
    /* text-align: center; */

}

.essays-panel-item {
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1em;
  padding: 0;
  color: var(--color-black);
}

.essays-panel-item:hover .ep-title {
  text-decoration: underline;
}

.ep-title {
  display: block;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  font-style: italic;
  line-height: 1.35;
}

.ep-author {
  display: block;
  line-height: 1.35;
}

/* ── Essay popup ─────────────────────────────────────────────── */
.essay-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(220, 220, 220,0.82);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 2rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.essay-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.essay-modal-inner {
  position: relative;
  background: var(--color-white);
  width: 100%;
  max-width: 780px;
  padding: 2rem 2rem 4rem;
}

.essay-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: var(--font-serif);
}

.essay-modal-content {
  font-family: var(--font-serif);
  font-size: 1em;
  line-height: 1.5;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media screen and (max-width: 44rem) {
  html, body { overflow: auto; }

  .exhibition-layout {
    position: static;
    display: block;
    height: auto;
  }

  .exh-image-col {
    height: 60vw;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    -webkit-overflow-scrolling: touch;
  }

  .exh-key-image {
    height: 100%;
    width: auto;
    flex-shrink: 0;
  }

  .exh-gallery-item {
    height: 100%;
    flex-shrink: 0;
    border-top: none;
    border-left: 1px solid #e8e8e8;
  }

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

  .exh-content-col {
    height: auto;
    overflow: visible;
    padding: 2rem 1.5rem 5rem;
  }

  .essays-panel {
    height: auto;
    overflow: visible;
    width: auto;
    padding: 1.5rem 1.5rem 2rem;
  }

  .essays-trigger {
    writing-mode: horizontal-tb;
    transform: none;
    left: auto;
    right: 1.5rem;
    top: auto;
    bottom: 1.5rem;
    padding: 0.5rem;
  }
}
