/* Gallery specific styles to complement the modern site design */

/* Header spacing for gallery page */
.gallery-header {
  text-align: center;
  margin: 40px 0 20px;
  padding: 0 20px;
}

.gallery-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #333;
}

.gallery-header p {
  font-size: 18px;
  color: #555;
  max-width: 700px;
  margin: 0 auto;
}

/* Filter buttons */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 0 20px;
}

.gallery-filter button {
  background: #fff;
  border: 2px solid #007bff;
  color: #007bff;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.gallery-filter button:hover,
.gallery-filter button.active {
  background: #007bff;
  color: #fff;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  background: #fff;
}

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

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

.gallery-item .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 18px;
  letter-spacing: 1px;
}

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

/* Highlight active navigation link on gallery page */
.navbar-menu a.active {
  color: #007bff;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  width: 100%;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Control buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}

.lightbox-close {
  top: 10px;
  right: 10px;
  transform: none;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .gallery-item img {
    height: 160px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 22px;
    top: auto;
    bottom: 20px;
    transform: none;
    left: 20px;
    right: 20px;
  }
  .lightbox-prev {
    left: 20px;
    bottom: 20px;
  }
  .lightbox-next {
    right: 20px;
    bottom: 20px;
  }
}