/* ===========================
   Temporary Exhibits Page
   =========================== */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #000;
}
.container-narrow {
  margin: 0 auto;
  padding: 1rem 5rem;
}

.exhibits-header { display: flex; align-items: center; }
.exhibits-title {
  padding: 2.25rem 0 1.25rem;
  font-size: 1.8rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0;
}
.red-dot {
  width: 1.6rem; height: 1.6rem;
  background: #C14E42; border-radius: 50%;
  display: inline-block; margin-left: .5rem;
}

.section-rule { border: none; border-top: 1px solid #cfcfcf; margin: 0 0 1.25rem; }

/* ===========================
   Grid
   =========================== */
.exhibit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;                /* equal heights */
}

/* ===========================
   Card
   =========================== */

/* Whole card is a link—remove default link decorations everywhere inside */
.exhibit-card,
.exhibit-card:link,
.exhibit-card:visited,
.exhibit-card * {
  text-decoration: none !important;    /* kill blue underlines */
  color: inherit;
}

.exhibit-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.exhibit-figure {
  flex: 1;                              /* occupy full cell height */
  display: flex;
  flex-direction: column;               /* image on top, caption below */
  justify-content: flex-start;          /* no extra space between image & caption */
  gap: 0;
  height: 100%;
  margin: 0;
  background: #eee;
  overflow: hidden;
}

/* Uniform image height for perfectly aligned rows */
.exhibit-figure img {
  width: 100%;
  height: 220px;                        /* uniform image height */
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  transition: transform .25s ease;
}

/* Caption bar (legend) sits flush under the image, standard height */
.exhibit-label {
  margin: 0;                            /* prevent browser figcaption margins */
  padding: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 90px;                     /* standard legend height */
  flex-shrink: 0;
}

/* Title, subtitle, year */
.exhibit-title {
  text-transform: uppercase;
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.2;
  margin: 0 0 4px 0;
}
.exhibit-sub {
  font-size: .85rem;
  line-height: 1.25;
  opacity: .95;
  margin: 0 0 auto 0;                   /* push year down */
}
.exhibit-year {
  font-weight: 800;
  font-size: .85rem;
  margin-top: auto;                     /* stick to bottom of legend */
}

/* Color variants */
.label--red  { background: #D05041; }
.label--teal { background: #0D9AA4; }
.label--blue { background: #0C4C6C; }

/* Interaction */
.exhibit-card:hover .exhibit-figure img { transform: scale(1.02); }
.exhibit-card:focus-visible {
  outline: 3px solid #0D9AA4;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
  .exhibit-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .container-narrow { padding: 0 1.25rem; }
  .exhibit-grid { grid-template-columns: 1fr; }
  .exhibit-figure img { height: 200px; }   /* slightly shorter on phones */
  .exhibit-label { min-height: 84px; }     /* keep proportions */
}

/* Make sure arrows are clickable and above the images */
.carousel { position: relative; overflow: hidden; }
.carousel-track {
  display: flex;                 /* simpler & reliable */
  transition: transform .35s ease;
  will-change: transform;
}
.slide {
  flex: 0 0 100%;                /* each slide = 100% width */
  margin: 0;
  background: #000;
  display: grid;
  place-items: center;
}
.slide img {
  width: 100%;
  height: 600px;                 /* adjust if you like */
  object-fit: cover;
  display: block;
}

/* Arrows above everything */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border: 2px solid #1b1b1b;
  background: #fff;
  color: #111;
  font: inherit; font-size: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 5;                    /* <-- important */
  pointer-events: auto;          /* <-- make sure clicks pass */
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.carousel-btn:disabled { opacity: .4; cursor: default; }

/* Dots (unchanged, keep your styles if you had them) */
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 6px; justify-content: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.25); cursor: pointer; }
.dot.is-active { background: #11A9B3; border-color: #0a6066; }

/* Responsive heights if desired */
@media (max-width: 900px){ .slide img { height: 420px; } }
@media (max-width: 600px){ .slide img { height: 320px; } }
