.gallery-container {
  padding: 40px;
  background-color: var(--background-color);
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-intro {
  text-align: center;
  margin-bottom: 60px;
}

.gallery-intro h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.gallery-intro p {
  font-size: 1.2rem;
  color: var(--secondary-color);
  max-width: 600px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease;
  cursor: pointer;
  aspect-ratio: 1;
}

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

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

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-overlay span {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-caption h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.gallery-caption p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.gallery-lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

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

.lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .gallery-container {
    padding: 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .lightbox-content img {
    max-height: 80vh;
  }

  .lightbox-close {
    top: -35px;
    font-size: 30px;
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
  }

  .lightbox-close {
    top: -30px;
    font-size: 25px;
    width: 30px;
    height: 30px;
  }
}
