/* ========================
   GALERIA PAGE
======================== */

/* Active nav link */
.nav__active {
  color: var(--yellow) !important;
}
.nav__active::after {
  transform: scaleX(1) !important;
}

/* ========================
   HERO GALERIA
======================== */
.gal-hero {
  min-height: 70vh;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 80px 80px;
  position: relative;
  overflow: hidden;
}

/* Huge decorative background text */
.gal-hero::before {
  content: 'GALERIA';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 900;
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -4px;
}

/* Dot grid */
.gal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

.gal-hero__content {
  position: relative;
  z-index: 2;
}

.gal-hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -3px;
  margin-bottom: 24px;
}
.gal-hero__title em {
  font-style: italic;
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
  display: block;
}

.gal-hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  line-height: 1.75;
}

.gal-hero__scroll {
  position: absolute;
  right: 80px;
  bottom: 60px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.3);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: scroll-hint 2.5s ease-in-out infinite;
}
@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(6px); opacity: 0.6; }
}

/* ========================
   GALLERY SECTION
======================== */
.gallery-section {
  background: var(--black);
  padding: 80px 80px 120px;
}

.gallery-intro {
  max-width: 680px;
  margin: 0 auto 72px;
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
  line-height: 1.85;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* ========================
   MASONRY-STYLE GRID
======================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 280px;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.gal-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark-2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gal-item--tall {
  grid-row: span 2;
}
.gal-item--wide {
  grid-column: span 2;
}

/* Image */
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
.gal-item:hover img {
  transform: scale(1.06);
}

/* Placeholder (remove when adding real photos) */
.gal-placeholder {
  width: 100%;
  height: 100%;
  background: var(--dark-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border: 1px solid rgba(255,255,255,0.04);
  transition: background 0.3s;
}
.gal-item:hover .gal-placeholder {
  background: var(--dark-2);
}

/* Overlay on hover */
.gal-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 20px 20px;
}
.gal-item:hover .gal-item__overlay {
  opacity: 1;
}
.gal-item__overlay span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  background: rgba(240,216,48,0.2);
  border: 1px solid rgba(240,216,48,0.4);
  border-radius: 2px;
  padding: 4px 10px;
}

/* Corner accent line */
.gal-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width 0.35s var(--ease);
  z-index: 3;
}
.gal-item:hover::before {
  width: 100%;
}

/* Reveal stagger */
.gal-item.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.gal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   LIGHTBOX
======================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.lightbox.open {
  display: flex;
}

.lightbox__img-wrap {
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img-wrap img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}
.lightbox__img-wrap .lb-placeholder {
  width: 60vw;
  height: 60vh;
  background: var(--dark-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.lightbox__close {
  position: absolute;
  top: 28px; right: 32px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.lightbox__close:hover { color: var(--white); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 2.5rem;
  line-height: 1;
  width: 56px; height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.lightbox__prev { left: 32px; }
.lightbox__next { right: 32px; }
.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.lightbox__counter {
  position: absolute;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
  }
  .gal-hero { padding: 0 48px 72px; }
  .gallery-section { padding: 60px 48px 100px; }
}

@media (max-width: 768px) {
  .gal-hero { padding: 0 28px 60px; min-height: 60vh; }
  .gal-hero__scroll { display: none; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 8px;
  }
  .gal-item--wide { grid-column: span 1; }
  .gallery-section { padding: 48px 20px 80px; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
  }
  .gal-item--tall { grid-row: span 1; }
}

/* ── loader / empty ── */
.gal-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}
.gal-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(240,216,48,0.15);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gal-empty {
  text-align: center;
  color: rgba(255,255,255,0.3);
  padding: 80px 40px;
  font-size: 1rem;
}

/* ── video thumbnail ── */
.gal-video-thumb {
  position: relative;
  width: 100%; height: 100%;
}
.gal-video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gal-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: background 0.2s;
}
.gal-item:hover .gal-play-btn {
  background: rgba(0,0,0,0.55);
}
.gal-play-btn svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
