
.neurored-instslider-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin: 30px 0;
}
.neurored-instslider-item {
  cursor: pointer; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  transition: box-shadow .2s; background: #fff;
}
.neurored-instslider-item:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
@media (max-width:1024px) { .neurored-instslider-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:600px) { .neurored-instslider-grid { grid-template-columns: 1fr; } }
#neurored-instslider-modal {
  position: fixed; 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; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.85);
}
.modal-center {
  position: relative; z-index: 10; max-width: 90vw; max-height: 90vh;
  width: auto; background: transparent; display: flex; align-items: center; justify-content: center;
}
.modal-close {
  position: absolute; top: -20px; right: -20px; width: 40px; height: 40px;
  background: #fff; color: #333; border: none; border-radius: 50%;
  font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: background .2s, color .2s;
}
.modal-close:hover { background: #e74c3c; color: #fff; }

/* 1) Модал-контейнер и крестик */
#neurored-instslider-modal.active .modal-center {
  position: relative;
}
#neurored-instslider-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  font-size: 20px;
  background: rgba(255,255,255,0.95);
  color: #333;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background .2s, color .2s;
}
#neurored-instslider-modal .modal-close:hover {
  background: #e74c3c;
  color: #fff;
}

/* 2) Стрелки */
#neurored-instslider-modal .embla__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  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;
  color: #333;
  font-size: 24px;
  cursor: pointer;
  transition: background .2s, color .2s;
  z-index: 5;
}
#neurored-instslider-modal .embla__button--prev {
  left: 12px;
}
#neurored-instslider-modal .embla__button--next {
  right: 12px;
}
#neurored-instslider-modal .embla__button:hover {
  background: #39c170;
  color: #fff;
}
#neurored-instslider-modal .embla__button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 3) Точки-индикаторы */
#neurored-instslider-modal .embla__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
#neurored-instslider-modal .embla__dot {
  width: 10px;
  height: 10px;
  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);
}

/* ——————————————————————————————————————————————
   1) Устанавливаем position:relative для .modal-center,
      чтобы абсолютный крестик приклеился внутрь
   —————————————————————————————————————————————— */
#neurored-instslider-modal.active .modal-center {
  position: relative;
}

/* ——————————————————————————————————————————————
   2) Стили для крестика закрытия
   —————————————————————————————————————————————— */
#neurored-instslider-modal .modal-close {
  position: absolute; /* уже внутри .modal-center */
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  font-size: 20px;
  background: rgba(255,255,255,0.95);
  color: #333;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
#neurored-instslider-modal .modal-close:hover {
  background: #e74c3c;
  color: #fff;
}

/* ——————————————————————————————————————————————
   3) Стили для стрелок (внутри модального окна)
   —————————————————————————————————————————————— */
#neurored-instslider-modal .embla__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background .2s, color .2s;
  z-index: 10;
}
#neurored-instslider-modal .embla__button--prev { left: 12px; }
#neurored-instslider-modal .embla__button--next { right: 12px; }
#neurored-instslider-modal .embla__button:hover {
  background: #39c170;
  color: #fff;
}
#neurored-instslider-modal .embla__button:disabled {
  opacity: .4;
  cursor: default;
}

/* ——————————————————————————————————————————————
   4) Круглые точки-индикаторы и убираем ::after из embla.css
   —————————————————————————————————————————————— */
#neurored-instslider-modal .embla__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
#neurored-instslider-modal .embla__dot {
  width: 12px !important;
  height: 12px !important;
  background: rgba(255,255,255,0.6) !important;
  border-radius: 50% !important;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
/* выключаем стандартный ::after из embla.css */
#neurored-instslider-modal .embla__dot::after {
  display: none !important;
}
#neurored-instslider-modal .embla__dot--selected {
  background: #39c170 !important;
  transform: scale(1.3);
}

