.static-gallery {
  --gallery-accent: #fe8400;
  --gallery-interval: 5200ms;
  margin: 1.4rem 0 1.8rem;
  max-width: 100%;
  outline: 0;
  position: relative;
}

.static-gallery-stage {
  --gallery-bg: none;
  align-items: center;
  background: #e9e8e6;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(35, 35, 35, .13);
  display: flex;
  height: clamp(420px, 70vw, 560px);
  isolation: isolate;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}

.static-gallery-stage::before {
  background-image: var(--gallery-bg);
  background-position: center;
  background-size: cover;
  content: "";
  filter: blur(30px) saturate(.8);
  inset: -42px;
  opacity: .25;
  position: absolute;
  transform: scale(1.12);
  z-index: -2;
}

.static-gallery-stage::after {
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(245,245,245,.6) 50%, rgba(255,255,255,.78));
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.static-gallery-full {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  padding: clamp(15px, 4vw, 30px);
  width: 100%;
}

.static-gallery-image {
  display: block;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.2));
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  opacity: 1;
  transform: scale(1);
  transition: opacity .58s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  width: 100%;
}

.static-gallery-image.is-changing {
  animation: none;
  opacity: 0;
  transform: scale(.965);
}

.static-gallery-image.is-drifting {
  animation: static-gallery-drift var(--gallery-interval) ease-out both;
}

@keyframes static-gallery-drift {
  from { transform: scale(.985); }
  to { transform: scale(1.018); }
}

/* Navigation happens through autoplay, thumbnails, keyboard and swipe. */
.static-gallery-prev,
.static-gallery-next {
  display: none;
}

.static-gallery-status {
  backdrop-filter: blur(8px);
  background: rgba(25,25,25,.68);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  bottom: 14px;
  color: #fff;
  font-size: .82rem;
  letter-spacing: .02em;
  padding: .38rem .72rem;
  position: absolute;
  right: 14px;
  z-index: 3;
}

.static-gallery-progress {
  background: rgba(255,255,255,.35);
  bottom: 0;
  height: 3px;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  z-index: 4;
}

.static-gallery-progress::after {
  background: var(--gallery-accent);
  content: "";
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
}

.static-gallery-progress.is-running::after {
  animation: static-gallery-progress var(--gallery-interval) linear infinite;
}

@keyframes static-gallery-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.static-gallery-thumbs {
  display: flex;
  gap: .65rem;
  margin-top: .9rem;
  overflow-x: auto;
  padding: .3rem .15rem .85rem;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(99,99,100,.45) transparent;
  scrollbar-width: thin;
}

.static-gallery-thumb {
  background: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,.09);
  cursor: pointer;
  flex: 0 0 76px;
  height: 58px;
  opacity: .58;
  overflow: hidden;
  padding: 3px;
  scroll-snap-align: center;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease;
}

.static-gallery-thumb img {
  border-radius: 7px;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.static-gallery-thumb:hover,
.static-gallery-thumb:focus-visible {
  box-shadow: 0 7px 18px rgba(0,0,0,.17);
  opacity: .9;
  outline: 2px solid rgba(254,132,0,.55);
  outline-offset: 2px;
  transform: translateY(-2px);
}

.static-gallery-thumb.is-active {
  box-shadow: 0 7px 18px rgba(0,0,0,.2);
  opacity: 1;
  outline: 3px solid var(--gallery-accent);
  outline-offset: 1px;
  transform: translateY(-2px);
}

.static-gallery:focus-visible {
  outline: 2px solid var(--gallery-accent);
  outline-offset: 5px;
}

@media (max-width: 700px) {
  .static-gallery-stage {
    border-radius: 14px;
    height: clamp(410px, 112vw, 500px);
  }

  .static-gallery-full {
    padding: 14px;
  }

  .static-gallery-status {
    bottom: 11px;
    right: 11px;
  }

  .static-gallery-thumb {
    flex-basis: 70px;
    height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .static-gallery-image,
  .static-gallery-thumb,
  .static-gallery-thumbs {
    animation: none !important;
    scroll-behavior: auto;
    transition: none;
  }

  .static-gallery-progress {
    display: none;
  }
}
