/* МОО «ЕДИНСТВО» — image-first editorial/publication layout.
 * Public covers use a stable horizontal 16:9 frame on desktop, tablet and mobile.
 * The original image is never cropped: non-16:9 legacy artwork is letterboxed with contain.
 */

/* Shared compact headings. */
.ep-section__head{margin-bottom:14px!important;gap:18px!important}
.ep-section__head h2{font-size:clamp(24px,2.6vw,32px)!important;line-height:1.08!important}
.ep-section__head>p{max-width:380px!important;font-size:11px!important;line-height:1.4!important}
.ep-section__head .ep-actions{margin-top:0!important;gap:12px!important}
.ep-section__head .ep-text-link{font-size:12px!important}

/* Homepage publication carousel. */
.ep-publication-carousel{position:relative}
.ep-news-grid{
  display:grid!important;
  grid-template-columns:none!important;
  grid-auto-flow:column;
  grid-auto-columns:minmax(330px,390px);
  gap:14px!important;
  max-width:100%;
  padding:2px 3px 10px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:3px;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
}
.ep-news-grid::-webkit-scrollbar{display:none}
.ep-news-card,.ep-news-card--lead{
  grid-column:auto!important;
  display:block!important;
  min-width:0;
  min-height:0;
  overflow:hidden;
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
.ep-news-card__image,.ep-news-card--lead .ep-news-card__image{
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/9;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#0d2742;
}
.ep-news-card__image img,.ep-news-card--lead .ep-news-card__image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
}
.ep-news-card:hover .ep-news-card__image img{transform:none!important}
.ep-news-card__body{min-width:0;padding:11px 13px 13px!important}
.ep-news-card time{font-size:9px!important;opacity:.8}
.ep-news-card__body>small{display:block;margin:2px 0;color:inherit;opacity:.72;font-size:9px;line-height:1.3}
.ep-news-card h3,.ep-news-card--lead h3{
  margin:5px 0 0!important;
  font-size:17px!important;
  line-height:1.2!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.ep-news-card p{display:none!important}
.ep-news-card__more{display:inline-flex;margin-top:8px!important;font-size:10.5px!important}
.ep-home-editorial .ep-news-card{border-color:var(--ep-line);background:#fff;color:var(--ep-ink);box-shadow:0 5px 18px rgba(20,48,77,.06)}
.ep-home-editorial .ep-news-card h3{color:var(--ep-blue)}
.ep-home-editorial .ep-news-card__more{color:var(--ep-blue-2)}
.ep-home-editorial .ep-news-card__image{background:#edf2f6}
.ep-publication-carousel__arrow{
  position:absolute;
  z-index:3;
  top:calc(50% - 24px);
  width:42px;
  height:48px;
  padding:0;
  border:1px solid rgba(255,255,255,.28);
  border-radius:10px;
  background:rgba(8,31,53,.76);
  color:#fff;
  font:400 28px/1 Georgia,serif;
  box-shadow:0 5px 18px rgba(8,31,53,.18);
  cursor:pointer;
  transform:translateY(-50%);
  backdrop-filter:blur(6px)
}
.ep-publication-carousel__arrow:hover{background:rgba(8,31,53,.92)}
.ep-publication-carousel__arrow:disabled{opacity:.28;cursor:default}
.ep-publication-carousel__arrow--prev{left:-14px}
.ep-publication-carousel__arrow--next{right:-14px}
.ep-home-editorial .ep-publication-carousel__arrow{border-color:#cbd8e4;background:rgba(255,255,255,.94);color:var(--ep-blue)}
.ep-home-editorial .ep-publication-carousel__arrow:hover{background:#fff}

/* Category/search archives: image first, horizontal covers, compact copy. */
.ep-archive{padding:22px 0 42px!important}
.ep-compact-head{margin:0 0 14px!important;padding:0 0 12px!important}
.ep-compact-head .ep-breadcrumbs{margin-bottom:6px!important;font-size:10px!important}
.ep-compact-head h1{margin:4px 0!important;font-size:clamp(26px,3vw,34px)!important;line-height:1.07!important}
.ep-compact-head p{max-width:680px!important;margin:0!important;font-size:12px!important;line-height:1.38!important}
.ep-archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.ep-card{display:block!important;overflow:hidden}
.ep-card__image{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:16/9;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#edf2f6;
}
.ep-card__image img{
  width:100%!important;
  height:100%!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:center center!important;
}
.ep-card__body{min-width:0;padding:11px 12px 13px!important}
.ep-card time{font-size:9px!important}
.ep-card h2{
  margin:5px 0 0!important;
  font-size:16px!important;
  line-height:1.2!important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.ep-card p{display:none!important}
.ep-card__more{margin-top:8px!important;font-size:10px!important}

/* Public post page: only breadcrumbs above the artwork; visible title is intentionally omitted. */
.ep-page-hero--post{padding:8px 0 6px!important;background:#fff!important;border-bottom:1px solid var(--ep-line)}
.ep-page-hero--post .ep-container{width:min(820px,calc(100% - 32px))}
.ep-page-hero--post .ep-breadcrumbs{margin:0!important;font-size:10px!important;line-height:1.3!important}
.ep-content-wrap:not(.ep-content-wrap--page){padding:14px 0 46px!important}
.ep-article{width:min(820px,calc(100% - 32px))!important}
.ep-article__cover{
  width:100%!important;
  max-width:820px!important;
  aspect-ratio:16/9;
  margin:0 auto 18px!important;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:12px;
  background:#edf2f6;
  box-shadow:var(--ep-shadow)
}
.ep-article__cover img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center center!important;
}
.ep-prose{font-size:16px!important;line-height:1.66!important}
.ep-article__footer-meta{
  margin:24px 0 0;
  padding:12px 0 0;
  border-top:1px solid var(--ep-line);
}
.ep-article__meta{display:flex!important;flex-wrap:wrap;gap:6px 14px!important;margin:0!important;color:var(--ep-muted);font-size:10px!important}
.ep-article__publication-note{margin:0 0 8px;font-size:11px;line-height:1.4;color:var(--ep-muted)}
.ep-taxonomy{margin-top:12px!important;padding-top:0!important;border-top:0!important}
.ep-related,.ep-comments{margin-top:30px!important;padding-top:22px!important}
.ep-related h2,.ep-comments h2{margin:5px 0 14px!important;font-size:24px!important}
.ep-related-card{padding:13px!important}
.ep-related-card h3{font-size:16px!important}

@media(max-width:980px){
  .ep-archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ep-news-grid{grid-auto-columns:minmax(310px,360px)}
}

@media(max-width:760px){
  .ep-section__head{margin-bottom:11px!important}
  .ep-section__head h2{font-size:24px!important;line-height:1.1!important}
  .ep-section__head .ep-actions{display:flex!important;flex-wrap:wrap!important;gap:6px 12px!important}

  .ep-news-grid{grid-auto-columns:min(88vw,350px);margin-right:-12px;padding-right:12px;gap:10px!important}
  .ep-news-card__body{padding:9px 10px 11px!important}
  .ep-news-card h3,.ep-news-card--lead h3{font-size:15.5px!important}
  .ep-news-card__more{margin-top:6px!important;font-size:10px!important}
  .ep-publication-carousel__arrow{top:calc(50% - 22px);width:34px;height:42px;font-size:24px}
  .ep-publication-carousel__arrow--prev{left:-5px}.ep-publication-carousel__arrow--next{right:-5px}

  .ep-archive{padding:16px 0 34px!important}
  .ep-compact-head{margin-bottom:11px!important;padding-bottom:10px!important}
  .ep-compact-head h1{font-size:27px!important}
  .ep-compact-head p{font-size:11.5px!important}
  .ep-archive-grid{grid-template-columns:1fr!important;gap:10px!important}
  .ep-card h2{font-size:15.5px!important}

  .ep-page-hero--post{padding:6px 0 5px!important}
  .ep-page-hero--post .ep-container{width:min(100% - 24px,820px)}
  .ep-content-wrap:not(.ep-content-wrap--page){padding:10px 0 34px!important}
  .ep-article{width:min(100% - 24px,820px)!important}
  .ep-article__cover{margin-bottom:14px!important;border-radius:10px}
  .ep-prose{font-size:15.5px!important;line-height:1.62!important}
  .ep-article__footer-meta{margin-top:20px}
  .ep-article__meta{font-size:9.5px!important}
  .ep-related h2,.ep-comments h2{font-size:22px!important}
}

@media(max-width:420px){
  .ep-news-grid{grid-auto-columns:calc(100vw - 34px)}
  .ep-publication-carousel__arrow{display:none}
}
