/* Home-page slideshow based on the institute's reference slider.
   Colours are supplied by the central design system. */
.home-slideshow-section {
  padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 2vw, 1.75rem);
  background: var(--color-bg-surface);
}
.home-slideshow {
  position: relative;
  max-width: 1320px;
  width: 100%;
  aspect-ratio: 1320 / 650;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-brand-primary-dark);
  box-shadow: var(--shadow-3d-card-light);
  perspective: 1000px;
  isolation: isolate;
}
/* A distinct fade-in through the slideshow background: the outgoing image
   disappears first, then the new image fades in. This intentionally differs
   from a cross-dissolve, which looks the same whether it is described as
   fading the old image out or fading the new image in. */
.home-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}
.home-slide.is-active {
  z-index: 1;
  opacity: 1;
  animation: slideshow-fade-in 1.35s ease-in-out 0.65s both;
}
.home-slide.is-exiting {
  z-index: 2;
  opacity: 0;
  animation: slideshow-fade-out 0.65s ease-in-out both;
}
@keyframes slideshow-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes slideshow-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.home-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-slide--banner {
  background: var(--gradient-hero-mesh);
}
.home-slide--banner img {
  object-fit: contain;
  padding: clamp(1rem, 4vw, 3rem);
}
.home-slide-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-white-25);
  border-radius: 50%;
  background: var(--color-bg-glass-darker);
  color: var(--color-ivory-pure);
  box-shadow: var(--shadow-3d-icon);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.home-slide-control:hover { background: var(--color-brand-primary); transform: translateY(-50%) scale(1.06); }
.home-slide-control:focus-visible, .home-slide-dot:focus-visible, .home-slide-play:focus-visible {
  outline: 3px solid var(--color-ivory-pure);
  outline-offset: 3px;
}
.home-slide-control--prev { left: clamp(0.5rem, 1.3vw, 1rem); }
.home-slide-control--next { right: clamp(0.5rem, 1.3vw, 1rem); }
.home-slide-navigation {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(0.4rem, 1.2vw, 1rem);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 1rem);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--color-bg-glass-darker);
}
.home-slide-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.home-slide-dot::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-white-45);
  transition: background 0.2s ease, transform 0.2s ease;
}
.home-slide-dot[aria-current="true"]::after { background: var(--color-ivory-pure); transform: scale(1.25); }
.home-slide-play {
  flex: 0 0 auto;
  min-width: 38px;
  min-height: 36px;
  padding: 0 0.4rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-ivory-pure);
  font-size: 1rem;
  cursor: pointer;
}
@media (max-width: 767.98px) {
  .home-slideshow { aspect-ratio: 4 / 3; }
  .home-slide-dot { width: 20px; }
  .home-slide-dot::after { width: 8px; height: 8px; }
  .home-slide-play { min-width: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-slide, .home-slide-control, .home-slide-dot::after { transition: none; }
  .home-slide.is-active, .home-slide.is-exiting { animation: none; }
}
