/* ============================================================================
   frontend/public/css/gallery-layout.css — [GALLERY-PUBLIC v4]
   Публичная галерея на странице записи /<slug>: два вида на выбор компании
   (companies.gallery_layout):
     * masonry — «плитка» (стили .gallery__masonry/.gallery__item уже есть в
       style.css, здесь только страховка, чтобы вид не зависел от версии файла);
     * slider  — горизонтальный слайдер со стрелками, точками и свайпом.

   Отдельный файл: общий style.css не трогаем (протокол v1.1, п. 1.5/8.1).
   Префикс фичи — gsl-. Mobile-first.
   ============================================================================ */

/* --- masonry (страховка: те же правила, что в style.css) ------------------ */
.gallery__masonry { column-count: 2; column-gap: 12px; }
.gallery__masonry .gallery__item {
  break-inside: avoid; margin: 0 0 12px; border-radius: 12px; overflow: hidden;
}
.gallery__masonry .gallery__img { width: 100%; height: auto; display: block; }

/* --- slider --------------------------------------------------------------- */
.gallery__slider { position: relative; }
.gsl-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px;
}
.gsl-track::-webkit-scrollbar { display: none; }
.gsl-slide {
  flex: 0 0 86%; scroll-snap-align: center; margin: 0; border-radius: 14px;
  overflow: hidden; background: #f0f0f3;
}
.gsl-slide img { width: 100%; height: 220px; object-fit: cover; display: block; }

.gsl-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9); color: #1d1d1f; cursor: pointer;
  font-size: 18px; line-height: 1; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.gsl-btn:hover { background: #fff; }
.gsl-btn:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.gsl-btn--prev { left: 8px; }
.gsl-btn--next { right: 8px; }
.gsl-btn[hidden] { display: none; }

.gsl-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gsl-dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: #c7c7cc; cursor: pointer;
}
.gsl-dot.is-active { background: #1d1d1f; }

/* --- планшет / десктоп ---------------------------------------------------- */
@media (min-width: 768px) {
  .gallery__masonry { column-count: 3; column-gap: 16px; }
  .gallery__masonry .gallery__item { margin-bottom: 16px; }
  .gsl-slide { flex-basis: 47%; }
  .gsl-slide img { height: 320px; }
}
@media (min-width: 1200px) {
  .gallery__masonry { column-count: 4; }
  .gsl-slide { flex-basis: 31.5%; }
  .gsl-slide img { height: 360px; }
}
