/* Gallery Styling */

.gallery-section {
  padding: 3rem 0;
  background-image: url('/images/Background_Artwork-small.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #11111160;
}

.gallery-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
  font-weight: 700;
}

.gallery-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  color: #ffffff;
  line-height: 1.6;
}

.gallery-container {
  width: 100%;
}

.gallery-folder {
  margin-bottom: 4rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-header h2 {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.gallery-description {
  color: #ffffff;
  font-size: 1.2rem;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 1.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.gallery-item {
  background: rgba(33, 33, 33, 0.95);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

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

.gallery-caption {
  padding: 1rem;
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
  text-align: center;
}

/* Modal Lightbox */
.gallery-modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gallery-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.gallery-modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gallery-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.gallery-modal-close:hover {
  color: #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-title {
    font-size: 1.8rem;
  }

  .gallery-header h2 {
    font-size: 1.3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .gallery-section {
    padding: 2rem 1rem;
  }

  .gallery-modal-content {
    max-width: 95%;
    max-height: 95%;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .gallery-item:hover {
    transform: none;
  }

  .gallery-image:hover {
    transform: none;
  }
}
