/* =========================================================
   EXHIBITIONS
   Landing page + Solo/Group timeline pages
   ========================================================= */

/* =========================================================
   EXHIBITIONS LANDING — DESKTOP
   ========================================================= */

@media (min-width: 801px) {
  /*
   * Cijela landing stranica stane u jedan viewport.
   * Header, glavni sadržaj i footer imaju vlastite redove.
   */
  body:has(.exhibition-choices) {
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: grid;
    grid-template-rows:
      96px
      minmax(0, 1fr)
      auto;
    overflow: hidden;
  }

  body:has(.exhibition-choices) .site-header {
    height: 96px;
  }

  body:has(.exhibition-choices) main {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
  }

  /* ---------------------------------------------------------
     Solo / Group cards
     --------------------------------------------------------- */

  .exhibition-choices {
    width: calc(100% - 10vw);
    height: clamp(280px, 36vh, 340px);
    margin: 0 5vw;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 0;
  }

  .choice {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: clamp(26px, 2.4vw, 38px);
    display: flex;
    flex-direction: column;
    color: var(--fg);
    border: 0;
    border-right: 1px solid var(--line);
    transition:
      color 0.35s ease,
      background-color 0.35s ease;
  }

  .choice:last-child {
    border-right: 0;
  }

  .choice:hover {
    color: var(--bg);
    background-color: var(--fg);
  }

  .choice > span {
    display: block;
    margin: 0;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .choice h2 {
    margin: auto 0;
    font-family: var(--serif);
    font-size: clamp(38px, 3.6vw, 54px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }

  .choice p {
    margin: 0;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  /* ---------------------------------------------------------
     Exhibitions landing footer
     --------------------------------------------------------- */

  body:has(.exhibition-choices) .site-footer {
    width: auto;
    margin: 0 5vw;
    padding: 0;
    border-top: 1px solid var(--line);
  }

  body:has(.exhibition-choices) .footer-content {
    position: relative;
    width: 100%;
    min-height: 112px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0;
  }

  body:has(.exhibition-choices) .footer-item {
    display: flex;
    align-items: baseline;
    gap: clamp(22px, 2vw, 34px);
  }

  body:has(.exhibition-choices) .footer-item:first-child {
    justify-self: end;
    padding-right: clamp(40px, 5vw, 80px);
  }

  body:has(.exhibition-choices) .footer-item:last-child {
    justify-self: start;
    padding-left: clamp(40px, 5vw, 80px);
  }

  body:has(.exhibition-choices) .footer-divider {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 36px;
    display: block;
    transform: translate(-50%, -50%);
    background-color: rgba(242, 240, 235, 0.14);
  }

  body:has(.exhibition-choices) .footer-label {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body:has(.exhibition-choices) .footer-links {
    display: flex;
    align-items: baseline;
    gap: clamp(20px, 2vw, 30px);
  }

  body:has(.exhibition-choices) .footer-links a,
  body:has(.exhibition-choices) .footer-email {
    font-family: var(--serif);
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
  }

  body:has(.exhibition-choices) .footer-links a,
  body:has(.exhibition-choices) .footer-email {
    transition: opacity 0.25s ease;
  }

  body:has(.exhibition-choices) .footer-links a:hover,
  body:has(.exhibition-choices) .footer-email:hover {
    opacity: 0.6;
  }
}

/* =========================================================
   SOLO / GROUP EXHIBITIONS TIMELINE
   ========================================================= */

.exhibitions-page {
  overflow-x: hidden;
}

body:has(.timeline) main {
  min-width: 0;
  min-height: 0;
}

/* PAGE HEADING */

body:has(.timeline) .page-hero {
  min-height: 0;
  padding: clamp(45px, 5vw, 75px) clamp(24px, 5vw, 96px) clamp(45px, 5vw, 70px);
  display: block;
}

body:has(.timeline) .page-hero .eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body:has(.timeline) .page-hero h1 {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--fg);
  font-family: var(--serif);
  font-size: clamp(44px, 4.2vw, 62px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

/* TIMELINE */

.timeline {
  width: auto;
  margin: 0 clamp(24px, 5vw, 96px) clamp(30px, 3vw, 45px);
  padding: 0;
  border-top: 1px solid var(--line);
}

.year {
  width: 100%;
  padding: clamp(24px, 2.5vw, 36px) 0;
  display: grid;
  grid-template-columns: clamp(80px, 8vw, 130px) minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(25px, 4vw, 70px);
  border-bottom: 1px solid var(--line);
}

.year:last-child {
  border-bottom: 0;
}

.year h2 {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.15em;
}

.year ul {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.year li {
  width: 100%;
  margin: 0;
  padding: 0 0 12px;
  color: #bbb8b2;
  font-family: var(--serif);
  font-size: clamp(17px, 1.25vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  border: 0;
}

.year li:last-child {
  padding-bottom: 0;
}

.year li em {
  color: var(--fg);
  font-style: italic;
}

/* =========================================================
   EXHIBITIONS — MOBILE
   ========================================================= */

.exhibitions-mobile-intro {
  display: none;
}

@media (max-width: 800px) {
  /*
   * Na mobitelu stranica smije scrollati.
   * Kartice idu jedna ispod druge.
   */
  body:has(.exhibition-choices) {
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: grid;
    grid-template-rows: 80px minmax(0, 1fr);
    overflow: hidden;
  }

  body:has(.exhibition-choices) main {
    min-height: 0;
    display: block;
    padding: clamp(32px, 5vh, 44px) 0 24px;
  }

  .exhibitions-mobile-intro {
    margin: 0 24px 22px;
    padding: 0;
    display: block;
  }

  .exhibitions-mobile-intro .eyebrow {
    margin: 0 0 12px;
    font-size: 8px;
  }

  .exhibitions-mobile-intro h1 {
    margin: 0 0 16px;
    font-family: var(--serif);
    font-size: 46px;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }

  .exhibitions-mobile-intro .lead {
    max-width: 290px;
    margin: 0;
    color: var(--muted);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.4;
  }

  /* ---------------------------------------------------------
     Mobile cards
     --------------------------------------------------------- */

  .exhibition-choices {
    width: calc(100% - 48px);
    height: auto;
    max-height: none;
    margin: 0 24px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto);
    border: 0;
  }

  .choice {
    width: 100%;
    min-height: 0;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    color: var(--fg);
    border: 0;
  }

  .choice + .choice {
    border-top: 1px solid var(--line);
  }

  .choice > span {
    margin: 0;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .choice h2 {
    margin: 24px 0 22px;
    font-family: var(--serif);
    font-size: clamp(30px, 8.5vw, 36px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
  }

  .choice p {
    margin: 0;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  /* ---------------------------------------------------------
     Mobile exhibitions footer
     --------------------------------------------------------- */

  body:has(.exhibition-choices) .site-footer {
    margin: 0 24px;
    padding: 36px 0;
    border-top: 1px solid var(--line);
  }

  body:has(.exhibition-choices) .footer-content {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  body:has(.exhibition-choices) .footer-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px 22px;
  }

  body:has(.exhibition-choices) .footer-divider {
    display: none;
  }

  body:has(.exhibition-choices) .footer-label {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  body:has(.exhibition-choices) .footer-links {
    display: flex;
    align-items: baseline;
    gap: 22px;
  }

  body:has(.exhibition-choices) .footer-links a,
  body:has(.exhibition-choices) .footer-email {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.2;
  }

  /* ---------------------------------------------------------
     Mobile timeline
     --------------------------------------------------------- */

  body:has(.timeline) .page-hero {
    padding: clamp(32px, 5vh, 44px) 24px 48px;
  }

  body:has(.timeline) .page-hero .eyebrow {
    margin-bottom: 12px;
    font-size: 8px;
  }

  body:has(.timeline) .page-hero h1 {
    max-width: 100%;
    margin: 0;
    font-size: clamp(40px, 11.5vw, 46px);
    line-height: 0.95;
  }

  .timeline {
    margin: 0 24px 35px;
  }

  body:has(.timeline) .site-footer {
    margin-top: 0;
  }

  .year {
    padding: 24px 0;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .year h2 {
    padding: 0;
    font-size: 9px;
  }

  .year li {
    padding-bottom: 12px;
    font-size: 18px;
    line-height: 1.55;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .choice,
  .choice *,
  body:has(.exhibition-choices) .footer-links a,
  body:has(.exhibition-choices) .footer-email {
    transition: none;
  }
}
