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

.gallery-page__intro-card,
.gallery-block {
  border-radius: 28px;
  background: rgba(244, 241, 234, 0.96);
  border: 1px solid rgba(36, 53, 29, 0.08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

.gallery-page__intro-card {
  padding: 34px;
}

.gallery-page__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #5f7751;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-page__intro-card h1 {
  margin: 0 0 14px;
  color: #24351d;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 0.94;
}

.gallery-page__intro-card p {
  margin: 0;
  max-width: 58ch;
  color: #4f5a53;
  font-size: 1rem;
  line-height: 1.7;
}

.gallery-page__lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.gallery-block {
  padding: 28px;
}

.gallery-block--top {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.gallery-block__header {
  margin-bottom: 18px;
}

.gallery-block__header h2 {
  margin: 0;
  color: #24351d;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 2.8vw, 3rem);
  font-weight: 700;
  line-height: 0.95;
}

.gallery-block__empty {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #24351d;
  border: 1px solid rgba(36, 53, 29, 0.08);
}

.gallery-hero {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(36, 53, 29, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
}

.gallery-hero__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-hero__media::after {
  content: "Click to enlarge";
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(18, 24, 20, 0.72);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  color: #f4f1ea;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.gallery-hero__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-hero:hover .gallery-hero__media img,
.gallery-hero:focus-within .gallery-hero__media img {
  transform: scale(1.02);
}

.gallery-thumbs-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.gallery-thumbs-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(36, 53, 29, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #24351d;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.gallery-thumbs-nav:hover,
.gallery-thumbs-nav:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
}

.gallery-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(36, 53, 29, 0.35) rgba(36, 53, 29, 0.08);
}

.gallery-thumbs::-webkit-scrollbar {
  height: 10px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: rgba(36, 53, 29, 0.08);
  border-radius: 999px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(36, 53, 29, 0.35);
  border-radius: 999px;
}

.gallery-thumbs::-webkit-scrollbar-thumb:hover {
  background: rgba(36, 53, 29, 0.5);
}

.gallery-thumb {
  position: relative;
  flex: 0 0 170px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(36, 53, 29, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, opacity 0.24s ease;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible,
.gallery-thumb.is-active {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.09);
  border-color: rgba(48, 71, 35, 0.28);
}

.gallery-thumb.is-active {
  box-shadow: 0 0 0 2px rgba(48, 71, 35, 0.12), 0 14px 26px rgba(0, 0, 0, 0.09);
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-thumb::after {
  content: "View";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: rgba(18, 24, 20, 0.68);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  color: #f4f1ea;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 12, 0.72);
  backdrop-filter: blur(6px);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  margin: 4vh auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(244, 241, 234, 0.98);
  border: 1px solid rgba(36, 53, 29, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.gallery-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #24351d;
  color: #f4f1ea;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__image {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 16px;
  background: #e8e3da;
}

@media (max-width: 900px) {
  .gallery-page__lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .gallery-page__intro-card,
  .gallery-block {
    padding: 22px;
  }

  .gallery-page__intro-card h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
  }

  .gallery-thumbs-wrap {
    grid-template-columns: 1fr;
  }

  .gallery-thumbs-nav {
    display: none;
  }

  .gallery-thumb {
    flex-basis: 150px;
  }

  .gallery-hero__media::after {
    right: 12px;
    bottom: 12px;
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    font-size: 0.88rem;
  }

  .gallery-thumb::after {
    right: 8px;
    bottom: 8px;
    min-height: 26px;
    padding: 0.32rem 0.56rem;
    font-size: 0.76rem;
  }

  .gallery-lightbox__dialog {
    width: min(94vw, 1100px);
    margin: 3vh auto;
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .gallery-page__intro-card,
  .gallery-block {
    padding: 18px;
  }

  .gallery-block__header h2 {
    font-size: 2rem;
  }

  .gallery-thumb {
    flex-basis: 132px;
  }
}