/* Uses the homepage's existing spacing, palette and heading styles. */
.lf-gallery {
  padding: var(--sp) 0;
  background: var(--white);
  scroll-margin-top: 80px;
}
.lf-gallery__head {
  margin-bottom: 52px;
}
.lf-gallery__head .section-label {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}
.lf-gallery [hidden] {
  display: none;
}
.lf-gallery__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  touch-action: pan-x pan-y;
}
.lf-gallery__viewport::-webkit-scrollbar {
  display: none;
}
.lf-gallery__track,
.lf-gallery__group {
  display: flex;
  width: max-content;
}
.lf-gallery__group {
  gap: clamp(16px, 2vw, 24px);
  padding-right: clamp(16px, 2vw, 24px);
  flex-shrink: 0;
}
.lf-gallery__item {
  display: block;
  flex: 0 0 clamp(260px, 32vw, 480px);
  width: clamp(260px, 32vw, 480px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: var(--off-white);
  cursor: zoom-in;
}
.lf-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.lf-gallery__item:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}
.lf-gallery__viewport:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.lf-gallery__dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: auto;
}
.lf-gallery__dialog::backdrop {
  background: rgba(7, 30, 61, 0.96);
}
.lf-gallery__lightbox {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 80px 88px;
}
.lf-gallery__figure {
  margin: 0;
  width: 100%;
  max-width: 1440px;
  text-align: center;
}
.lf-gallery__large {
  width: 100%;
  height: calc(100vh - 208px);
  height: calc(100dvh - 208px);
  object-fit: contain;
  border-radius: 3px;
}
.lf-gallery__counter {
  margin-top: 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--white);
}
.lf-gallery__error {
  margin-top: 12px;
  font-size: 14px;
  color: var(--gold-light);
}
.lf-gallery__control {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  font: inherit;
  line-height: 1;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  cursor: pointer;
  z-index: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.lf-gallery__control svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
@media (hover: hover) {
  .lf-gallery__control:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.14);
  }
}
.lf-gallery__control:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}
.lf-gallery__control:active {
  background: rgba(255, 255, 255, 0.2);
}
.lf-gallery__close {
  top: max(24px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
}
.lf-gallery__close svg {
  width: 22px;
  height: 22px;
}
@media (prefers-reduced-motion: reduce) {
  .lf-gallery__control { transition: none; }
}
.lf-gallery__prev,
.lf-gallery__next {
  top: calc(50% - 26px);
}
.lf-gallery__prev { left: 24px; }
.lf-gallery__next { right: 24px; }
.lf-gallery__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 767px) {
  .lf-gallery__item {
    flex-basis: 78vw;
    width: 78vw;
  }
  .lf-gallery__lightbox { padding: 80px 16px 112px; }
  .lf-gallery__large {
    height: calc(100vh - 240px);
    height: calc(100dvh - 240px);
  }
  .lf-gallery__prev,
  .lf-gallery__next {
    top: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
  }
  .lf-gallery__prev { left: calc(50% - 60px); }
  .lf-gallery__next { right: calc(50% - 60px); }
  .lf-gallery__close { top: 16px; right: 16px; }
}

