/* Page Header - Consistent across pages */
.page-header {
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: var(--surface-color);
  margin-top: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.page-header h1 {
  font-size: 3rem;
  background: var(--header-bg);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Gallery container */
.gallery-container {
  max-width: 1400px;
  margin: 0 auto 3rem;
  padding: 2rem 3rem;
}

/* Masonry gallery */
.gallery {
  column-count: 4;
  column-gap: 20px;
}

.gallery-item {
  break-inside: avoid;
  background-color: var(--surface-color);
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  padding: 40px;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  background: rgba(255, 255, 255, 0.03);
}

/* Buttons */
.close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  color: var(--white);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.prev-btn {
  left: -80px;
  height: 60px;
  width: 30px;
}

.next-btn {
  right: -80px;
  height: 60px;
  width: 30px;
}

.nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.05);
}

.image-counter {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--white);
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

/* Loading animation (kept if you use it) */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .gallery {
    column-count: 3;
  }

  .modal-content {
    max-width: 800px;
    height: 75vh;
  }
}

@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }

  .gallery-container {
    padding: 0 1.5rem 2.5rem;
  }

  .modal-content {
    max-width: 700px;
    height: 70vh;
  }

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

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

@media (max-width: 600px) {
  .gallery {
    column-count: 1;
    padding: 0;
  }

  .gallery-container {
    padding: 0 1rem 2rem;
  }

  .modal {
    padding: 20px;
  }

  .modal-content {
    max-width: 100%;
    height: 65vh;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .close-btn {
    top: 10px;
    right: 10px;
  }

  .image-counter {
    bottom: 10px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
  }

  .modal-content {
    height: 60vh;
  }
}
