/* ---------- Poster / news slideshow (home page + Admissions page) ----------
   Built by assets/js/slideshow.js from content/slideshow.json. Each slide is
   a link to its page; the picture sits "contained" (never cropped, so posters
   keep their text) on a blurred copy of itself, which lets portrait posters,
   square posters and landscape event photos share one frame. */
.mms-ss { width: 100%; max-width: 520px; margin: 0 auto; }
.mms-ss-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-2);
}
.mms-ss-slide {
  position: absolute; inset: 0;
  display: block;
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  color: inherit; text-decoration: none;
  overflow: hidden;
}
.mms-ss-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 0.6s ease; }
.mms-ss-slide::before {
  content: ""; position: absolute; inset: -24px;
  background-image: var(--bg); background-size: cover; background-position: center;
  filter: blur(22px) saturate(1.15); transform: scale(1.06);
}
.mms-ss .mms-ss-img {
  position: relative; display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 0; box-shadow: none;
}
/* Which section the current picture belongs to, kept under the picture so it
   never covers the poster's own text. */
.mms-ss-caption {
  margin: 12px 4px 0; text-align: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--navy);
}
.mms-ss-slide:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }

.mms-ss-btn {
  position: absolute; z-index: 3;
  width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.55); border-radius: 50%;
  background: rgba(5,0,116,0.62); color: #fff; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.mms-ss-btn:hover, .mms-ss-btn:focus-visible { background: rgba(5,0,116,0.85); transform: scale(1.06); }
.mms-ss-btn svg { width: 20px; height: 20px; }
.mms-ss-prev { left: 10px; top: 50%; margin-top: -21px; }
.mms-ss-next { right: 10px; top: 50%; margin-top: -21px; }
.mms-ss-pause { right: 10px; bottom: 10px; width: 36px; height: 36px; }
.mms-ss-pause svg { width: 16px; height: 16px; }
.mms-ss-pause .icon-play { display: none; }
.mms-ss-pause[aria-pressed="true"] .icon-play { display: block; }
.mms-ss-pause[aria-pressed="true"] .icon-pause { display: none; }

.mms-ss-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.mms-ss-dot {
  /* 24px tap target around an 9px dot */
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mms-ss-dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--line); transition: background 0.2s ease, transform 0.2s ease;
}
.mms-ss-dot[aria-current="true"]::before { background: var(--orange); transform: scale(1.25); }
.mms-ss-dot:focus-visible { outline: 2px solid var(--orange); border-radius: 50%; }

/* The site-wide lightbox (main.js) marks these pictures with a zoom cursor;
   slides that go to another page should show a pointer instead. */
.mms-ss-slide .mms-ss-img.lightbox-zoomable { cursor: pointer; }
.mms-ss-slide.is-zoom .mms-ss-img.lightbox-zoomable { cursor: zoom-in; }

@media (prefers-reduced-motion: reduce) {
  .mms-ss-slide, .mms-ss-slide.is-active { transition: none; }
}
@media (max-width: 640px) {
  .mms-ss-btn { width: 38px; height: 38px; }
  .mms-ss-prev, .mms-ss-next { margin-top: -19px; }
}

/* ---------- Poster slides inside the home page photo banner (#hero-slideshow) ----------
   Posters are portrait, the banner is a wide strip, so the poster sits whole
   (never cropped) on a blurred copy of itself, like the slideshow below. */
.hero-slide-poster { display: block; overflow: hidden; color: inherit; text-decoration: none; }
.hero-slide-poster::before {
  content: ""; position: absolute; inset: -30px;
  background-image: var(--bg); background-size: cover; background-position: center;
  filter: blur(26px) saturate(1.15) brightness(0.92); transform: scale(1.06);
}
.hero-media .hero-slide-poster > img {
  position: relative; display: block;
  width: 100%; height: 100%;
  object-fit: contain;
}
.hero-slide-poster:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
/* The banner's darkening gradient is decoration only; without this it sits on
   top of the slides and swallows clicks, so a poster couldn't be clicked. */
.hero-media::after { pointer-events: none; }
/* The "Innovate · Collaborate · Create" badge would sit on top of a poster's
   own text, so it steps aside while a poster is showing. */
.hero-media:has(.hero-slide-poster.is-active) .hex-badge { opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }

/* ---------- Admissions page, phones/tablets: picture first ----------
   The "Begin the Journey" section is text-left / pictures-right on desktop.
   Once it stacks into one column, show the poster slideshow first, then the
   story text, then the details card (dates + Apply button). display:contents
   lets the slideshow and the card, which share one wrapper on desktop, be
   ordered independently of each other here. */
@media (max-width: 900px) {
  #vijayadashami-admissions .split { gap: 32px; }
  /* !important: the wrapper carries an inline display:flex */
  #vijayadashami-admissions .split-media { display: contents !important; }
  #vijayadashami-admissions .split-media > [data-slideshow] { order: -1; }
  #vijayadashami-admissions .split-media > :not([data-slideshow]) { order: 1; }
}
