/* ================= BASE ================= */

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================= HERO ================= */

.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 0;
}

.slide1 {
  background-image: url('../assets/images/hero1.jpg');
  background-size: 130% auto;     /* 👈 zoomed in 30% to allow further rightward shift */
  background-position: 15% 25%;   /* 👈 shifted upwards by 10% (was 15%) */
}
.slide2 {
  background-image: url('../assets/images/hero2.jpg');
  background-position: center 36%;
}
.slide3 { background-image: url('../assets/images/hero3.jpg'); }
.slide4 { background-image: url('../assets/images/hero4.jpg'); }
.slide5 { background-image: url('../assets/images/hero5.jpg'); }
.slide6 {
  background-image: url('../assets/images/hero6.jpg');
  background-position: center 25%;   /* 👈 nudged 10% back up (was 15%) */
}
.slide-calendar {
  background-image: url('../assets/images/Calendar.png');
  background-position: center 15%;   /* 👈 shifted a little further down (was 25%) */
}
.slide-events {
  background-image: url('../assets/images/events.jpg');
  background-position: center 35%;
}

.static-hero .hero-slide {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(238, 228, 210, 0.92) 0%,
    rgba(238, 228, 210, 0.85) 25%,
    rgba(238, 228, 210, 0.5) 55%,
    rgba(238, 228, 210, 0.2) 80%,
    rgba(238, 228, 210, 0) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
  color: white;
  padding-left: 60px;
}

.hero-content h1 {
  font-size: 2.3em;   /* 👈 +15% over default 2em h1 */
  color: #5a0f1c;
  -webkit-text-stroke: 0.3px rgba(112, 66, 20, 0.6);   /* 👈 sepia halo (was beige) */
  text-stroke: 0.3px rgba(112, 66, 20, 0.6);
  text-shadow:
    -0.3px -0.3px 0 rgba(112, 66, 20, 0.6),
     0.3px -0.3px 0 rgba(112, 66, 20, 0.6),
    -0.3px  0.3px 0 rgba(112, 66, 20, 0.6),
     0.3px  0.3px 0 rgba(112, 66, 20, 0.6);
}

.hero-content p {
  font-size: 0.9em;   /* 👈 -10% from default 1em (was 0.8em / -20%) */
  margin-top: 0;      /* 👈 nudged upward, closer to the h1 */
  color: #000;
}

/* ================= HEADER ================= */

.top-header {
  width: 100%;
  background: #464343;   /* 👈 original cool grey */
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 2px 30px;   /* 👈 thinner band (was 8px) */
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  line-height: 0;
}

.logo img {
  height: 72px;   /* 👈 increased ~20% (was 60px) */
  width: auto;
  display: block;
}

.member-btn {
  padding: 6px 13px;   /* 👈 reduced ~20% from 8px 16px */
  border: 1px solid #5a0f1c;
  background: transparent;
  color: #5a0f1c;
  cursor: pointer;
  font-size: 11px;     /* 👈 reduced ~20% from 14px */
  transition: 0.3s;
}

.member-btn:hover {
  background: #5a0f1c;
  color: #fff;
}

/* ================= MAIN NAV ================= */

.main-navbar {
  background: #5a0f1c;
  padding: 14px 0;   /* 👈 thinner strip — reduced ~20% from 18px */
}

.main-navbar ul {
  display: flex;
  justify-content: center;
  gap: 40px;         /* 👈 reduced ~20% from 50px */
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navbar a {
  color: #f4f1ec;
  font-family: 'Playfair Display', serif;   /* 👈 match hero h1 typeface */
  font-size: 12px;   /* 👈 reduced ~20% from 15px */
  letter-spacing: 0.5px;
  text-transform: uppercase;   /* 👈 HOME … CALENDER */
}

.main-navbar a:hover {
  opacity: 0.7;
}

.nav-member-btn {
  border: 1px solid #fff;
  color: #fff;
}

.nav-member-btn:hover {
  background: #fff;
  color: #5a0f1c;
}

/* ================= FEATURES ================= */

.features {
  display: flex;
  gap: 20px;
  padding: 40px 60px;
}

.feature-card {
  position: relative;
  flex: 1;
  height: 220px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;   /* 👈 center "Learn"/"Explore"/"Support" horizontally */
  padding: 20px;
  color: white;
  transition: 0.3s;
  border: 1px solid rgba(232, 220, 196, 0.5);   /* 👈 very thin soft-beige outline (matches hero) */
}

.feature-card:nth-child(1) { background-image: url('/assets/images/feature1.jpg'); }
.feature-card:nth-child(2) { background-image: url('/assets/images/feature2.jpg'); }
.feature-card:nth-child(3) { background-image: url('/assets/images/feature3.jpg'); }

.feature-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.feature-card h3 {
  position: relative;       /* sit above the dark overlay */
  z-index: 1;
  color: #ffffff;            /* 👈 strong pure white */
  font-weight: 700;
  font-size: 1.4rem;        /* 👈 ~20% larger than default h3 (matches site-wide card standard) */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);  /* subtle lift so it pops on any photo */
  margin: 0;
}

.feature-card:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ================= CONTENT ================= */

.content-section {
  padding: 45px 0;
}

.content-section.alt {
  background: #f7f7f7;
}

.coming-soon-section {
  padding: 30px 0 80px;   /* 👈 small breather above, normal page space below */
}

.coming-soon-notice {
  text-align: center;
  font-style: italic;
  font-size: 18px;
  color: #5a0f1c;
  letter-spacing: 0.3px;
  margin: 0;
}

.container {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
}

.container.narrow {
  max-width: 750px;
}

.trustee-entry {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #ddd;
}

.trustee-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.trustee-entry h4 {
  margin-bottom: 0.35rem;
}

.trustee-role {
  font-weight: 500;
  color: #5a5348;
  margin: 0 0 1rem;
}

/* ================= SUBNAV ================= */

.subnav {
  display: flex;
  gap: 40px;
  padding: 25px 0;
  border-bottom: 1px solid #d6d0c7;
}

.subnav a {
  font-weight: 500;
  color: #2c2c2c;
}

.subnav a:hover {
  color: #8b2d2d;
}

/* ================= CARDS ================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
}

/* ================= EXHIBITIONS ================= */

.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(420px, 1fr));
  gap: 40px;

  max-width: 1100px;
  margin: 12px auto 0;
  justify-content: center;

  padding: 0 20px;
}

.cards-section.exhibition-cards .exhibition-grid {
  grid-template-columns: repeat(2, minmax(420px, 1fr));
}

.wide-card {
  position: relative;
  height: 360px;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.wide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.wide-card h3 {
  position: absolute;
  bottom: 25px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.4rem;
  color: #fff;
}

.wide-card:hover img {
  transform: scale(1.08);
}

/* ================= FOOTER ================= */

.site-footer {
  background: #f3efe9;
  padding-top: 40px;
}

/* GRID */
.footer-main {
  display: grid;
  grid-template-columns: 
    220px   /* 👈 bigger logo space */
    1fr 
    1fr 
    1fr;
    
  column-gap: 90px;   /* 👈 horizontal spacing */
  row-gap: 20px;

  padding: 30px 0;
  align-items: start;
}

/* ensure all columns align from top */

/* TEXT + LINKS */
.footer-col h4 {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}



.footer-col a:hover {
  color: #8b2d2d;
}

/* PARAGRAPH (fixes awkward Contact spacing) */
.footer-col p {
  margin: 6px 0;
  line-height: 1.45;
  line-height: 1.5;
  max-width: 260px;   /* prevents ugly wide wrapping */
}

/* ================= BOTTOM BAR ================= */

.footer-bottom {
  border-top: 1px solid #d8d3cb;
  padding: 14px 0;
  font-size: 14px;
  background: #f3efe9;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LEFT */
.footer-copy {
  color: #3a3a3a;
}

/* RIGHT */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-legal a {
  color: #3a3a3a;
  text-decoration: none;
}

.footer-legal a:hover {
  color: #8b2d2d;
}

/* DOT */
.footer-legal .dot {
  opacity: 0.5;
}
.footer-col:last-child {
  padding-left: 45px;
}

/* ================= LOGO ================= */

.footer-logo img {
  height: 95px;   /* ~20% increase */
  width: auto;
}

/* ================= LIGHTROOM ================= */

.lightroom {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightroom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}

.lightroom-content {
  position: relative;
  width: 80%;
  max-width: 800px;
  margin: 80px auto;
  height: 80vh;
  display: flex;
  flex-direction: column;
  background: rgba(246, 241, 231, 0.9);
  border-radius: 8px;
  overflow: hidden;
}

.legal-lightroom-content {
  width: 70%;
  max-width: 640px;
  height: auto;
  max-height: 86vh;
  background: rgba(252, 250, 246, 0.96);
}

.empty-info-placeholder {
  margin: 24px 0;
  text-align: center;
  font-style: italic;
  color: #5a0f1c;
  font-size: 18px;
  letter-spacing: 0.4px;
}

/* ===== CONTACT US BLOCK (legal lightroom body) ===== */
.contact-info {
  margin: 0;
  padding: 6px 4px 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #2c2c2c;
}

.contact-info dt {
  margin-top: 14px;
  font-weight: 600;
  color: #5a0f1c;
  letter-spacing: 0.3px;
}

.contact-info dt:first-child {
  margin-top: 0;
}

.contact-info dd {
  margin: 4px 0 0;
  padding: 0;
  min-height: 1.2em;     /* keep empty Phone/Email rows visible until filled in */
}

/* 👈 Shift Explore-page Exhibitions card image leftward by ~30%.
   Default object-position is 50% 50%; raising the X to 80% moves the visible
   focal window to the RIGHT of the source image, which slides the image's
   content visually to the LEFT inside the card. */
.explore-exhibitions-img {
  object-position: 80% 50%;
}

/* ===== PRIVACY POLICY BLOCK (legal lightroom body) ===== */
.privacy-policy {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: #2c2c2c;
}

.privacy-policy h4 {
  margin: 0 0 14px;
  font-size: 17px;
  color: #5a0f1c;
  letter-spacing: 0.3px;
}

.privacy-policy ul {
  margin: 0;
  padding-left: 20px;
}

.privacy-policy li {
  margin: 0 0 12px;
}

.privacy-policy li:last-child {
  margin-bottom: 0;
}

.lightroom-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 30px;
}

.lightroom-header {
  position: relative;
  text-align: center;
  padding: 20px 30px;
  border-bottom: 1px solid #ddd;
}

.close-btn {
  position: absolute;
  right: 24px;
  top: 18px;
  font-size: 26px;
  cursor: pointer;
}

.lightroom-divider {
  display: block;
  width: 60px;
  height: 1px;
  margin: 12px auto 0;
  background: #5a0f1c;
  opacity: 0.6;
}

/* ===== FOOTER LIGHTBOX HEADER DIVIDER =====
   A soft fading line under the heading: fully transparent at both ends,
   visible only toward the centre — used as a refined separator between
   the title and the form/body inside footer-triggered lightboxes. */
#about-lightroom .lightroom-header,
#empty-info-lightroom .lightroom-header,
#trustees-lightroom .lightroom-header,
#interest-lightroom .lightroom-header,
#legal-lightroom .lightroom-header {
  border-bottom: none;   /* 👈 replace the flat 1px line with the gradient one below */
}

#about-lightroom .lightroom-header::after,
#empty-info-lightroom .lightroom-header::after,
#trustees-lightroom .lightroom-header::after,
#interest-lightroom .lightroom-header::after,
#legal-lightroom .lightroom-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 65%;
  max-width: 240px;
  height: 2px;
  background: linear-gradient(
    to right,
    rgba(90, 15, 28, 0) 0%,
    rgba(90, 15, 28, 0.08) 15%,
    rgba(90, 15, 28, 0.7) 50%,
    rgba(90, 15, 28, 0.08) 85%,
    rgba(90, 15, 28, 0) 100%
  );
  pointer-events: none;
}

.course-coming-soon {
  text-align: center;
  font-style: italic;
  color: #5a0f1c;
  margin: 24px 0;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.lightroom-title {
  margin: 0;
  font-size: 38px;
  color: #5a0f1c;
  letter-spacing: 0.4px;
}

/* Explore — Events lightroom: compact + horizontal links */
.explore-events-lightroom-content {
  height: auto;
  min-height: 0;
  margin: 88px auto 40px;
}

#explore-events-lightroom .lightroom-header {
  padding: 16px 44px 14px 30px;
}

#explore-events-lightroom .lightroom-title {
  font-size: 32px;
}

#explore-events-lightroom .lightroom-body {
  flex: 0 0 auto;
  overflow: visible;
  padding: 18px 22px 22px;
}

.explore-events-link-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

.explore-events-link-list li {
  flex: 1 1 auto;
  text-align: center;
  min-width: min-content;
}

.explore-events-link-list a {
  color: #5a0f1c;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.explore-events-link-list a:hover {
  opacity: 0.85;
}

.exhibition-switch {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.exhibition-switch-btn {
  border: 1px solid #5a0f1c;
  background: transparent;
  color: #5a0f1c;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.exhibition-switch-btn.active,
.exhibition-switch-btn:hover {
  background: #5a0f1c;
  color: #fff;
}

body.modal-open {
  overflow: hidden;
}

/* ================= FLIPBOOK ================= */

.flipbook {
  flex: 1;
  display: flex;
}

.page {
  display: none;
  width: 100%;
}

.page.active {
  display: flex;
}

.page-image {
  width: 70%;
  background-size: cover;
}

.page-text {
  width: 30%;
  padding: 20px;
  background: #f4f1ec;
}
/* ===== MISSING FIXES ===== */

.flipbook-container {
  max-width: 900px;
}

.flip-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.page-text h4 {
  margin-bottom: 10px;
}

.exhibit-subtitle {
  margin-top: -2px;
  font-size: 14px;
  color: #5a0f1c;
}

.lightroom {
  overflow-y: auto;
}
/* ===== SAFETY RESTORE ===== */

.flipbook-container {
  max-width: 900px;
}

.flip-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.page-text h4 {
  margin-bottom: 10px;
}

.lightroom {
  overflow-y: auto;
  
}
/* ===== SOCIAL ICONS (TOP RIGHT) ===== */

.top-header {
  position: relative; /* needed for absolute positioning */
}

.social-icons {
  position: absolute;
  right: 80px;   /* 👈 moved further left (was 30px) */
  bottom: 6px;   /* 👈 anchors to bottom of white band */
  display: flex;
  gap: 10px;
}

.social-icons img {
  width: 25px;   /* 👈 increased by ~30% (was 19px) */
  height: 25px;
  object-fit: contain;
  opacity: 0.8;
  transition: 0.2s;
}

.footer-main .footer-col a {
  display: block;
  margin-bottom: 8px;
}
/* ================= COURSE CARD IMAGE FIX ================= */

.course-grid .wide-card {
  position: relative;
  height: 360px;
  overflow: hidden;
}

.course-grid .wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ================= COURSES ================= */

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;

  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.course-grid .wide-card {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 6px;
}

.course-grid .wide-card h3 {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  color: #fff;
  z-index: 2;
  line-height: 1.2;
}

.course-grid .wide-card h3 span {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
.course-subtitle {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  line-height: 1.5;
  color: #edcca0;
}

/* ================= PUBLICATIONS ================= */

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;

  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.publication-grid.events-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.publication-grid.events-grid .wide-card {
  height: 320px;
}

.publication-grid .wide-card {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-radius: 6px;
}

.publication-grid .wide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.publication-grid .wide-card h3 {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  color: #fff;
  z-index: 2;
  line-height: 1.2;
}

/* ================= PUBLICATION LIGHTROOM ================= */

.publication-lightroom-content {
  max-width: 1080px;
  height: 82vh;
  min-height: 0;
}

.publication-lightroom-header {
  text-align: center;
}

.publication-switch {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.publication-switch-btn {
  border: 1px solid #5a0f1c;
  background: transparent;
  color: #5a0f1c;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.publication-switch-btn.active,
.publication-switch-btn:hover {
  background: #5a0f1c;
  color: #fff;
}

.publication-book {
  flex: 1;
  display: flex;
  min-height: 0;
}

.publication-page {
  display: none;
  width: 100%;
  min-height: 0;
}

.publication-page.active {
  display: flex;
}

.publication-main {
  width: 70%;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  min-height: 0;
}

.publication-main-pdf {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.publication-main-pdf .publication-back-link {
  flex: 0 0 auto;
}

.publication-main-pdf h4 {
  flex: 0 0 auto;
}

.publication-pdf-frame {
  flex: 1 1 auto;
  min-height: 0;
  margin: 8px 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #f4f1ec;
}

.publication-pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.publication-pdf-fallback {
  flex: 0 0 auto;
  margin: 0;
  font-size: 13px;
  color: #5a0f1c;
  text-align: center;
}

.publication-pdf-fallback a {
  color: #5a0f1c;
  text-decoration: underline;
}

/* ===== BROCHURE / BOOKLET PDF MODE =====
   When a PDF article is open (only the brochure / bulletin tabs use this
   right now), grow the entire publication lightbox so the embedded PDF
   viewer is actually readable. The "Open the PDF in a new tab" fallback
   link is preserved by the existing markup. */

.publication-lightroom-content:has(.publication-main-pdf) {
  max-width: 1800px;
  width: 98%;
  height: 99vh;
  margin: 4px auto;
}

/* Trim the publication chrome (back-link, title, frame margins) so the
   newly-gained vertical space flows into the PDF iframe itself. */
.publication-lightroom-content:has(.publication-main-pdf) .publication-main-pdf {
  padding: 10px 14px 8px;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-main-pdf h4 {
  margin: 0 0 4px;
  font-size: 17px;
}

.publication-lightroom-content:has(.publication-main-pdf)
  .publication-main-pdf .publication-back-link {
  margin: 0 0 4px;
  font-size: 13px;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-pdf-frame {
  margin: 2px 0 6px;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-pdf-fallback {
  font-size: 12px;
}

/* Shrink the lightbox header too — its three switch buttons take up a
   lot of vertical space we'd rather hand to the iframe. */
.publication-lightroom-content:has(.publication-main-pdf) .publication-lightroom-header {
  padding: 10px 30px 8px;
}

.publication-lightroom-content:has(.publication-main-pdf) .lightroom-title {
  font-size: 26px;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-switch {
  margin-top: 6px;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-switch-btn {
  padding: 5px 11px;
  font-size: 13px;
}

/* Shrink the side description panel further so the PDF column also
   gains width — short brochure blurbs still fit comfortably. */
.publication-lightroom-content:has(.publication-main-pdf) .publication-main {
  width: 86%;
}

.publication-lightroom-content:has(.publication-main-pdf) .publication-side {
  width: 14%;
  padding: 14px;
}

/* Small viewports — keep the lightbox usable without forcing it past
   the screen edges. */
@media (max-height: 720px) {
  .publication-lightroom-content:has(.publication-main-pdf) {
    height: 98vh;
    margin: 4px auto;
  }
}

@media (max-width: 900px) {
  .publication-lightroom-content:has(.publication-main-pdf) {
    width: 98%;
  }
  .publication-lightroom-content:has(.publication-main-pdf) .publication-main {
    width: 100%;
  }
  .publication-lightroom-content:has(.publication-main-pdf) .publication-side {
    display: none;   /* on narrow viewports the iframe gets the full row */
  }
}

.publication-main h4 {
  margin: 0 0 12px;
  color: #5a0f1c;
}

.publication-main p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.publication-side {
  width: 30%;
  padding: 20px;
  background: #f4f1ec;
  overflow-y: auto;
  min-height: 0;
}

.publication-side h5 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #5a0f1c;
}

.publication-side p {
  margin: 0;
  line-height: 1.5;
}

/* ===== PUBLICATION INDEX VIEW ===== */
.publication-index {
  width: 100%;
  background: #fff;
  padding: 50px 40px;
  overflow-y: auto;
  min-height: 0;
  text-align: center;            /* 👈 center heading + list items */
}

.publication-index h4 {
  margin: 0 0 28px;
  color: #5a0f1c;
  font-size: 22px;
  text-align: center;
}

.publication-index-list {
  list-style-position: inside;   /* keep numbers inside item box so text-align centers the whole line */
  list-style-type: decimal;
  padding: 0;
  margin: 0 auto;
  max-width: 720px;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.publication-index-item {
  margin: 0 0 14px;
  line-height: 1.5;
}

.publication-index-item a {
  color: #5a0f1c;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}

.publication-index-item a:hover {
  color: #8b2d2d;
}

.publication-index-empty {
  margin: 12px 0 0;
  font-style: italic;
  color: #5a0f1c;
  font-size: 17px;
  letter-spacing: 0.3px;
  text-align: center;
}

.publication-back-link {
  display: inline-block;
  margin: 0 0 16px;
  color: #5a0f1c;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.publication-back-link:hover {
  color: #8b2d2d;
}

/* Scholarly article figures (e.g. Preserving the Obsolete essay) */
.publication-main .essay-subtitle {
  margin: -4px 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: #555;
  font-style: italic;
}

.publication-main figure.essay-figure {
  margin: 28px 0;
}

.publication-main figure.essay-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.publication-main figure.essay-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
  font-style: italic;
}

.publication-main .essay-references {
  margin: 8px 0 0;
  padding-left: 22px;
  line-height: 1.7;
}

.publication-main .essay-references li {
  margin-bottom: 6px;
}

.publication-controls {
  padding: 8px 20px 16px;
}

.calendar-single-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.calendar-main-card {
  width: min(720px, 100%);
  height: 480px;
}

.calendar-book {
  flex: 1;
  display: flex;
  min-height: 0;
}

.calendar-live-view {
  width: 70%;
  min-height: 0;
  border-right: 1px solid #ddd;
  background: #fff;
  display: flex;
}

.calendar-live-view iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.calendar-description-panel {
  width: 30%;
  padding: 20px;
  background: #f4f1ec;
  overflow-y: auto;
}

.calendar-link-btn {
  display: inline-block;
  margin-top: 8px;
  border: 1px solid #5a0f1c;
  color: #5a0f1c;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 600;
}

/* ===== INLINE CALENDAR EMBED (calendar page) ===== */
.calendar-embed-section {
  padding: 10px 0 80px;
}

.calendar-embed-frame {
  width: min(1100px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 10;       /* keeps a comfortable shape across viewports */
  border: 1px solid #d6d0c7;
  background: #fff;
  overflow: hidden;
}

.calendar-embed-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.calendar-embed-fallback {
  margin: 18px auto 0;
  text-align: center;
  font-size: 14px;
  color: #5a0f1c;
}

.calendar-embed-fallback a {
  color: #5a0f1c;
  text-decoration: underline;
}

.calendar-embed-fallback a:hover {
  color: #8b2d2d;
}

.calendar-link-btn:hover {
  background: #5a0f1c;
  color: #fff;
}

/* ================= FUTURE OF MEMORIES ================= */

.future-memories-content .container.narrow {
  max-width: 900px;
}

.future-memories-subtitle {
  margin-top: -8px;
  margin-bottom: 18px;
  color: #5a0f1c;
  font-size: 24px;
  font-weight: 600;
}

.future-memories-lineup-title {
  margin-top: 26px;
  margin-bottom: 14px;
  color: #5a0f1c;
}

.future-memories-lineup {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.future-memories-gallery-section {
  padding: 10px 0 70px;
}

.future-memories-gallery {
  position: relative;
  height: 620px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.future-memories-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.future-memories-slide.active {
  opacity: 1;
}

.future-memories-gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #f4f1ec;
  font-size: 18px;
}

.projects-gallery,
.exhibitions-gallery,
.events-gallery {
  height: 465px;
  width: 75%;
  margin: 0 auto;
}

/* ================= EXHIBITION ARTICLE / GALLERY VIEW ================= */

.exhibition-article-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 24px;
  width: 100%;
  overflow-y: auto;
}

.exhibition-article-title {
  margin: 6px 0 14px;
  color: #5a0f1c;
  text-align: center;
  font-size: 20px;
}

.exhibition-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: #5a0f1c;
  font-size: 20px;
  letter-spacing: 0.4px;
}

.exhibition-article-view .festival-gallery-stage,
.festival-gallery-view .festival-gallery-stage {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 720px;
  max-height: 62vh;
  align-self: center;
  margin: 8px auto 0;
}

.festival-gallery-view {
  overflow-y: auto;
}

/* ================= FESTIVAL LIGHTROOM ================= */

.festival-lightroom-content {
  max-width: 1080px;
  width: 90%;
  height: auto;
  max-height: 90vh;
}

.festival-view {
  display: none;
  flex: 0 1 auto;
  min-height: 0;
  flex-direction: column;
  padding: 24px 30px;
}

.festival-view.active {
  display: flex;
}

.festival-back-link {
  align-self: flex-start;
  margin-bottom: 12px;
}

.festival-gallery-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border-radius: 6px;
  overflow: hidden;
  min-height: 0;
}

.festival-gallery-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  display: block;
}

.festival-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.festival-nav:hover {
  background: rgba(90, 15, 28, 0.85);
}

.festival-nav-prev {
  left: 14px;
}

.festival-nav-next {
  right: 14px;
}

.festival-gallery-counter {
  margin-top: 14px;
  text-align: center;
  color: #5a0f1c;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 0.4px;
}

/* ===== FESTIVAL FULLSCREEN ===== */

.festival-fullscreen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
}

.festival-fullscreen.active {
  display: flex;
}

.festival-fullscreen img {
  max-width: 96vw;
  max-height: 96vh;
  object-fit: contain;
  cursor: zoom-out;
}

.festival-fullscreen-close {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.festival-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.festival-fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}

.festival-fullscreen-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.festival-fullscreen-prev {
  left: 24px;
}

.festival-fullscreen-next {
  right: 24px;
}

/* ================= MEMBER FORM LIGHTROOM ================= */

.member-lightroom-content {
  max-width: 620px;
  height: auto;
  max-height: 86vh;
}

.member-lightroom-header {
  text-align: center;
}

.member-form-wrap {
  padding: 22px 28px 28px;
  overflow-y: auto;
}

.member-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-form label {
  font-weight: 600;
  color: #3f3f3f;
}

.member-form input,
.member-form textarea {
  border: 1px solid #cfc6b8;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: #fff;
}

.member-form textarea {
  resize: vertical;
}

.member-submit-btn {
  margin-top: 6px;
  align-self: flex-start;
  border: 1px solid #5a0f1c;
  background: #5a0f1c;
  color: #fff;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.member-submit-btn:hover {
  opacity: 0.92;
}

.interest-form-intro {
  margin: 0 0 18px;
  padding: 0 2px;
  color: #3f3f3f;
  font-size: 14px;
  line-height: 1.55;
}

.interest-form-intro p {
  margin: 0 0 12px;   /* 👈 spacing between paragraphs in multi-para intros (e.g. Café Flashback) */
}

.interest-form-intro p:last-child {
  margin-bottom: 0;
}

/* ===== INTERNSHIP GUIDELINES (inside the member-form lightroom) ===== */
.internship-guidelines-link {
  display: inline-block;
  margin: 0 0 16px;
  color: #5a0f1c;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.internship-guidelines-link:hover {
  color: #8b2d2d;
}

.internship-guidelines-view {
  padding: 18px 28px 28px;
  overflow-y: auto;
  color: #2c2c2c;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.internship-guidelines-doc-title {
  margin: 14px 0 18px;
  font-size: 18px;
  color: #5a0f1c;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.internship-guidelines-view h5 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: #5a0f1c;
  font-weight: 600;
}

.internship-guidelines-view p {
  margin: 0 0 10px;
}

.internship-guidelines-view ul {
  margin: 4px 0 12px;
  padding-left: 22px;
}

.internship-guidelines-view ul li {
  margin: 0 0 6px;
}

.internship-guidelines-view a {
  color: #5a0f1c;
  text-decoration: underline;
}

.internship-guidelines-view a:hover {
  color: #8b2d2d;
}
/* FORCE EXHIBITION CARDS TO FILL GRID */
.exhibition-grid .wide-card {
  width: 100%;
  max-width: none;
}

/* 👈 Make exhibition card titles ("Physical Exhibitions" / "E-Exhibitions") pop in pure white */
.exhibition-grid .wide-card h3 {
  z-index: 2;                 /* sit above the dark overlay */
  font-size: 1.4rem;          /* 👈 ~20% larger than default h3 (matches site-wide card standard) */
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.3px;
  -webkit-text-stroke: 0.25px rgba(0, 0, 0, 0.85);   /* 👈 ~50% thinner outline (was 0.5px) */
  text-stroke: 0.25px rgba(0, 0, 0, 0.85);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.45),     /* soft white glow → amplifies brightness */
    0 2px 6px rgba(0, 0, 0, 0.55),          /* subtle dark drop → readability on bright spots */
    -0.25px -0.25px 0 rgba(0, 0, 0, 0.85),  /* 4-corner outline fallback for non-webkit browsers */
     0.25px -0.25px 0 rgba(0, 0, 0, 0.85),
    -0.25px  0.25px 0 rgba(0, 0, 0, 0.85),
     0.25px  0.25px 0 rgba(0, 0, 0, 0.85);
}

/* ================= GLOBAL BACK ARROW =================
   Sits on the right side just below the hero on every page. Inserted
   programmatically by main.js after the .hero section. */

.page-back-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 18px 36px 0;
  pointer-events: none;          /* let clicks pass through to content;
                                    the button below re-enables them */
}

.page-back-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(90, 15, 28, 0.28);
  border-radius: 50%;
  background: #fff;
  color: #5a0f1c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: background 0.2s ease, color 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}

.page-back-btn:hover,
.page-back-btn:focus-visible {
  background: #5a0f1c;
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  outline: none;
}

.page-back-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 640px) {
  .page-back-wrap {
    padding: 14px 18px 0;
  }
  .page-back-btn {
    width: 40px;
    height: 40px;
  }
  .page-back-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* ================= LANDING INTRO ANIMATION ================= */

/* Lock the page while the intro is playing so there is no flash
   of the underlying landing page behind the grey backdrop. */
html.intro-active,
html.intro-active body {
  overflow: hidden;
  height: 100%;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: opacity;
}

/* Layer 0: hero image backdrop (matches .slide1's framing). */
.intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../assets/images/hero1.jpg');
  background-size: 130% auto;
  background-position: 15% 25%;
  transform: scale(1.08);
  opacity: 0;
  animation: introBgEnter 1s ease-out 0s forwards;
  will-change: transform, opacity;
}

/* Layer 1: translucent grey tint over the hero — ~20% of the picture
   reads through during the splash. */
.intro-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(70, 67, 67, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}

/* Layer 2: the magnified logo + spinning reels. */
.intro-logo-wrap {
  position: relative;
  z-index: 2;
  width: min(82vw, 920px);
  transform: scale(0.96);
  opacity: 0;
  animation: introEnter 0.95s ease-out 0.05s forwards;
  will-change: transform, opacity;
}

.intro-logo-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Each reel is centered on the corresponding baked-in "O" in
   the source logo PNG. left/top are the coordinates of the
   reel center expressed as % of the wrapper (= % of the image).
   Values measured directly from the 1536×516 source PNG. */
.intro-reel {
  position: absolute;
  width: 6.7%;                    /* matches diameter of baked-in O reels */
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.intro-reel-1 { left: 25.29%; top: 87.89%; }
.intro-reel-2 { left: 66.41%; top: 87.89%; }

.intro-reel-inner {
  display: block;
  width: 100%;
  height: 100%;
  animation: introSpin 7s linear infinite;
  transform-origin: 50% 50%;
  will-change: transform;
}

.intro-reel-inner svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Collapse phase: the magnified logo glides toward the header logo's
   position, shrinks to its size, and fades — feeling like the splash
   logo arrived first and then settled into the header. The target
   offset (--intro-tx / --intro-ty) and target scale (--intro-ts) are
   measured at runtime and set as CSS variables on the wrap. */
.intro-overlay.collapsing {
  animation: introFadeOut 1s ease-out 0s forwards;
}

.intro-overlay.collapsing .intro-logo-wrap {
  animation: introCollapse 1s cubic-bezier(.4, 0, .2, 1) forwards;
}

/* During collapse, the hero backdrop pushes gently backwards (scales
   down) and fades away — revealing the real hero section beneath. */
.intro-overlay.collapsing .intro-bg {
  animation: introBgCollapse 1s cubic-bezier(.4, 0, .2, 1) forwards;
}

.intro-overlay.done {
  display: none;
}

@keyframes introEnter {
  0%   { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes introBgEnter {
  0%   { transform: scale(1.16); opacity: 0; }
  100% { transform: scale(1.08); opacity: 1; }
}

@keyframes introBgCollapse {
  0%   { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.94); opacity: 0; }
}

@keyframes introSpin {
  to { transform: rotate(360deg); }
}

@keyframes introCollapse {
  0%   {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--intro-tx, 0px), var(--intro-ty, 14px))
               scale(var(--intro-ts, 0.96));
    opacity: 0;
  }
}

@keyframes introFadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* Honour users who prefer reduced motion: skip the intro entirely. */
@media (prefers-reduced-motion: reduce) {
  .intro-overlay { display: none; }
}

/* Mobile: keep the magnified logo comfortably inside the viewport */
@media (max-width: 640px) {
  .intro-logo-wrap { width: 88vw; }
}