/* ── EC News Slider ─────────────────────────────────────────────── */
.ec-news-slider {
  --ec-accent: #1b82f6;
  --ec-overlay: rgba(30,30,40,0.72);
  width: 100%;
  font-family: inherit;
  box-sizing: border-box;
}

/* ── Header — внутри контейнера 1110px ── */
.ec-ns__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px 0 40px;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1110px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
@media (max-width: 768px) {
  .ec-ns__header { padding: 12px 10px 24px; }
}
.ec-ns__label-wrap { display: flex; flex-direction: column; gap: 4px; }
.ec-ns__label {
  color: var(--ec-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity .2s;
}
.ec-ns__label:hover { opacity: .75; }
.ec-ns__label:visited { color: var(--ec-accent); }
.ec-ns__label::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--ec-accent);
}
.ec-ns__title {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.2;
  text-transform: none;
}
.ec-ns__all-link {
  color: #111;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.ec-ns__all-link:hover { color: var(--ec-accent); }

/* ── Outer wrap: full viewport width via margin trick ── */
.ec-ns__outer {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  display: flex;
  align-items: stretch;
  height: 564px;
}

/* ── Static side panels ── */
.ec-ns__side {
  flex: 1 1 0;           /* занимают всё оставшееся место */
  position: relative;
  overflow: hidden;
}
.ec-ns__side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
}

/* ── Gap between side and centre (where arrows live) ── */
.ec-ns__gap {
  flex: 0 0 40px;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* ── Centre: only this part slides ── */
.ec-ns__centre-wrap {
  flex: 0 0 50vw;
  position: relative;
  overflow: hidden;
}

/* ── Track inside centre only ── */
.ec-ns__track {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.77,0,.18,1);
  will-change: transform;
}

/* ── Each slide = 100% of centre-wrap ── */
.ec-ns__item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.ec-ns__center-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}
.ec-ns__center-noimg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, #0d2555 0%, #1565c0 100%);
}

/* ── Text overlay ── */
.ec-ns__overlay {
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 52% !important;
  height: 320px !important;
  background: rgba(30,30,40,0.72) !important;
  padding: 32px 36px 28px !important;
  z-index: 5 !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  opacity: 0 !important;
  transition: opacity 500ms ease 0.3s !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.ec-ns__overlay.is-visible {
  opacity: 1 !important;
}
.ec-ns__overlay:hover { background: rgba(20,20,30,0.88) !important; }
.ec-ns__post-title {
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.35;
  text-transform: none;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.ec-ns__post-excerpt {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  line-height: 1.65;
  margin: 0;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.ec-ns__post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ec-accent);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .2s;
  flex-shrink: 0;
  padding: 0;
  margin-top: 14px;
}
.ec-ns__post-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ec-ns__post-btn:hover { background: #0d6fd4; transform: translateX(3px); }

/* ── Arrows — inside gap divs ── */
.ec-ns__nav {
  width: 65px;
  height: 65px;
  border-radius: 100%;
  border: none;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  box-shadow: rgba(0,0,0,0.18) 0px 0px 16px 0px;
  transition: background 400ms, box-shadow 400ms, transform 400ms;
  position: relative;
}
/* Внутренняя обводка */
.ec-ns__nav::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 100%;
  border: 2px solid var(--ec-accent);
  transition: border-color 400ms, opacity 400ms;
}
.ec-ns__nav svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: var(--ec-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 400ms;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ec-ns__nav:hover {
  background: var(--ec-accent);
  box-shadow: rgba(27,130,246,0.45) 0px 0px 20px 0px;
  transform: scale(1.06);
}
.ec-ns__nav:hover::before {
  border-color: rgba(255,255,255,.5);
}
.ec-ns__nav:hover svg {
  stroke: #fff;
}

/* ── Dots — always 3: [←] [●] [→] ── */
.ec-ns__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px 0 6px;
}
.ec-ns__dot-prev,
.ec-ns__dot-centre,
.ec-ns__dot-next {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #1b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  padding: 0;
  flex-shrink: 0;
}
.ec-ns__dot-prev svg,
.ec-ns__dot-next svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: rgba(255,255,255,.65);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ec-ns__dot-prev:hover,
.ec-ns__dot-next:hover { background: #3a96ff; transform: scale(1.05); }
.ec-ns__dot-centre { display: none; }


/* ── Decorative shape — only over the photo area ── */
.ec-ns__img-wrap {
  position: absolute;
  top: 0;
  left: 20%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.ec-ns__img-wrap::after {
  content: "";
  width: 150%;
  height: 40%;
  background-image: var(--ec-shape);
  background-repeat: no-repeat;
  background-size: cover;
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}
/* ── Mobile ── */
@media (max-width: 768px) {
  /* Outer — auto height */
  .ec-ns__outer {
    height: auto !important;
    min-height: 0;
  }

  /* Hide static side images and gaps */
  .ec-ns__side { display: none !important; }
  .ec-ns__gap  { display: none !important; }

  /* Centre fills full width */
  .ec-ns__centre-wrap {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: visible !important; /* arrows must be visible */
  }
  /* Item must also be relative for arrows */
  .ec-ns__item {
    position: relative !important;
  }

  /* Mobile arrows — hidden by default, show on touch */
  .ec-ns__nav--mobile {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 20 !important;
    width: 42px !important;
    height: 42px !important;
    background: rgba(255,255,255,.88) !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    padding: 0 !important;
    opacity: 0 !important;
    transition: opacity .3s ease !important;
    pointer-events: none !important;
  }
  .ec-ns__nav--mobile.is-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .ec-ns__nav--mobile::before { display: none !important; }
  .ec-ns__nav--mobile svg {
    width: 16px !important;
    height: 16px !important;
    stroke: var(--ec-accent) !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }
  .ec-ns__nav--mobile-prev { left: 10px !important; right: auto !important; }
  .ec-ns__nav--mobile-next { right: 10px !important; left: auto !important; }

  /* Image — full width, fixed height */
  .ec-ns__img-wrap {
    position: relative !important;
    left: 0 !important;
    width: 100% !important;
    height: 240px !important;
    display: block !important;
  }
  .ec-ns__img-wrap::after { display: none !important; }

  .ec-ns__item {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }

  /* Overlay — below image, full width, fixed height */
  .ec-ns__overlay {
    position: relative !important;
    left: 0 !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    height: 200px !important;
    min-height: 0 !important;
    padding: 16px 16px 16px !important;
    opacity: 1 !important;
    transition: none !important;
    background: rgba(30,30,40,0.92) !important;
  }
  .ec-ns__overlay.is-visible { opacity: 1 !important; }

  .ec-ns__post-title {
    font-size: 15px !important;
    height: calc(1.4em * 2) !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    margin-bottom: 8px !important;
  }
  .ec-ns__post-excerpt {
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
    flex: 1 !important;
  }
  .ec-ns__post-btn {
    display: flex !important;
    width: 44px !important;
    margin-top: 12px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Logo smaller */
  .ec-ns__logo {
    width: 70px !important;
    bottom: 10px !important;
    left: 10px !important;
  }

  /* Nav arrows */
  .ec-ns__nav {
    width: 42px !important;
    height: 42px !important;
    background: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
  }
  .ec-ns__nav::before { display: none !important; }
  .ec-ns__nav svg {
    width: 16px !important;
    height: 16px !important;
    stroke: var(--ec-accent) !important;
  }

  /* Dots */
  .ec-ns__dots { padding: 12px 0 4px; }
  .ec-ns__dot-prev,
  .ec-ns__dot-centre,
  .ec-ns__dot-next { width: 38px !important; height: 38px !important; }
}

/* ── Slide logo ── */
.ec-ns__logo {
  position: absolute;
  bottom: 28px;
  left: 28px;
  width: 120px;
  height: auto;
  z-index: 4;
  pointer-events: none;
  object-fit: contain;
}
@media (max-width: 768px) {
  .ec-ns__logo { width: 80px; bottom: 16px; left: 16px; }
}
