/* ==========================================================================
   Exhibitions Pages
   Reuses patterns from art.css — same variables, nav, footer, lightbox
   ========================================================================== */

/* Variables — warm white, same earthy palette as art page */
.art-page {
  --bg-primary: #faf8f5;
  --bg-surface: #faf8f5;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-muted: #666666;
  --accent: #000000;
  --border: #e0e0e0;
}

.art-page {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Roboto Slab', 'Inter', -apple-system, BlinkMacSystemFont, serif;
}

/* Tree ring background canvas — fixed behind all content */
#tree-rings {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Navigation — same as art page */
.art-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.art-nav .logo {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* Home / Gallery left group */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-sep {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

.art-nav-links a.active {
  color: var(--text-primary);
}

.art-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.art-nav-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.art-nav-links a:hover {
  color: var(--text-primary);
}

/* Mobile menu toggle */
.art-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  width: 28px;
  height: 20px;
  position: relative;
}

.art-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.art-nav-toggle span:nth-child(1) { top: 0; }
.art-nav-toggle span:nth-child(2) { top: 9px; }
.art-nav-toggle span:nth-child(3) { top: 18px; }

.art-nav-toggle.open span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}

.art-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.art-nav-toggle.open span:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
}

/* Footer — same as art page */
.art-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.art-footer-nav {
  display: flex;
  gap: 2rem;
}

.art-footer-nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.art-footer-nav a:hover {
  color: var(--text-primary);
}

.art-footer-contact {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.art-footer-contact a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.art-footer-contact a:hover {
  color: var(--text-primary);
}

.art-footer-location {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Landing Page
   ========================================================================== */

/* Title */
.exhibitions-title {
  padding: 8rem 2rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.exhibitions-title h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: capitalize;
  color: var(--text-primary);
  text-align: center;
}

/* Story — text woven with photos */
.exhibitions-story {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

/* Story grid — diagonal text/image composition */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.story-grid__img {
  overflow: hidden;
  border-radius: 4px;
}

.story-grid__img img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.story-grid__img img:hover {
  transform: scale(1.04);
}

.story-grid__text {
  align-self: center;
  padding: 0.5rem 0.5rem;
}

.story-grid__text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* Full-width image strips */
.story-grid__strip {
  grid-column: 1 / -1;
  display: flex;
  gap: 1.5rem;
}

.story-img-wrap {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
}

.story-img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.story-img-wrap img:hover {
  transform: scale(1.04);
}

/* Exhibit list */
.exhibitions-list-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 1;
}

.exhibitions-list {
  border-top: 1px solid var(--border);
}

/* Clickable exhibit rows (with thumbnail) */
a.exhibit-row {
  display: grid;
  grid-template-columns: 7rem 4rem 1fr auto auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, padding-left 0.2s;
  border-radius: 3px;
}

a.exhibit-row:hover {
  background: #f0f0f0;
  padding-left: 1.5rem;
}

/* Upcoming row (no thumbnail, not clickable) */
.exhibit-row--upcoming {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.exhibit-row-thumb {
  width: 7rem;
  height: 4.75rem;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

a.exhibit-row:hover .exhibit-row-thumb {
  opacity: 1;
}

.exhibit-row-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exhibit-row-title {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-primary);
}

.exhibit-row-location {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exhibit-row-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

a.exhibit-row:hover .exhibit-row-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* Upcoming exhibit label */
.exhibit-row--upcoming .exhibit-row-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.exhibit-row-soon {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.exhibit-row-dates {
  grid-column: 2;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Individual Exhibit Pages
   ========================================================================== */

/* Back link */
.exhibit-back {
  display: inline-block;
  padding: 6rem 2rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  z-index: 1;
}

.exhibit-back:hover {
  color: var(--text-primary);
}

/* Hero area */
.exhibit-header {
  padding: 1rem 2rem 2rem;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.exhibit-header h1 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.exhibit-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exhibit-meta span + span::before {
  content: " \2014 ";
}

/* Story text */
.exhibit-story {
  max-width: 650px;
  padding: 2rem 2rem 3rem;
  position: relative;
  z-index: 1;
}

.exhibit-story p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.exhibit-story p + p {
  margin-top: 0.75rem;
}

/* Two-column story layout */
.exhibit-story--columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1000px;
}

.exhibit-story--columns p + p {
  margin-top: 0;
}

.exhibit-story-closing {
  grid-column: 1 / -1;
  max-width: 600px;
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--text-muted);
}

.exhibit-story a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.exhibit-story a:hover {
  opacity: 0.7;
}

/* Exhibit sections — distinct content blocks */
.exhibit-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.exhibit-section--alt {
  background: transparent;
}

.exhibit-section-header {
  max-width: 650px;
  padding: 0 2rem 2rem;
}

.exhibit-section-title {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 1rem;
}

.exhibit-section-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.exhibit-section-desc a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.exhibit-section-desc a:hover {
  opacity: 0.7;
}

/* Photo gallery — horizontal scroll row */
.exhibit-gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 2rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.exhibit-gallery::-webkit-scrollbar {
  height: 4px;
}

.exhibit-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.exhibit-gallery::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.exhibit-gallery img,
.exhibit-gallery video {
  height: 280px;
  width: auto;
  flex-shrink: 0;
  display: block;
  border-radius: 2px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.exhibit-gallery img:hover {
  opacity: 0.85;
}

/* Prev / Next exhibit navigation */
.exhibit-next {
  border-top: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

a.exhibit-next-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity 0.2s;
  border-bottom: 1px solid var(--border);
}

a.exhibit-next-link:hover {
  opacity: 0.6;
}

.exhibit-next-link img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.exhibit-next-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.exhibit-next-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.exhibit-next-title {
  font-size: 1rem;
  font-weight: 400;
}

.exhibit-next-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.exhibit-next-arrow {
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

a.exhibit-next-back {
  display: block;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

a.exhibit-next-back:hover {
  color: var(--text-primary);
}

/* Photo credit */
.exhibit-credit {
  padding: 1rem 2rem 3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Lightbox — same as art page */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  text-align: center;
  color: #fff;
}

.lightbox-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 1rem;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: -4rem;
}

.lightbox-next {
  right: -4rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .art-nav {
    padding: 1rem;
  }

  .art-nav-toggle {
    display: block;
  }

  .art-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .art-nav-links.open {
    display: flex;
  }

  .art-nav-links a {
    font-size: 1rem;
    padding: 0.25rem 0;
  }

  .exhibitions-title {
    padding: 6rem 1.5rem 1.5rem;
  }

  .exhibitions-story {
    padding: 1rem 1.5rem 3rem;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-grid__img img {
    height: 200px;
  }

  .story-img-wrap img {
    height: 150px;
  }

  .exhibitions-list-section {
    padding: 0 1.5rem 3rem;
  }

  a.exhibit-row {
    grid-template-columns: 5rem 3.5rem 1fr auto;
  }

  .exhibit-row-thumb {
    width: 5rem;
    height: 3.5rem;
  }

  .exhibit-row-location { display: none; }
  .exhibit-row-arrow { opacity: 1; }

  .exhibit-back {
    padding-top: 4.5rem;
  }

  .exhibit-header,
  .exhibit-story,
  .exhibit-credit {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .exhibit-story--columns {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .exhibit-gallery {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .exhibit-gallery img,
  .exhibit-gallery video {
    height: 200px;
  }

  .art-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .lightbox-nav {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .lightbox-prev {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }
}
