/* ==========================================================
   SBMCH - MEDIA CENTRE: INFRASTRUCTURE & FACILITIES
   Gallery-style page built on department.css brand tokens.
   Load AFTER main.css and department.css.
========================================================== */

.mc-page { --mc-ink: #4a0030; --mc-line: rgba(255, 255, 255, .18); }
.mc-main { overflow-x: clip; }
.mc-main section { padding: 84px 0; }

/* ---------- Gentle reveal on scroll (media-centre.js adds .is-in) ---------- */

.mc-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  transition-delay: var(--d, 0ms);
}
.mc-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Skeleton placeholder + image fade-in ---------- */

.mc-ph {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(100deg, #f3e8ef 30%, #fbf4f8 50%, #f3e8ef 70%) 0 0 / 300% 100%;
  animation: mc-shimmer 1.4s linear infinite;
}
.mc-ph.is-loaded { animation: none; background: #f3e8ef; }
.mc-ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, opacity .4s ease; }
.mc-js .mc-ph img { opacity: 0; }
.mc-js .mc-ph.is-loaded img { opacity: 1; }
@keyframes mc-shimmer { to { background-position: -300% 0; } }

/* =========================================================
   HERO - immersive full-bleed photograph
========================================================= */

.sbmch-dept .mc-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 82vh, 780px);
  padding: 150px 0 0;
  background: var(--sbmch-grad);
  color: #fff;
  isolation: isolate;
}

.mc-hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: mc-kenburns 18s ease-out both;
}
@keyframes mc-kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

.mc-hero--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(74, 0, 48, .94) 0%, rgba(101, 0, 65, .55) 34%, rgba(101, 0, 65, 0) 64%),
    linear-gradient(90deg, rgba(60, 0, 39, .78) 0%, rgba(60, 0, 39, .25) 50%, rgba(60, 0, 39, 0) 75%);
}

.sbmch-dept .mc-hero-inner { position: relative; width: min(1320px, 100% - 40px); padding-bottom: 0; }
.mc-hero-inner > p { max-width: 600px; margin: 0; color: rgba(255, 255, 255, .9); font-size: 1.08rem; }
.sbmch-dept .mc-hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
.sbmch-dept .mc-hero .sd-eyebrow,
.sbmch-dept .mc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  text-align: left;
  backdrop-filter: blur(6px);
}
.mc-hero .sd-crumbs { margin-bottom: 22px; }
.mc-hero .sd-crumbs span[aria-current] { margin: 0; color: #fff; }

/* Quick links strip along the bottom of the hero */
.mc-hero-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 300px));
  margin-top: 40px;
  border-top: 1px solid var(--mc-line);
}
.mc-hero-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 22px 0;
  color: #fff;
  text-decoration: none;
}
.mc-hero-links a + a { padding-left: 24px; border-left: 1px solid var(--mc-line); }
.mc-hero-links i {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  background: var(--sbmch-grad);
  font-size: 1.2rem;
  transition: transform .25s;
}
.mc-hero-links strong { display: block; font-family: var(--sbmch-head); font-size: 1rem; }
.mc-hero-links small { display: block; color: rgba(255, 255, 255, .7); font-size: .8rem; }
.mc-hero-links a:hover i { transform: translateY(-3px); }
.mc-hero-links a:hover strong { color: var(--sbmch-accent-light); }

/* =========================================================
   INTRODUCTION - split layout
========================================================= */

.mc-intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.sbmch-dept .mc-intro h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.sbmch-dept .mc-intro h2 span { color: var(--sbmch-accent); }
.sbmch-dept .mc-intro .sd-eyebrow,
.sbmch-dept .mc-intro h2 { text-align: left; }
.mc-intro .sd-lead { margin-bottom: 26px; }

.mc-intro-media { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; box-shadow: var(--sbmch-shadow-lg); }
.mc-intro-media img { width: 100%; height: 100%; object-fit: cover; }

.mc-intro-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--sbmch-border);
  border: 1px solid var(--sbmch-border);
  box-shadow: var(--sbmch-shadow-md);
}
.mc-intro-points li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 30px 26px;
  background: #fff;
  transition: background .25s;
}
.mc-intro-points li:hover { background: var(--sbmch-tint-solid); }
.mc-intro-points i {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  background: var(--sbmch-tint-solid);
  color: var(--sbmch-primary);
  font-size: 1.35rem;
}
.mc-intro-points strong { color: var(--sbmch-primary-dark); font-family: var(--sbmch-head); font-size: 1.02rem; }
.mc-intro-points span { color: var(--sbmch-muted); font-size: .88rem; }

/* =========================================================
   GALLERY - dark, full-width photo wall
========================================================= */

.sbmch-dept .mc-gallery {
  position: relative;
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(210, 24, 125, .09), transparent 65%),
    radial-gradient(700px 380px at 0% 100%, rgba(139, 0, 93, .06), transparent 65%),
    linear-gradient(180deg, #fdf8fb 0%, #f7eff4 100%);
  color: var(--sbmch-text);
}

/* thin brand line across the top of the gallery */
.sbmch-dept .mc-gallery::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--sbmch-grad);
}

.mc-gallery-wrap { width: min(1320px, 100% - 40px); margin-inline: auto; }

.mc-gallery-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 30px;
}
.sbmch-dept .mc-gallery h2 { margin: 0; color: var(--sbmch-primary-dark); font-size: clamp(2rem, 4vw, 3.1rem); }
.sbmch-dept .mc-gallery .sd-eyebrow { color: var(--sbmch-accent); }
.sbmch-dept .mc-gallery .sd-lead { margin: 0; color: var(--sbmch-muted); }

/* Sticky filter bar */
.mc-filters-bar {
  position: sticky;
  top: 108px;
  z-index: 20;
  margin: 0 0 26px;
  padding: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border: 1px solid #efe2ea;
  box-shadow: 0 10px 30px rgba(101, 0, 65, .07);
}

.mc-filters-bar { display: flex; align-items: center; gap: 6px; }

/* Desktop & tablet: every category is visible - the chips wrap onto extra lines */
.mc-filters {
  position: relative;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

/* Arrow buttons (used only when the row scrolls, i.e. on phones) */
.mc-filters-nav {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 40px;
  padding: 0;
  border: 1px solid #efe2ea;
  background: #fff;
  color: var(--sbmch-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.mc-filters-nav:hover { background: var(--sbmch-grad); color: #fff; border-color: transparent; }
.mc-filters-nav[hidden] { display: none; }

.mc-filter {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #efe2ea;
  background: #fff;
  color: var(--sbmch-text);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: start;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mc-filter i { color: var(--sbmch-accent); font-size: .95rem; }
.mc-filter:hover { border-color: var(--sbmch-accent); color: var(--sbmch-primary); box-shadow: 0 4px 12px rgba(139, 0, 93, .08); }
.mc-filter.is-upcoming { color: #6b6f78; }
.mc-filter.is-active { background: var(--sbmch-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(139, 0, 93, .25); }
.mc-filter.is-active i { color: #fff; }

.mc-count { min-width: 22px; padding: 1px 6px; background: var(--sbmch-tint-solid); color: var(--sbmch-primary); font-size: .72rem; text-align: center; }
.mc-filter.is-active .mc-count { background: rgba(255, 255, 255, .22); color: #fff; }

.mc-filter:focus-visible,
.mc-card-btn:focus-visible,
.mc-video-link:focus-visible {
  outline: 3px solid var(--sbmch-accent);
  outline-offset: 3px;
}
.mc-hero-links a:focus-visible { outline: 3px solid var(--sbmch-accent-light); outline-offset: 3px; }

.mc-cat-intro { max-width: 760px; margin: 0 0 24px; padding-left: 16px; border-left: 3px solid var(--sbmch-accent); }
.mc-cat-intro[hidden] { display: none; }
.sbmch-dept .mc-cat-heading { margin: 0 0 4px; color: var(--sbmch-primary-dark); font-size: 1.35rem; }
.mc-cat-desc { margin: 0; color: var(--sbmch-muted); font-size: .95rem; }

/* Photo wall */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 14px;
}

.mc-card,
.mc-tile { position: relative; margin: 0; overflow: hidden; }
.mc-card {
  background: #fff;
  box-shadow: 0 12px 32px rgba(101, 0, 65, .12);
  outline: 1px solid rgba(255, 255, 255, .6);
  outline-offset: -7px; /* fine inner frame, gallery style */
}
.mc-card[hidden],
.mc-tile[hidden] { display: none; }
.mc-card.is-entering,
.mc-tile.is-entering { animation: mc-in .4s ease both; }
@keyframes mc-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.mc-card--large { grid-column: span 2; grid-row: span 2; }
.mc-card--wide { grid-column: span 2; }
.mc-card--tall { grid-row: span 2; }

/* A lone visible item (e.g. one category selected) is shown wide */
.mc-grid.is-solo > :not([hidden]) { grid-column: 1 / -1; grid-row: span 2; }

.mc-card-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mc-card-btn:hover .mc-ph img,
.mc-card-btn:focus-visible .mc-ph img { transform: scale(1.06); }

.mc-card-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 60px 20px 18px;
  background: linear-gradient(0deg, rgba(74, 0, 48, .9), rgba(101, 0, 65, .45) 55%, transparent);
  color: #fff;
  pointer-events: none;
}
.mc-card-cap strong { font-family: var(--sbmch-head); font-size: 1.05rem; line-height: 1.3; }
.mc-card--large .mc-card-cap strong { font-size: 1.4rem; }
.mc-card-cat { color: var(--sbmch-accent-light); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mc-card-desc { color: rgba(255, 255, 255, .82); font-size: .84rem; line-height: 1.45; }

.mc-card-view {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .95);
  color: var(--sbmch-primary);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s, transform .25s;
}
.mc-card-btn:hover .mc-card-view,
.mc-card-btn:focus-visible .mc-card-view { opacity: 1; transform: none; }
@media (hover: none) { .mc-card-view { opacity: 1; transform: none; } }

/* "Photos coming soon" facility tiles */
.mc-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 22px;
  border: 1px solid #f0e1ea;
  background: linear-gradient(160deg, #ffffff 0%, #fdf3f8 100%);
  color: var(--sbmch-text);
  box-shadow: 0 6px 18px rgba(101, 0, 65, .05);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.mc-tile--1 { background: linear-gradient(160deg, #ffffff 0%, #f8eef6 100%); }
.mc-tile--2 { background: linear-gradient(160deg, #fffafd 0%, #fbeef4 100%); }
.mc-tile--3 { background: linear-gradient(160deg, #ffffff 0%, #f6f0f7 100%); }

/* brand accent bar that grows on hover */
.mc-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--sbmch-grad);
  transform: scaleY(.35);
  transform-origin: bottom;
  transition: transform .35s ease;
  pointer-events: none;
}
.mc-tile:hover { transform: translateY(-3px); border-color: #e8c9db; box-shadow: 0 16px 34px rgba(101, 0, 65, .12); }
.mc-tile:hover::before { transform: scaleY(1); }

.mc-tile-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(139, 0, 93, .07);
  color: var(--sbmch-primary);
  font-size: 1.9rem;
  line-height: 1;
  transition: background .3s, color .3s, transform .3s;
}
.mc-tile:hover .mc-tile-icon { background: var(--sbmch-grad); color: #fff; transform: scale(1.05); }
.sbmch-dept .mc-tile-title { position: relative; margin: 0; color: var(--sbmch-primary-dark); font-size: 1.1rem; }
.sbmch-dept .mc-tile-desc {
  position: relative;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--sbmch-muted);
  font-size: .82rem;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.mc-tile-soon {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--sbmch-tint-solid);
  color: var(--sbmch-primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.mc-grid.is-solo .mc-tile { align-items: center; justify-content: center; text-align: center; }
.mc-grid.is-solo .mc-tile-soon { align-self: center; }
.mc-grid.is-solo .mc-tile-icon { position: static; width: 88px; height: 88px; margin-bottom: 8px; font-size: 2.6rem; }

/* =========================================================
   FEATURED SHOWCASE
========================================================= */

.mc-showcase-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
  margin-top: 34px;
}
.mc-show-item { position: relative; margin: 0; overflow: hidden; grid-column: span 2; }
.mc-show-item--1 { grid-column: span 4; grid-row: span 2; }
.mc-showcase-grid--4 .mc-show-item--4 { grid-column: span 6; }
.mc-showcase-grid--5 .mc-show-item--4,
.mc-showcase-grid--5 .mc-show-item--5 { grid-column: span 3; }

/* =========================================================
   VIDEO GALLERY
========================================================= */

.mc-video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.mc-video { margin: 0; background: #fff; box-shadow: var(--sbmch-shadow-sm); }
.mc-video--main { grid-column: 1 / -1; }
.mc-video-link { position: relative; display: block; aspect-ratio: 16 / 9; }
.mc-video figcaption { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; }
.mc-video figcaption strong { color: var(--sbmch-primary-dark); font-family: var(--sbmch-head); }
.mc-video figcaption span { color: var(--sbmch-muted); font-size: .88rem; }
.mc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--sbmch-primary);
  font-size: 2.3rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .25s;
}
.mc-video-link:hover .mc-play { transform: translate(-50%, -50%) scale(1.08); }

/* ---------- Lightbox (GLightbox) brand touches ---------- */

.glightbox-container .gslide-description { background: #1b0612; }
.glightbox-clean .gslide-title { margin-bottom: 4px; color: #fff; font-family: var(--sbmch-head); }
.glightbox-clean .gslide-desc { color: rgba(255, 255, 255, .8); }
.glightbox-clean .gdesc-inner { padding: 14px 20px; }
.mc-lb-counter { display: block; margin-top: 6px; color: var(--sbmch-accent-light); font-size: .78rem; font-weight: 700; letter-spacing: .06em; }

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {
  .mc-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
  .mc-filters-bar { top: 82px; }
}

@media (max-width: 991px) {
  .mc-main section { padding: 64px 0; }
  .mc-intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .mc-gallery-head { grid-template-columns: 1fr; gap: 12px; }
  .mc-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 210px; }
  .mc-showcase-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .mc-show-item,
  .mc-showcase-grid--4 .mc-show-item--4,
  .mc-showcase-grid--5 .mc-show-item--4,
  .mc-showcase-grid--5 .mc-show-item--5 { grid-column: span 1; }
  .mc-show-item--1 { grid-column: 1 / -1; grid-row: span 2; }
  .mc-video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .sbmch-dept .mc-hero { min-height: 560px; padding-top: 120px; }
  .mc-hero-inner > p { font-size: 1rem; }
  .mc-hero-links { grid-template-columns: 1fr; margin-top: 26px; }
  .mc-hero-links a { padding: 14px 0; }
  .mc-hero-links a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--mc-line); }
  .mc-hero-links i { width: 40px; height: 40px; }
  .mc-intro-points li { padding: 22px 18px; }
  .mc-filters-bar { top: 70px; padding: 8px; }

  /* Phones: one scrollable row, with arrows and faded edges hinting at more */
  .mc-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .mc-filters::-webkit-scrollbar { display: none; }
  .mc-filter { scroll-snap-align: start; }
  .mc-filters-bar.can-right .mc-filters { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .mc-filters-bar.can-left .mc-filters { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%); mask-image: linear-gradient(90deg, transparent, #000 15%); }
  .mc-filters-bar.can-left.can-right .mc-filters { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
}

@media (max-width: 575px) {
  .mc-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; gap: 8px; }
  .mc-card--large,
  .mc-card--wide { grid-column: 1 / -1; }
  .mc-card--large { grid-row: span 2; }
  .mc-tile { padding: 14px; }
  .mc-tile-icon { top: 12px; right: 12px; width: 42px; height: 42px; font-size: 1.25rem; }
  .sbmch-dept .mc-tile-title { font-size: .95rem; }
  .sbmch-dept .mc-tile-desc { display: none; }
  .mc-tile-soon { padding: 3px 7px; font-size: .62rem; white-space: nowrap; }
  .mc-tile-soon i { display: none; }
  .mc-intro-points { grid-template-columns: 1fr 1fr; }
  .mc-showcase-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .mc-show-item--1 { grid-row: span 1; }
  .mc-video-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .mc-ph,
  .mc-hero-img { animation: none; }
  .mc-ph img,
  .mc-card-view,
  .mc-play,
  .mc-tile,
  .mc-tile-icon { transition: none; }
  .mc-card-btn:hover .mc-ph img { transform: none; }
  .mc-card.is-entering,
  .mc-tile.is-entering { animation: none; }
  .mc-tile:hover { transform: none; }
  .mc-js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
