/* Gallery page styles — load after styles.css */

.gallery-section {
  padding-top: 110px;
  padding-bottom: 60px;
}

.gallery-section h1 {
  text-align: center;
  margin-bottom: 8px;
}

.gallery-intro {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 36px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--secondary);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: var(--text);
  padding: 12px 14px 10px;
  font-size: 0.9rem;
  line-height: 1.3;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4000;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 96%;
  max-height: 96vh;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.lightbox-caption {
  color: var(--text);
  margin-top: 12px;
  font-size: 1rem;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: white;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
}

/* Optional: highlight active nav link */
.desktop-nav a.active {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery-item img {
    height: 160px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 32px;
  }
}