/* ============================================
   ORION IPJ — Gallery Page (gallery.css)
   ============================================ */

/* ─── PAGE HEADER ─── */
.page-header {
  background: var(--navy);
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.png') center/cover;
  opacity: 0.15;
}

.page-header .container { position: relative; z-index: 1; }

.page-header h1 {
  font-family: Montserrat;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeUp 0.8s ease both;
}

.page-header p {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  animation: fadeUp 0.8s ease 0.15s both;
}

/* ─── GALLERY SECTION ─── */
.gallery-section {
  background: var(--white);
  padding: 80px 0;
}

/* ─── GALLERY GRID ─── */
/* Default: 3 columns on desktop */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ─── GALLERY ITEM ─── */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--light-gray);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

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

/* ─── HOVER OVERLAY ─── */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 85, 125, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-zoom {
  color: var(--white);
  font-size: 36px;
  line-height: 1;
}

/* ─── LIGHTBOX OVERLAY ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

/* Dark backdrop */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

/* Lightbox image container */
.lightbox-content {
  position: relative;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  display: block;
}

/* Photo counter e.g. "3 / 11" */
.lightbox-counter {
  margin-top: 14px;
  font-family: Montserrat;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
}

/* Close button */
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 2002;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Prev / Next arrow buttons */
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2002;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  font-size: 36px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  line-height: 1;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.25);
}

/* ─── RESPONSIVE — TABLET (max 900px) ─── */
@media (max-width: 900px) {
  .page-header { padding: 120px 0 60px; }

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

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

/* ─── RESPONSIVE — MOBILE (max 600px) ─── */
@media (max-width: 600px) {
  .page-header { padding: 110px 0 48px; }

  .gallery-section { padding: 56px 0; }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}
