.subpage-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.5rem;
}

.offer-nav {
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer-nav li {
  margin-bottom: 0.45rem;
}

.offer-nav a {
  color: #888;
  font-size: 0.8rem;
  text-decoration: none;
}

.offer-nav a:hover,
.offer-nav a.active {
  color: #9b638b;
}

.subpage-content {
  min-width: 0;
}

.subpage-intro,
.service-list {
  max-width: 520px;
  color: #777;
  font-size: 0.8rem;
  line-height: 1.5;
}

.subpage-heading {
  margin: 1rem 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.service-list {
  padding-left: 1.1rem;
}

.photo-gallery {
  width: min(100%, 540px);
  margin: 1.5rem auto 0;
}

.gallery-stage {
  position: relative;
  display: grid;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 0.65rem;
  background: #f0f0f0;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.gallery-control,
.gallery-zoom,
.lightbox-close,
.lightbox-control {
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgb(20 20 20 / 55%);
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease;
}

.gallery-control {
  position: absolute;
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-50%);
}

.gallery-prev { left: 0.7rem; }
.gallery-next { right: 0.7rem; }

.gallery-stage:hover .gallery-control,
.gallery-stage:focus-within .gallery-control {
  opacity: 1;
}

.gallery-zoom {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
}

.gallery-control:hover,
.gallery-zoom:hover,
.lightbox-close:hover,
.lightbox-control:hover {
  background: rgb(20 20 20 / 85%);
}

.gallery-thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.2rem 0.1rem 0.5rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 3.5rem;
  height: 2.5rem;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  background: #eee;
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: #8bcf43;
  box-shadow: 0 0 0 2px rgb(139 207 67 / 20%);
}

.gallery-caption {
  margin: 0.5rem auto 0;
  color: #398bb5;
  font-size: 0.75rem;
  text-align: center;
}

.gallery-lightbox {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(0 0 0 / 88%);
}

.gallery-lightbox.is-open {
  display: flex;
}

.lightbox-image {
  max-width: min(88vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-control {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.8rem;
}

.lightbox-control {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (hover: none) {
  .gallery-control {
    opacity: 1;
  }
}

@media (max-width: 767.98px) {
  .subpage-layout {
    padding: 0.5rem 0.75rem 2rem;
  }

  .subpage-sidebar {
    margin-bottom: 1rem;
  }

  .offer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #eee;
  }

  .offer-nav li {
    margin: 0;
  }

  .photo-gallery {
    margin-top: 1rem;
  }

  .gallery-stage {
    min-height: 0;
    border-radius: 0.45rem;
  }

  .gallery-control {
    width: 2.25rem;
    height: 2.25rem;
  }

  .lightbox-image {
    max-width: 100%;
    max-height: 82vh;
  }

  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}
