/* ===================================
   Gallery Page Styles
   =================================== */

/* --- Gallery Header --- */
.gallery-header {
  position: relative;
  padding: 120px 0 50px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border-neon);
}

.gallery-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 32px;
  transition: color var(--transition);
}

.gallery-back-link:hover {
  color: var(--neon-green);
}

.gallery-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.gallery-title-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--neon-green-glow);
}

/* --- Gallery Main --- */
.gallery-main {
  background: var(--bg-dark);
  padding: 50px 0 100px;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-neon);
  transition: all var(--transition);
  aspect-ratio: 1;
}

.gallery-item:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.12);
  transform: scale(1.02);
}

.gallery-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.gallery-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--neon-green);
  border-radius: 50%;
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green);
  box-shadow: 0 0 20px var(--neon-green-glow);
  transition: all var(--transition);
}

.gallery-zoom svg {
  width: 24px;
  height: 24px;
}

.gallery-zoom:hover {
  background: var(--neon-green);
  color: var(--bg-dark);
}

/* --- Gallery Lightbox --- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.gallery-lightbox-image-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border-neon);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-neon);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.gallery-lightbox-close:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 15px var(--neon-green-glow);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 50px;
  height: 50px;
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--border-neon);
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.gallery-lightbox-nav:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 15px var(--neon-green-glow);
  background: rgba(0, 255, 65, 0.1);
}

.gallery-lightbox-prev {
  left: 20px;
}

.gallery-lightbox-next {
  right: 20px;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-main {
    padding: 30px 0 70px;
  }

  .gallery-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-lightbox-prev {
    left: 10px;
  }

  .gallery-lightbox-next {
    right: 10px;
  }

  .gallery-image img {
    border-radius: 0;
  }

  .gallery-item {
    border-radius: 0;
  }
}
