.gallery-page {
  padding-bottom: 72px;
}

.gallery-page .gallery-content {
  width: min(1208px, 92%);
  margin: 0 auto;
}

.gallery-page .gallery-case-section {
  padding-top: 48px;
}

.gallery-page .gallery-case-section__lead {
  margin: 0 auto 30px;
  max-width: 760px;
  color: #4a3f37;
  font-size: 15px;
  line-height: 1.8;
  text-align: center;
}

.gallery-page .gallery-case {
  margin: 0 auto;
  max-width: 980px;
  padding: 32px 18px 18px;
  background: #fff;
}

.gallery-page .gallery-case__header {
  text-align: center;
}

.gallery-page .gallery-case__title {
  margin: 0;
  color: #D7250C;
  font-size: 42px;
  line-height: 1.2;
  font-weight: 700;
}

.gallery-page .gallery-case__viewer {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-top: clamp(54px, 8vw, 110px);
}

.gallery-page .gallery-case__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  background: transparent;
  color: #4d4d4d;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.gallery-page .gallery-case__arrow:focus-visible {
  outline: 2px solid #D7250C;
  outline-offset: 2px;
}

.gallery-page .gallery-case__main {
  position: relative;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  isolation: isolate;
  overflow: visible;
  padding: 0 0 8px;
}

.gallery-page .gallery-case__photo {
  position: relative;
  border-radius: 8px;
}

.gallery-page .gallery-case__main::before {
  content: "";
  position: absolute;
  inset: -26px;
  border-radius: 24px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 142, 58, 0.7) 0%,
    rgba(255, 175, 104, 0.46) 52%,
    rgba(255, 214, 189, 0.16) 76%,
    rgba(255, 214, 189, 0) 100%
  );
  filter: blur(13px);
  opacity: 0.72;
  z-index: -1;
  pointer-events: none;
}

.gallery-page .gallery-case__main img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-page .gallery-case__main figcaption {
  margin-top: 8px;
  text-align: center;
  color: #666;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
}

.gallery-page .gallery-case__thumbs {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.gallery-page .gallery-case__thumb {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.gallery-page .gallery-case__thumb.is-active {
  border-color: #D7250C;
}

.gallery-page .gallery-case__thumb:focus-visible {
  outline: 2px solid #D7250C;
  outline-offset: 1px;
}

.gallery-page .gallery-case__thumb img {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .gallery-page .gallery-case {
    padding: 24px 14px 14px;
  }

  .gallery-page .gallery-case__title {
    font-size: 34px;
  }

  .gallery-page .gallery-case__viewer {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .gallery-page .gallery-case__arrow {
    width: 32px;
    height: 32px;
    font-size: 30px;
  }

  .gallery-page .gallery-case__thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .gallery-page .gallery-case-section {
    padding-top: 34px;
  }

  .gallery-page .gallery-case-section__lead {
    margin-bottom: 22px;
    text-align: left;
    font-size: 14px;
  }

  .gallery-page .gallery-case__title {
    font-size: 30px;
  }

  .gallery-page .gallery-case__main {
    padding: 0 0 6px;
  }

  .gallery-page .gallery-case__thumbs {
    gap: 6px;
  }

  .gallery-page .gallery-case__main::before {
    inset: -16px;
    filter: blur(9px);
  }
}
