/* ==================================================
   instslider.css — полный стиль Neurored InstSlider v1.2
   без псевдо-элементов и дублирования стрелок
   ================================================== */

/* 1. СЕТКА ГАЛЕРЕЙ */
.neurored-instslider-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}
@media (max-width: 1024px) {
  .neurored-instslider-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .neurored-instslider-grid {
    grid-template-columns: 1fr;
  }
}

/* 2. ЭЛЕМЕНТЫ ГАЛЕРЕИ */
.neurored-instslider-item {
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: box-shadow .2s;
}
.neurored-instslider-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.neurored-instslider-item img,
.neurored-instslider-item video {
  display: block;
  width: 100%;
  height: auto;
}

/* 3. МОДАЛЬНОЕ ОКНО */
#neurored-instslider-modal {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#neurored-instslider-modal.active {
  display: flex;
}
#neurored-instslider-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

/* 4. КОНТЕЙНЕР СЛАЙДЕРА */
#neurored-instslider-modal .modal-center {
  position: relative;      /* для абсолютных элементов внутри */
  display: block;          /* убрали shrink-wrap flex */
  max-width: 90vw;
  max-height: 90vh;
  overflow: visible;       /* показываем стрелки/точки за пределами картинки */
  background: transparent;
}

/* 5. КНОПКА “ЗАКРЫТЬ” */
#neurored-instslider-modal .modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  background: rgba(255,255,255,0.9);
  color: #333;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
  z-index: 20;
}
#neurored-instslider-modal .modal-close:hover {
  background: #e74c3c;
  color: #fff;
}

/* 6. EMBLA: сброс «100% ширины» и авто-высоты */
#neurored-instslider-modal .embla,
#neurored-instslider-modal .embla__viewport {
  width: 100% !important;
  height: auto !important;
}

/* 7. СЛАЙДЫ */
#neurored-instslider-modal .embla__container {
  display: flex;
}
#neurored-instslider-modal .embla__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#neurored-instslider-modal .embla__slide img,
#neurored-instslider-modal .embla__slide video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

/* 8. СТРЕЛКИ НАЗАД/ВПЕРЁД 
   (SVG или текст уже вставляет JS, псевдо-элементы не нужны) */
#neurored-instslider-modal .embla__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
  z-index: 15;
}
#neurored-instslider-modal .embla__button--prev {
  left: 16px;
}
#neurored-instslider-modal .embla__button--next {
  right: 16px;
}
#neurored-instslider-modal .embla__button:hover {
  background: rgba(255,255,255,1);
}

/* 9. ТОЧКИ-ИНДИКАТОРЫ */
#neurored-instslider-modal .embla__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  z-index: 15;
}
#neurored-instslider-modal .embla__dot {
  width: 6px;
  height: 6px;
  margin: 0 0;
  padding: 0;
  background: rgba(255,255,255,0.6);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
#neurored-instslider-modal .embla__dot--selected {
  background: #39c170;
  transform: scale(1.3);
}

/* ——————————————————————————————————————————————
   Переопределяем цвет SVG-стрелок (убираем «белый» из темы)
   —————————————————————————————————————————————— */

/* Дефолтный цвет стрелок */
#neurored-instslider-modal .embla__button svg path {
  fill: #333 !important;
}

/* Цвет при ховере */
#neurored-instslider-modal .embla__button:hover svg path {
  fill: #333 !important;
}

/* Если вы используете текстовые стрелки (‹ ›) через currentColor, то: */
#neurored-instslider-modal .embla__button {
  color: #333 !important;
}
#neurored-instslider-modal .embla__button:hover {
  color: #333 !important;
}

