.gallery-page-hero {
  min-height: 58vh;
  position: relative;
  display: flex;
  align-items: center;
  background: url('/assets/img/jpg4.webp') center 32% / cover no-repeat;
  background-position: center calc(28% + 100px);
  overflow: hidden;
}

.gallery-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.gallery-page-hero .container {
  position: relative;
  z-index: 1;
}

.gallery-page-hero .bp-heading,
.gallery-page-hero .bp-lead {
  color: #fff;
}

.gallery-shell {
  background: linear-gradient(180deg, #f8f6f1 0%, #ffffff 24%);
}

.gallery-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--bp-sage) 15%, transparent);
  box-shadow: 0 18px 38px rgba(101, 112, 88, 0.18);
  background: #ecefe7;
}

.gallery-main {
  position: relative;
  min-height: 66vh;
  max-height: 860px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6), transparent 48%),
    #ecefe7;
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  mix-blend-mode: multiply;
  transform: scale(1.01);
}

.gallery-main::after {
  content: '';
  overflow: hidden;
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.06) 32%, transparent 65%);
  pointer-events: none;
}

.gallery-main-caption {
  position: absolute;
  left: 1.2rem;
  top: 1.1rem;
  z-index: 2;
  font-family: var(--bp-serif);
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, #0c1a54 80%, #000 20%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.gallery-thumbs-wrap {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  border-top: 1px solid color-mix(in srgb, var(--bp-sage) 14%, transparent);
  padding: 0.55rem;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.55rem;
}

.gallery-thumb {
  appearance: none;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
  outline: none;
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: saturate(0.96);
}

.gallery-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(101, 112, 88, 0.2);
}

.gallery-thumb.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in srgb, var(--bp-sage) 78%, #000 22%);
}

.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 17, 0.22);
  opacity: 1;
  transition: opacity 0.22s ease;
}

.gallery-thumb.is-active::after,
.gallery-thumb:hover::after {
  opacity: 0;
}

.gallery-thumb:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in srgb, var(--bp-sage) 78%, #000 22%);
}

@media (max-width: 1200px) {
  .gallery-thumbs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .gallery-page-hero {
    min-height: 48vh;
    padding-top: 88px;
    padding-bottom: 40px;
    background-position: center center !important;
  }

  .gallery-main {
    min-height: 52vh;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .gallery-main {
    min-height: 44vh;
  }

  .gallery-main-caption {
    font-size: 2rem;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
