/* МОО «ЕДИНСТВО» — финальная геометрия главной после проверки production-скриншотов. */

/* Не даём крупным каруселям создавать горизонтальный скролл страницы. */
.edinstvo-portal .ep-main{overflow-x:clip}

/* ------------------------------------------------------------
   НОВОСТИ: первый экран должен помещаться по высоте и не душить длинный заголовок.
   ------------------------------------------------------------ */
.ep-news-slider{
  --ep-news-hero-h:clamp(420px,calc(100dvh - var(--ep-fixed-header-height,150px)),560px);
}
.ep-news-slider__track{min-height:var(--ep-news-hero-h)!important;height:var(--ep-news-hero-h)!important}
.ep-news-slide,.ep-news-slide.is-active{
  min-height:var(--ep-news-hero-h)!important;
  height:var(--ep-news-hero-h)!important;
  grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr)!important;
}
.ep-news-slide__content{
  min-height:var(--ep-news-hero-h)!important;
  height:var(--ep-news-hero-h)!important;
  padding:34px clamp(26px,3vw,54px) 42px clamp(54px,4.8vw,92px)!important;
}
.ep-news-slide__copy{max-width:700px!important}
.ep-news-slide__copy h2{
  margin:10px 0 18px!important;
  max-width:700px!important;
  font-size:clamp(30px,2.55vw,44px)!important;
  line-height:1.025!important;
  letter-spacing:-.03em!important;
}
.ep-news-slide__copy .ep-kicker{margin-bottom:5px!important;font-size:11px!important}
.ep-news-slide__copy time{font-size:11px!important}
.ep-news-slide__media{
  margin:20px clamp(26px,3.5vw,62px) 20px 8px!important;
  border-radius:16px!important;
}
.ep-news-slide__media img{max-height:calc(var(--ep-news-hero-h) - 40px)!important}
.ep-news-slider__arrow{width:42px!important;height:54px!important}

/* ------------------------------------------------------------
   ПОЗИЦИЯ И МНЕНИЯ: полноценная широкая карусель почти на весь viewport.
   ------------------------------------------------------------ */
.ep-home-editorial>.ep-container{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  padding-left:clamp(24px,3vw,58px)!important;
  padding-right:clamp(24px,3vw,58px)!important;
}
.ep-home-editorial .ep-section__head{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
.ep-home-editorial .ep-publication-carousel{width:100%!important;max-width:none!important}
.ep-home-editorial .ep-news-grid{
  width:100%!important;
  max-width:none!important;
  grid-auto-columns:clamp(310px,21.5vw,430px)!important;
  gap:18px!important;
  padding:4px 4px 14px!important;
  scroll-padding-inline:4px!important;
}
.ep-home-editorial .ep-news-card{width:100%!important;max-width:none!important}
.ep-home-editorial .ep-publication-carousel__arrow--prev{left:8px!important}
.ep-home-editorial .ep-publication-carousel__arrow--next{right:8px!important}

/* Декоративная золотая полоса блока организации всегда живёт в своём отступе. */
.ep-home-organization .ep-compact-head{
  padding:38px 42px 38px 54px!important;
}
.ep-home-organization .ep-compact-head::after{
  left:14px!important;
  top:30px!important;
  bottom:30px!important;
}

@media(max-width:1180px){
  .ep-news-slide,.ep-news-slide.is-active{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important}
  .ep-news-slide__content{padding-left:48px!important;padding-right:24px!important}
  .ep-news-slide__copy h2{font-size:clamp(29px,3.25vw,40px)!important}
  .ep-home-editorial .ep-news-grid{grid-auto-columns:clamp(300px,31vw,390px)!important}
}

@media(max-width:760px){
  /* На телефоне hero становится обычной вертикальной карточкой без фиксированной высоты. */
  .ep-news-slider{--ep-news-hero-h:auto}
  .ep-news-slider__track{height:auto!important;min-height:0!important}
  .ep-news-slide,.ep-news-slide.is-active{
    height:auto!important;
    min-height:0!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
  }
  .ep-news-slide__media{
    width:calc(100% - 24px)!important;
    min-height:190px!important;
    height:auto!important;
    aspect-ratio:16/9!important;
    margin:12px!important;
    border-radius:12px!important;
  }
  .ep-news-slide__media img{width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important}
  .ep-news-slide__content{
    height:auto!important;
    min-height:0!important;
    padding:14px 17px 46px!important;
  }
  .ep-news-slide__copy{max-width:none!important}
  .ep-news-slide__copy h2{
    max-width:none!important;
    margin:8px 0 14px!important;
    font-size:clamp(23px,6.6vw,29px)!important;
    line-height:1.045!important;
    letter-spacing:-.022em!important;
  }
  .ep-news-slide__copy .ep-kicker{font-size:10px!important;line-height:1.25!important}
  .ep-news-slide__copy time{font-size:10.5px!important}
  .ep-news-slide__copy .ep-button{min-height:42px;padding:10px 15px!important}
  .ep-news-slider__arrow{
    top:calc((100vw - 24px) * .28125 + 12px)!important;
    width:36px!important;
    height:44px!important;
  }
  .ep-news-slider__arrow--prev{left:17px!important}.ep-news-slider__arrow--next{right:17px!important}
  .ep-news-slider__dots{bottom:13px!important}

  /* На mobile editorial использует всю ширину и получает явные стрелки поверх карусели. */
  .ep-home-editorial>.ep-container{
    width:100%!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
  .ep-home-editorial .ep-section__head{padding-inline:2px!important}
  .ep-home-editorial .ep-news-grid{
    grid-auto-columns:min(86vw,360px)!important;
    gap:12px!important;
    margin:0!important;
    padding:3px 2px 12px!important;
  }
  .ep-home-editorial .ep-publication-carousel__arrow{
    display:grid!important;
    place-items:center!important;
    width:38px!important;
    height:46px!important;
    top:50%!important;
    margin:0!important;
    transform:translateY(-50%)!important;
    border-color:rgba(255,255,255,.42)!important;
    background:rgba(8,31,53,.88)!important;
    color:#fff!important;
    box-shadow:0 8px 24px rgba(8,31,53,.25)!important;
  }
  .ep-home-editorial .ep-publication-carousel__arrow--prev{left:4px!important}
  .ep-home-editorial .ep-publication-carousel__arrow--next{right:4px!important}

  .ep-home-organization .ep-compact-head{
    padding:28px 22px 28px 36px!important;
  }
  .ep-home-organization .ep-compact-head::after{
    left:12px!important;
    top:22px!important;
    bottom:22px!important;
  }
}

@media(max-width:420px){
  .ep-news-slide__media{min-height:180px!important}
  .ep-news-slide__copy h2{font-size:clamp(22px,6.45vw,27px)!important}
  .ep-home-editorial .ep-news-grid{grid-auto-columns:calc(100vw - 34px)!important}
  /* content-cover-fit.css скрывал эти стрелки на <=420px; здесь возвращаем их. */
  .ep-home-editorial .ep-publication-carousel__arrow{display:grid!important}
}