/* Стили галереи (Сетка) */
.gallery_custom {
  display: grid;
  gap: 16px;
  padding: 16px;
  
  /* По умолчанию (для мобильных телефонов): 1 колонка */
  grid-template-columns: 1fr; 
}

/* 📲 Для планшетов (экран больше 600px): 2 колонки */
@media (min-width: 600px) {
  .gallery_custom {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 💻 Для компьютеров (экран больше 900px): 4 колонки */
@media (min-width: 900px) {
  .gallery_custom {
    grid-template-columns: repeat(3, 1fr);
  }
}

    .gallery-item_custom {
      overflow: hidden;
      border-radius: 8px;
      cursor: pointer; /* Меняет курсор на палец */
    }

    .gallery-item_custom img {
      width: 100%;
      height: 250px; /* Фиксированная высота для ровной сетки */
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
    }

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

    /* Стили всплывающего окна (Lightbox) */
    .lightbox {
      display: none; /* Скрыто по умолчанию */
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.85); /* Темный полупрозрачный фон */
      z-index: 1000;
      justify-content: center;
      align-items: center;
    }

    /* Класс для показа Lightbox через JS */
    .lightbox.active {
      display: flex;
    }

    .lightbox-content {
      max-width: 90%;
      max-height: 85%;
      border-radius: 4px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
      animation: zoomIn 0.3s ease; /* Анимация плавного появления */
    }

    /* Кнопка закрытия (Крестик) */
    .lightbox-close {
      position: absolute;
      top: 20px;
      right: 30px;
      color: #fff;
      font-size: 40px;
      font-weight: bold;
      cursor: pointer;
      user-select: none;
    }

    /* Анимация увеличения */
    @keyframes zoomIn {
      from { transform: scale(0.9); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }