/*-----------------------------------*\
  #GALLERY PAGE
\*-----------------------------------*/
.gallery-section {
  width: 100%;
  padding: 160px 0 40px 0;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #fffdf9 0%, #fffaf4 100%);
}

.gallery-page-container {
  width: 100%;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

.gallery-page-title-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.gallery-page-title {
  font-size: 56px;
  line-height: 56px;
  font-weight: var(--semiBold);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.gallery-page-subtitle {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
  max-width: 480px;
  text-align: center;
}

.gallery-page-filter-row {
  width: 100%;
  padding: 20px 0;
  border-top: 1px solid var(--border-01);
  border-bottom: 1px solid var(--border-01);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.gallery-page-filter-row::-webkit-scrollbar {
  display: none;
}

.gallery-page-filter {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 22px;
  line-height: 30px;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.25s ease;
  background-color: transparent;
  outline: none;
}

.gallery-page-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background-color: var(--text-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.gallery-page-filter.is-active,
.gallery-page-filter:is(:hover, :focus-visible) {
  color: var(--text-dark);
  font-weight: var(--semiBold);
}

.gallery-page-filter.is-active::after,
.gallery-page-filter:is(:hover, :focus-visible)::after {
  transform: scaleX(1);
}

.gallery-page-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-page-card {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: #eadfce;
  height: 500px;
}

.gallery-page-card.is-short {
  height: 300px;
}

.gallery-page-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.gallery-page-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 251, 246, 0) 0%,
    rgba(76, 43, 1, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-page-card:is(:hover, :focus-visible) .gallery-page-image {
  transform: scale(1.04);
  filter: saturate(1.03) contrast(1.02);
}

.gallery-page-card:is(:hover, :focus-visible)::after {
  opacity: 1;
}

.gallery-page-card.is-hidden {
  display: none;
}

.gallery-empty-state {
  grid-column: 1 / -1;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #eadfce;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.gallery-page-cta {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.gallery-page-cta-title {
  font-size: 56px;
  line-height: 56px;
  font-weight: var(--semiBold);
  color: var(--text-primary);
  text-transform: uppercase;
}

.gallery-page-cta-copy {
  font-size: 16px;
  line-height: 24px;
  color: #6d5230;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(18, 10, 2, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
  z-index: 1200;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox-stage {
  width: 100%;
  max-width: 1200px;
  max-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  display: block;
  object-fit: contain;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  position: absolute;
  border: none;
  background: var(--background-beige);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  backdrop-filter: blur(12px);
  border: solid 2px var(--text-primary);
  outline: none;
}

.gallery-lightbox-close:is(:hover, :focus-visible),
.gallery-lightbox-nav:is(:hover, :focus-visible) {
  background: var(--white);
  transform: scale(1.04);
}

.gallery-lightbox-close {
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
}

.gallery-lightbox-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -28px;
  font-size: 40px;
  line-height: 1;
}

.gallery-lightbox-prev {
  left: 24px;
}

.gallery-lightbox-next {
  right: 24px;
}

@media (max-width: 1320px) {
  .gallery-page-container {
    width: calc(100% - 80px);
  }
}

@media (max-width: 1080px) {
  .gallery-page-container {
    width: calc(100% - 96px);
  }
}

@media (max-width: 970px) {
  .gallery-section {
    padding: 128px 0 96px;
  }

  .gallery-page-container {
    width: calc(100% - 64px);
    gap: 48px;
  }

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

  .gallery-page-card,
  .gallery-page-card.is-short {
    height: 360px;
  }

  .gallery-lightbox {
    padding: 24px;
  }
}

@media (max-width: 700px) {
  .gallery-section {
    padding: 112px 0 80px;
  }

  .gallery-page-container {
    width: calc(100% - 40px);
    gap: 32px;
  }

  .gallery-page-title {
    font-size: 40px;
    line-height: 46px;
  }

  .gallery-page-subtitle {
    font-size: 15px;
    line-height: 24px;
  }

  .gallery-page-filter-row {
    width: 100vw;
    justify-content: center;
    gap: 28px;
    padding: 16px 0;
  }

  .gallery-page-filter:last-child {
    margin-right: 20px;
  }

  .gallery-page-grid {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    gap: 4px;
  }

  .gallery-page-card,
  .gallery-page-card.is-short {
    height: 220px;
  }

  .gallery-page-cta-title {
    font-size: 36px;
    line-height: 40px;
  }

  .gallery-lightbox {
    padding: 16px;
  }

  .gallery-lightbox-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .gallery-lightbox-nav {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    font-size: 30px;
  }

  .gallery-lightbox-prev {
    left: 12px;
  }

  .gallery-lightbox-next {
    right: 12px;
  }
}

@media (max-width: 500px) {
  .gallery-section {
    padding: 140px 0 64px;
  }

  .gallery-page-container {
    width: calc(100% - 32px);
    gap: 28px;
  }

  .gallery-page-title {
    font-size: 32px;
    line-height: 30px;
    letter-spacing: 2%;
  }

  .gallery-page-subtitle,
  .gallery-page-cta-copy {
    font-size: 14px;
    line-height: 22px;
  }

  .gallery-page-filter-row {
    gap: 24px;
  }

  .gallery-page-filter {
    font-size: 16px;
    line-height: 16px;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-page-filter::after {
    bottom: 0;
  }

  .gallery-page-filter:last-child {
    margin-right: 16px;
  }

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

  .gallery-page-card,
  .gallery-page-card.is-short {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .gallery-page-cta {
    margin-top: 40px;
    gap: 20px;
  }

  .gallery-page-cta-title {
    font-size: 30px;
    line-height: 36px;
  }
}
