/* ============================================================
   gallery.css — 포토 갤러리 + Lightbox
   럭셔리 미니멀리즘: 보더리스, 부드러운 전환, 넉넉한 여백
   ============================================================ */

/* ── 갤러리 섹션 ── */
.gallery-section {
  padding: 60px 0 140px;
}

/* ── Masonry 그리드 ── */
.gallery-masonry {
  column-count: 3;
  column-gap: 12px;
}

/* ── 갤러리 아이템 ── */
.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  animation: fadeUp 0.5s ease both;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* 호버 오버레이 (미니멀) */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay-category {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gallery-overlay-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Lightbox (럭셔리 다크) ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

/* 닫기 버튼 */
.lightbox-close {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 48px; height: 48px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-close:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* 이전/다음 버튼 */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-nav:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

/* 이미지 */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  user-select: none;
}

/* 하단 정보 */
.lightbox-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 0;
  width: 100%;
  max-width: 600px;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.01em;
}

.lightbox-counter {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
}

/* ── 반응형 ── */
@media (max-width: 960px) {
  .gallery-masonry { column-count: 2; column-gap: 10px; }
}

@media (max-width: 640px) {
  .gallery-masonry { column-count: 2; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; }

  .lightbox-nav { width: 44px; height: 44px; font-size: 1.1rem; }
  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }
  .lightbox-close { top: 16px; right: 16px; width: 40px; height: 40px; }
}
