/* ======================================================================
   GLOBAL VARIABLES & RESET
====================================================================== */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #777777;
  --accent: #111111;
  --max-width: 1100px;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ======================================================================
   HERO (Titel weiß + klein = optisch versteckt)
====================================================================== */
.hero {
  margin: 4px 0 8px;
  padding: 0;
}

.hero h1 {
  font-size: 12px;
  line-height: 1.1;
  color: #ffffff;
  font-weight: 400;
  margin: 0;
}


/* ======================================================================
   MAIN LAYOUT
====================================================================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

@media (min-width: 900px) {
  main { padding-left: 16px; }
}


/* ======================================================================
   HEADER & NAVIGATION
====================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 1000;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 0;
  line-height: 0;
}
.site-logo {
  height: 100px;
}

/* NAVIGATION */
.nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.nav button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  position: relative;
  padding: 0;
}
.nav button:hover,
.nav button.is-active {
  color: var(--fg);
}

.nav button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav button:hover::after,
.nav button.is-active::after {
  width: 100%;
}


/* ======================================================================
   GENERIC ACCORDION
====================================================================== */
.section {
  margin-bottom: 48px;
}

.accordion__header {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  align-items: center;
  padding: 10px 0;
}

.section__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.section__toggle {
  font-size: 18px;
  color: var(--muted);
  transition: transform var(--transition);
}

.accordion__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}

.accordion--open .accordion__content {
  padding-top: 10px;
}

.accordion--open .section__toggle {
  transform: rotate(90deg);
}


/* ======================================================================
   WORKS — YEAR GROUPS + JUSTIFIED GRID
====================================================================== */
.works-years {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.works-year__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.works-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.works-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
  overflow: hidden; /* verhindert sichtbaren Überstand rechts */
}

.work {
  cursor: zoom-in;
}

.work figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  text-align: left;
}
.work__title {
  font-weight: 500;
}

/* Bilder in Works nie breiter als Container */
.works-row .work img {
  max-width: 100%;
}

/* MOBILE WORKS → 1 Bild pro Zeile */
@media (max-width: 600px) {
  .works-row {
    display: block;
  }
  .works-row .work:not(:last-child) {
    margin-bottom: 24px;
  }
}


/* ======================================================================
   EXHIBITIONS
====================================================================== */
.exhibitions-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.exhibitions-year__heading {
  font-size: 13px;
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.exhibition {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exhibition__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.exhibition__meta {
  font-size: 12px;
  color: var(--muted);
}

.exhibition__image img {
  width: 100%;
}


/* ======================================================================
   GALLERIES
====================================================================== */
.galleries-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* CURRENT GALLERIES – zweispaltig & präsenter */
.galleries-section--current {
  padding: 12px 0 28px;
  border-bottom: 1px solid #ddd;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  align-items: start;
}

@media (max-width: 700px) {
  .galleries-section--current {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.galleries-section--current .gallery-block {
  padding: 4px 0;
}

.galleries-section--current .gallery__title {
  font-size: 15px;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}

.galleries-section--current .gallery__title a {
  text-decoration: none;
}

.galleries-section--current .gallery__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.galleries-section--current .gallery-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* FORMER GALLERIES – dezenter, einspaltig */
.galleries-section--former {
  margin-top: 12px;
}

.galleries-section--former > .gallery__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 8px;
}

.galleries-section--former .gallery-block {
  padding: 2px 0;
}

.galleries-section--former .gallery__title {
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.galleries-section--former .gallery-meta {
  font-size: 11px;
  color: var(--muted);
}

/* Base gallery styles */
.gallery-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gallery__title {
  margin: 0;
}

.gallery-meta {
  margin: 0;
}


/* ======================================================================
   LIGHTBOX
====================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.lightbox.is-visible {
  display: flex;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.lightbox__inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lightbox__image-wrap {
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__image-wrap img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 16px;
  font-size: 13px;
  max-width: 90vw;
  color: var(--muted);
}

.lightbox__close {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2; /* liegt über den Nav-Flächen */
}

/* Pfeile / Klickflächen – gleiche Höhe wie Bildbereich, X bleibt frei */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 75vh;              /* gleiche Höhe wie Bild-Max-Höhe */
  max-height: 75vh;
  width: 20vw;
  max-width: 160px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.0;              /* unsichtbar, aber klickbar */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;                /* unter dem Close-Button */
  font-size: 0;              /* Pfeilgrafik unsichtbar */
}

.lightbox__nav--prev {
  left: 0;
}

.lightbox__nav--next {
  right: 0;
}

/* Auf Smartphones: komplett deaktivieren */
@media (max-width: 700px) {
  .lightbox__nav {
    display: none;
  }
}


/* ======================================================================
   INFO / IMPRESSUM OVERLAYS
====================================================================== */
.info-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  opacity: 0;
  pointer-events: none;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s ease;
  z-index: 4000;
}

.info-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.info-overlay__inner {
  width: 100%;
  height: 100%;
  max-width: var(--max-width);
  padding: 20px 16px;
  overflow-y: auto;
  position: relative;
}

.info-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 16px;
}

/* Layout: Foto + Text */
.info-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-photo {
  margin: 0;
  width: 100%;
}

.info-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-section {
  font-size: 14px;
  line-height: 1.5;
}

/* Nur im Info-Overlay: Section-Überschriften ausblenden */
#infoOverlay .info-section h3 {
  display: none;
}

/* Desktop: Foto links, Text rechts nebendran */
@media (min-width: 800px) {
  .info-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .info-photo {
    flex: 0 0 40%;
    max-width: 380px;
  }

  .info-content {
    flex: 1;
  }
}

.info-overlay__close {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.info-footer {
  padding-top: 24px;
  font-size: 12px;
  color: var(--muted);
}


/* ======================================================================
   FOOTER
====================================================================== */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 24px;
  font-size: 11px;
  color: var(--muted);
}