.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.gallery-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #acacac;
  color: #acacac;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -10px;
}

.gallery-item {
  width: calc(33.333% - 20px);
  margin: 10px;
  cursor: pointer;
  transition: transform 0.3s;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Модальное окно */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  text-align: center;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.modal-title {
  color: white;
  font-size: 20px;
  margin-bottom: 10px;
  text-align: center;
}

.modal-counter {
  color: white;
  margin-top: 10px;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev {
  left: 20px;
}

.modal-next {
  right: 20px;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideFromRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideFromLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s forwards;
}

.slide-from-right {
  animation: slideFromRight 0.3s forwards;
}

.slide-from-left {
  animation: slideFromLeft 0.3s forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
  .gallery-item {
    width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 100%;
    margin: 10px 0;
  }
}
