/* Лёгкая галерея вместо tilda-zero-gallery (только в модалках) */
/* Размеры — как в исходной вёрстке: оборудование 447×376, проекты 465×453 */
.tn-elem[data-elem-type="gallery"] .pg-gal--equip {
  width: 447px !important;
  height: 376px !important;
}

.tn-elem[data-elem-type="gallery"] .pg-gal--proj {
  width: 465px !important;
  height: 453px !important;
}

.tn-atom__gallery.pg-gal {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #ececec;
}

.pg-gal__track {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.pg-gal__track::-webkit-scrollbar {
  display: none;
}

.pg-gal__img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
  user-select: none;
  -webkit-user-drag: none;
}

.pg-gal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #313373;
  box-shadow: 0 6px 18px rgba(20, 20, 60, 0.25);
  cursor: pointer;
  z-index: 5;
  opacity: 0.9;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.pg-gal__nav:hover {
  background: #1e1f49;
  opacity: 1;
}

.pg-gal__nav::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M4 2 L8 6 L4 10' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pg-gal__nav--prev {
  left: 10px;
}

.pg-gal__nav--prev::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M8 2 L4 6 L8 10' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pg-gal__nav--next {
  right: 10px;
}

.pg-gal__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  z-index: 4;
  pointer-events: auto;
}

.pg-gal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pg-gal__dot.is-active {
  background: #ffffff;
  transform: scale(1.25);
}

.pg-gal--single .pg-gal__nav,
.pg-gal--single .pg-gal__dots {
  display: none;
}
