/* Recent News — Figma 2413:1888 / 2416:1867, as a centred looping carousel.
   Card type and imagery follow the Figma (27px title, 28px image radius, accent-deep category). */
.news { --news-dur: 6000ms; padding-block: 60px; overflow-x: clip; }

.news__cat { color: var(--accent-deep); }

/* ---- Viewport + track ---- */
.news__viewport {
  overflow: hidden;
  padding-block: 6px 10px;
  touch-action: pan-y;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.news.is-dragging .news__viewport { cursor: grabbing; }
.news__track {
  display: flex;
  gap: 28px;
  will-change: transform;
  transition: transform .8s var(--ease);
}
.news.is-dragging .news__track,
.news.is-jumping .news__track { transition: none; }

.news__slide {
  flex: none;
  width: min(620px, 72vw);
  opacity: .5;
  transform: scale(.92);
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.news__slide.is-active { opacity: 1; transform: none; }
.news.is-jumping .news__slide { transition: none; }

.news__card { display: flex; flex-direction: column; user-select: none; -webkit-user-drag: none; }
.news__img {
  width: 100%;
  height: auto;
  aspect-ratio: 666 / 416;
  object-fit: cover;
  border-radius: 28px;
  margin-bottom: 26px;
  box-shadow: var(--el-sm);
  transition: box-shadow var(--t-card) var(--ease);
  pointer-events: none;
}
.news__slide.is-active .news__img { box-shadow: var(--el-md); }
.news__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin-block: 9px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  transition: color var(--t-card) var(--ease);
}
.news__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
@media (hover: hover) {
  .news__slide.is-active .news__card:hover .news__title { color: var(--accent-deep); }
  .news__slide:not(.is-active) { cursor: pointer; }
}

/* ---- Controls: arrows + step pills (the active pill fills while autoplay runs) ---- */
.news__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
}
.news__controls { display: flex; align-items: center; gap: 14px; }
.news__arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--t-hover) var(--ease), transform var(--t-hover) var(--ease), background-color var(--t-hover);
}
@media (hover: hover) {
  .news__arrow:hover { border-color: var(--accent-deep); transform: translateY(-2px); }
}
.news__dots { display: flex; align-items: center; gap: 4px; }
.news__dots button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
  transition: width .5s var(--ease);
}
.news__dots i {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
  transition: width .5s var(--ease), background-color .3s;
}
.news__dots button.is-active { width: 48px; }
.news__dots button.is-active i { width: 40px; background: rgba(22, 169, 122, .2); }
.news__dots button.is-active i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-stat);
  transform: scaleX(1);
  transform-origin: left;
}
.news:not(.is-paused) .news__dots button.is-active i::after { animation: news-fill var(--news-dur) linear both; }
@keyframes news-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- Phone (390 frame type sizes) ---- */
@media (max-width: 720px) {
  .news { padding-block: 30px; }
  .news__viewport { -webkit-mask-image: none; mask-image: none; }
  .news__track { gap: 14px; }
  .news__slide { width: calc(100vw - 2 * var(--gutter) - 28px); transform: scale(.95); }
  .news__img { aspect-ratio: 350 / 219; margin-bottom: 18px; border-radius: 22px; }
  .news__title { font-size: 22px; line-height: 1.18; }
  .news__bar { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .news__controls { justify-content: center; }
  .news__bar .btn { align-self: center; }
}

/* Without JS (or under reduced motion) the track becomes a plain swipe row */
html:not(.js) .news__viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; padding-inline: var(--gutter); cursor: auto; }
html:not(.js) .news__slide { opacity: 1; transform: none; scroll-snap-align: center; }
html:not(.js) .news__controls { display: none; }
