@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-color: #e65100;
  --text-dark: #2d3748;
  --text-light: #718096;
  --bg-color: #f8fafc;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
}

.gallery-page {
  padding-top: 80px;
}

/* Page Header */
.page-header {
  text-align: center;
  padding: 60px 20px 40px;
  background: white;
  border-bottom: 1px solid #edf2f7;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 0 0 10px;
}

.page-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin: 0;
}

/* Gallery Container */
.gallery-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px;
  color: var(--text-light);
}

.empty-state span {
  font-size: 4rem;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* Grid Layout */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #eee; /* Placeholder color */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  aspect-ratio: 4/3; /* Enforce uniform aspect ratio */
}

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

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

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

/* Hover Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.zoom-icon {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 10px;
  transform: scale(0.8);
  transition: transform 0.3s;
}

.gallery-item:hover .zoom-icon {
  transform: scale(1);
}

.caption {
  color: white;
  text-align: center;
  padding: 0 15px;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  transition: opacity 0.3s;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#lightbox-caption {
  color: #e2e8f0;
  margin-top: 15px;
  font-size: 1rem;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  transition: 0.2s;
}

.close-btn:hover {
  color: var(--primary-color);
}

/* Disable Selection Utility */
.no-copy {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .page-header h1 {
    font-size: 2rem;
  }
  .masonry-grid {
    grid-template-columns: 1fr;
  }
}
