/* Сброс отступов */
section.gallery2 { margin:0; padding:0; }

/* Карточки */
.gallery2 .item__cover { overflow:hidden; border-radius:12px; }
.gallery2 .item__cover img { width:100%; height: 265px !important; object-fit:cover; cursor:zoom-in; }

/* Мобильный (<768px): Swiper */
@media (max-width:767px) {
  .gallery2 .gallery__wrapper { position:relative; padding-bottom:20px; }
  .gallery2 .swiper-pagination { display:flex !important; justify-content:center; position:absolute; bottom:8px; width:100%; }
  .gallery2 .swiper-pagination-bullet { width:8px; height:8px; margin:0 4px !important; background:#ddd; opacity:1; }
  .gallery2 .swiper-pagination-bullet-active { background:red !important; }
}

/* Десктоп (>=768px): CSS-grid */
@media (min-width:768px) {
  .gallery2 .gallery__wrapper { display:grid !important; grid-template-columns:repeat(3,1fr); gap:20px; }
  .gallery2 .swiper-wrapper { display:contents !important; }
  .gallery2 .swiper-slide { width:auto !important; margin:0 !important; }
  .gallery2 .swiper-pagination { display:none !important; }
  
  
}

/* Lightbox */
.image-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:9999; align-items:center; justify-content:center; }
.image-modal.active { display:flex !important; }
.image-modal .modal-content { text-align:center; }
.image-modal .modal-img { max-width:90%; max-height:90%; object-fit:contain; }
.image-modal .modal-caption { color:#fff; margin-top:8px; }
.image-modal .modal-close, .image-modal .modal-prev, .image-modal .modal-next { position:absolute; color:#fff; font-size:2rem; cursor:pointer; user-select:none; }
.image-modal .modal-close { top:20px; right:30px;z-index:100; }
.image-modal .modal-prev  { left:30px; top:50%; transform:translateY(-50%); }
.image-modal .modal-next  { right:30px; top:50%; transform:translateY(-50%); }

  /* Lightbox (глобально) */
  .image-modal {
    display: none !important;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    align-items: center; justify-content: center;
  }
  .image-modal.active { display: flex !important; }
  .image-modal .modal-content {
    width: 1200px; height: 800px;
    text-align: center; background: transparent;
  }
  .image-modal .modal-img {
    width: 1200px; height: 800px; object-fit: contain;
  }
  .image-modal .modal-caption {
    color: #fff; margin-top: 8px;
  }
  .image-modal .modal-close,
  .image-modal .modal-prev,
  .image-modal .modal-next {
    position: absolute; color: #fff;
    font-size: 2rem; cursor: pointer;
    user-select: none;
  }
  .image-modal .modal-close { top: 20px; right: 30px; }
  .image-modal .modal-prev { top: 50%; left: 20px; transform: translateY(-50%); }
  .image-modal .modal-next { top: 50%; right: 20px; transform: translateY(-50%); }