.gallery-preview-section {
  margin: 42px 0;
}

.gallery-preview-section--landing {
  margin-top: 0;
}

.gallery-preview-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(12, 18, 36, 0.92), rgba(7, 10, 20, 0.9));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.gallery-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
}

.gallery-preview-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.gallery-preview-head p {
  margin: 6px 0 0;
}

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

.gallery-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.gallery-thumb::after {
  content: "크게 보기";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.gallery-thumb:hover::after,
.gallery-thumb:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
  transform: scale(1.05);
  filter: brightness(0.82);
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

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

.gallery-lightbox__figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  margin: 0;
}

.gallery-lightbox__image-wrap {
  position: relative;
  display: block;
  max-width: 100%;
  max-height: 82vh;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  border-radius: 22px;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.gallery-lightbox__caption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 14px;
}

.gallery-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.76);
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.gallery-lightbox__close::before,
.gallery-lightbox__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  transform-origin: center;
}

.gallery-lightbox__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.gallery-lightbox__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.gallery-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .gallery-preview-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .gallery-preview-head {
    display: block;
  }

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

  .gallery-lightbox {
    padding: 18px;
  }

  .gallery-lightbox__image {
    border-radius: 18px;
  }

  .gallery-lightbox__close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .gallery-lightbox__close::before,
  .gallery-lightbox__close::after {
    width: 17px;
    height: 3px;
  }
}
