/* ===== Base ===== */
:root {
  --panel-bg: rgba(0, 0, 0, 0.72);
  --text: #f7f7f7;
  --muted: #d8d8d8;
  --hover: #f48fb1;
  --active: #80cbc4;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  --radius: 18px;
  --maxw: 1220px;
}

/* Hide scrollbars but allow scrolling */
html {
  scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0; /* WebKit */
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: #000; /* fallback behind slideshow */
  line-height: 1.6;
  -ms-overflow-style: none; /* IE/Edge */
}
* {
  box-sizing: border-box;
}

/* Skip link */
.skip-link {
  position: fixed;
  left: 12px;
  top: -50px;
  padding: 0.5rem 0.75rem;
  background: #111;
  color: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-decoration: none;
  z-index: 10001;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* Background slideshow behind everything */
#bg-slideshow {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
#bg-slideshow .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1200ms ease-in-out;
  filter: brightness(0.55);
}
#bg-slideshow .bg.active {
  opacity: 1;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999; /* never disappears */
  backdrop-filter: blur(6px);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.55);
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.navbar a:focus-visible,
.navbar button:focus-visible {
  outline: 2px solid var(--active);
  outline-offset: 3px;
}
.menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.menu a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
}
.menu a:hover {
  color: var(--hover);
}
.menu a.active {
  color: var(--active);
}

/* Hamburger */
.hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
}
.hamburger .bar {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: #fff;
  border-radius: 2px;
}

/* ===== Sections ===== */
main {
  display: block;
}
section {
  scroll-margin-top: 86px;
}
.panel {
  max-width: var(--maxw);
  margin: min(8vh, 80px) auto;
  padding: clamp(20px, 3vw, 36px);
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel h2 {
  margin-top: 0;
}
.panel--home {
  background: transparent;
  box-shadow: none;
  text-align: center;
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
}
.home-inner h2 {
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin: 0.25rem 0;
}
.home-inner h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.85);
  margin: 0.25rem 0;
}
.lede {
  max-width: 640px;
  margin: 0.75rem auto 1.5rem;
  color: var(--muted);
}
.hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Grid helpers ===== */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 3rem;
}
.about-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(120px, auto);
}
.about-grid .card,
.about-grid figure {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.about-grid img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
/* ABOUT — lock three equal cards, top-aligned, clipped to the section */
#about.panel {
  position: relative;
  overflow: hidden; /* prevents inner backgrounds poking outside rounded panel */
}
/* Add inner space at the bottom of the About section */
#about.panel {
  padding-bottom: 80px; /* adjust as needed (e.g. 2.5rem) */
}
/* 3 columns, 1 row; force equal card heights */
#about .about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch; /* makes all 3 columns the same height */
}

/* Make EVERY direct child a uniform card */
#about .about-grid > * {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* align content to the top */
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  height: 100%; /* stretch to the row height */
  overflow: hidden; /* keep inner pieces inside the card */
}

/* Photo column behaves like a card too */
#about .about-grid > figure {
  margin: 0;
}

/* Image fills its card neatly */
#about .about-grid > figure img {
  display: block;
  width: 100%;
  height: 100%; /* fills the same box size as text cards */
  object-fit: cover; /* crop without distortion */
  border-radius: 12px;
  flex: 1 1 auto;
}

/* Remove collapsing margins that can push cards outside the section edges */
#about .about-grid > * > :first-child {
  margin-top: 0;
}
#about .about-grid > * > :last-child {
  margin-bottom: 0;
}
.spacer {
  min-height: 40px;
}
#about-heading {
  text-align: center;
}
/* Galleries */
.gallery {
  grid-template-columns: repeat(4, 1fr);
}
.gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.03);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

/* Lists */
.exhibitions {
  columns: 1;
  margin: 0;
  padding-left: 1.2rem;
}
.class-times {
  margin: 0 0 1rem 1.2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover {
  color: var(--hover);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
/* CONTACT section links */
#contact a {
  color: red;
  text-decoration: none; /* optional: remove underline */
}

#contact a:hover {
  color: darkred; /* optional: darker shade on hover */
  text-decoration: underline; /* optional: show underline on hover */
}
/* Footer */
.site-footer {
  text-align: center;
  padding: 60px 16px;
  color: #ddd;
}

/* Lightbox */
.lightbox[hidden] {
  display: none;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.lightbox img {
  max-width: 94vw;
  max-height: 86vh;
  border-radius: 12px;
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover {
  color: var(--hover);
}

/* Video wrapper */
.video-wrapper {
  margin: 4rem auto;
  text-align: center;
  max-width: 900px;
  width: 100%;
}
.video-wrapper iframe {
  display: block;
  margin: 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .navbar {
    align-items: center;
  }
  .hamburger {
    display: block;
  }
  .menu {
    position: fixed;
    top: 56px;
    right: 12px;
    left: 12px;
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 14px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
