/* ========== ПРЕИМУЩЕСТВА ========== */
.advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .advantages__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* ========== ADVANTAGES SECTION ========== */
.advantages {
  background-color: var(--light-gray);
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.advantage-card {
  background: var(--light-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--box-shadow);
}

.advantage-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-hover);
}

.advantage-card__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(240, 41, 48, 0.1);
  border-radius: 50%;
}

.advantage-card__icon img {
  width: 50px;
  height: 50px;
}

.advantage-card__title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  color: var(--dark-color);
}

.advantage-card__text {
  color: var(--gray-color);
  font-size: 1.5rem;
}

/* ========== GALLERY SECTION (ГОРИЗОНТАЛЬНАЯ ВЕРСИЯ) ========== */
.gallery__grid {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg); /* Добавляем боковые отступы */
  margin: 0 calc(-1 * var(--space-lg)); /* Компенсируем отступы контейнера */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding: var(--space-lg); /* Для snap-эффекта с учетом отступов */
}

.gallery-item {
  flex: 0 0 280px;
  scroll-snap-align: start;
  height: 180px;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  z-index: 1;
}

.gallery-item__overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-md);
}

.gallery-item__overlay span {
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
  background-color: rgba(255, 255, 255, 0.85);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(2px);
}

/* Анимация при наведении */
.gallery-item:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
  transition: transform 0.5s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
  .gallery-item {
    flex: 0 0 220px;
    height: 150px;
  }
  
  .gallery-item__overlay span {
    font-size: 1.6rem;
    padding: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .gallery-item {
    flex: 0 0 180px;
    height: 120px;
  }
  
  .gallery-item__overlay span {
    font-size: 1.4rem;
  }
}

