.gallery {
  padding: 12rem 2rem 6rem;
  background: var(--bg-color);
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  height: 300px;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item .overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 23, 31, 0.95));
  transition: bottom 0.3s ease;
}

.gallery-item:hover .overlay {
  bottom: 0;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item .overlay h3 {
  color: var(--white);
  font-size: 2rem;
  font-family: var(--special-font);
  margin-bottom: 0.5rem;
}

.gallery-item .overlay p {
  color: var(--light-white);
  font-size: 1.4rem;
}

/* Active nav link style */
.navbar a.active {
  color: var(--main-color);
}

.navbar a.active::after {
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 1rem;
  }

  .gallery-item {
    height: 250px;
  }
}

/* Loading animation */
.gallery-item {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
