/* ─── GALLERY HERO ─────────────────────── */
#gallery-hero {
  background: #ffffff;
  padding: 80px 5vw 48px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.gallery-title {
  font-family: var(--f-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: #1A1F2B;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.gallery-sub {
  font-size: 16px;
  color: #7A8096;
  line-height: 1.6;
}

/* ─── GALLERY SECTION ─────────────────────── */
#gallery-section {
  background: #F0F2F7;
  padding: 56px 5vw 80px;
  min-height: 60vh;
}

/* ─── GALLERY GRID ─────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto 48px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4 / 3;
  background: #D1D5DB;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  z-index: 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* hover overlay — subtle dark tint, no icon */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,14,19,0.25);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* loading placeholder */
.gallery-item.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9AA0B0;
  font-size: 13px;
}

/* ─── PAGINATION ─────────────────────── */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #ffffff;
  color: #4A5568;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--f-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gallery-page-btn:hover {
  background: rgba(215,43,43,0.08);
  border-color: var(--c-red);
  color: var(--c-red);
}
.gallery-page-btn.active {
  background: var(--c-red);
  border-color: var(--c-red);
  color: #ffffff;
}
.gallery-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.gallery-page-dots {
  color: #7A8096;
  font-size: 14px;
  padding: 0 4px;
  display: flex;
  align-items: center;
}

/* ─── LIGHTBOX ─────────────────────── */
#gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#gallery-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 85vh;
}

#lbImg {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  transition: opacity 0.2s ease;
}

#lbImg.fading { opacity: 0; }

/* Close button */
.lb-close {
  position: absolute;
  top: 18px; right: 20px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
}
.lb-close:hover { background: var(--c-red); border-color: var(--c-red); }

/* Arrow buttons */
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
  padding-bottom: 2px;
}
.lb-arrow:hover { background: var(--c-red); border-color: var(--c-red); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-arrow:disabled { opacity: 0.2; cursor: not-allowed; }

/* Caption */
.lb-caption {
  position: absolute;
  bottom: 52px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
}

/* Counter */
.lb-counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ─── RESPONSIVE ─────────────────────── */
@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-arrow { width: 40px; height: 40px; font-size: 26px; }
}

@media (max-width: 480px) {
  #gallery-hero { padding: 60px 6vw 36px; }
  #gallery-section { padding: 36px 4vw 60px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lb-caption { white-space: normal; text-align: center; width: 80vw; bottom: 48px; }
}