/* Journal «Контекст» — shared article card, homepage layout.
   Every rule is scoped to .hs-journal, so the same card keeps its legacy
   overlay look on article pages (there is no .hs-journal ancestor there).
   Photo on top, title and publication date below, in the same type scale as
   the course cards: long titles wrap in full instead of being clipped. */

.hs-home .hs-journal {
  margin: 56px 0 0;
  padding: 36px 0;
  background: var(--hs-surface, #222a3d);
  scroll-margin-top: 96px;
}

.hs-journal .hs-shelf__head {
  margin-bottom: 18px;
}

/* Keep the carousel horizontally centred inside .wrapper. */
.hs-journal .articles__slider {
  margin: 0 auto;
}

/* Align card edges with the heading while retaining Slick's 5px gutters. */
.hs-journal .articles__slider .slick-list { margin: 0 -5px; }

/* Card geometry: image in normal flow, text block under it. */
.hs-journal .articles__slider .slick-slide {
  display: flex;
  flex-flow: column nowrap;
  flex-shrink: 0;
  height: auto;
  align-items: stretch;
  align-content: flex-start;
  justify-content: flex-start;
}

.hs-journal .course_card-preview {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  /* Never animate Slick's JS-calculated width on resize. */
  transition: none;
}

.hs-journal .article-main-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: none;
  overflow: visible;
}

.hs-journal .edlix-cover--article-card {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 397 / 222;
  border-radius: 10px;
  flex: 0 0 auto;
}

.hs-journal .slick-slide .edlix-cover--article-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.2s;
}

.hs-journal .course_card-preview:hover .edlix-cover--article-card img {
  transform: scale(1.035);
}

.hs-journal .articles__slider .slick-slide .slider-text {
  position: static;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 0 0;
  background: none;
  text-align: left;
  transform: none;
  flex: 1;
  justify-content: flex-start;
}

.hs-journal .articles__slider .slick-slide p {
  width: auto;
  text-align: left;
}

.hs-journal .articles__slider .slick-slide .slider-text .article-header {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  color: #f5f7fc;
  overflow-wrap: break-word;
  hyphens: auto;
  min-height: calc(3 * 1.35em);
}

.hs-journal .articles__slider .slick-slide .slider-text .date {
  margin: auto 0 0;
  padding: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--hs-muted, #b4bfd3);
}

@media (max-width: 640px) {
  .hs-home .hs-journal {
    margin-top: 44px;
    padding: 28px 0;
  }

  .hs-journal .articles__slider .slick-slide .slider-text .article-header {
    font-size: 16px;
    min-height: calc(3 * 1.35em);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hs-journal .slick-slide .edlix-cover--article-card img {
    transition: none;
  }

  .hs-journal .course_card-preview:hover .edlix-cover--article-card img {
    transform: none;
  }
}
