/* ============================================================
   «НОВОСТИ И СТАТЬИ» НА ГЛАВНОЙ (донор: infoblock с табами)
   Табы Новости / Статьи + горизонтальная лента карточек.
   ============================================================ */

.news__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}

.news__intro{min-width:0}

.news__bar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

/* ---------- табы ---------- */
.news__tabs{
  display:inline-flex;
  gap:4px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--white);
}

.news__tab{
  padding:9px 18px;
  border:0;
  border-radius:999px;
  background:none;
  font-family:var(--font-text);
  font-size:13.5px;
  font-weight:600;
  line-height:1.2;
  color:var(--ink-600);
  cursor:pointer;
  transition:background .18s ease, color .18s ease;
}
.news__tab:hover{color:var(--ink-900);background:var(--surface)}
.news__tab.is-on{background:var(--ink-900);color:var(--white)}
.news__tab.is-on:hover{background:var(--ink-900);color:var(--white)}

/* ---------- стрелки ---------- */
.news__nav{display:flex;gap:8px}

.news__arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--white);
  color:var(--ink-900);
  cursor:pointer;
  transition:background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.news__arrow svg{width:17px;height:17px}
.news__arrow:hover{background:var(--red-600);border-color:var(--red-600);color:var(--white)}
.news__arrow:disabled{opacity:.35;cursor:default}
.news__arrow:disabled:hover{background:var(--white);border-color:var(--line);color:var(--ink-900)}

/* ---------- лента ---------- */
.news__pane{margin-top:26px}
.news__pane[hidden]{display:none}

.news__track{
  display:flex;
  gap:16px;
  margin:0;
  padding:2px 0 4px;
  list-style:none;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.news__track::-webkit-scrollbar{display:none}

.news__item{
  flex:0 0 calc((100% - 32px) / 3);
  min-width:0;
  scroll-snap-align:start;
}

.news__card{
  display:flex;
  flex-direction:column;
  height:100%;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:var(--white);
  transition:box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.news__card:hover{
  border-color:transparent;
  box-shadow:var(--shadow-md);
  transform:translateY(-2px);
}

.news__media{
  display:block;
  aspect-ratio:16/10;
  overflow:hidden;
  background:var(--surface);
}
.news__media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s cubic-bezier(.22,.8,.24,1);
}
.news__card:hover .news__media img{transform:scale(1.04)}

.news__body{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:18px 20px 20px;
}

.news__date{
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--red-600);
}

.news__title{
  font-family:var(--font-heading);
  font-weight:700;
  font-size:16.5px;
  line-height:1.28;
  color:var(--ink-900);
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.news__text{
  font-size:13.5px;
  line-height:1.5;
  color:var(--ink-400);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* ---------- низ ---------- */
.news__foot{
  display:flex;
  justify-content:flex-start;
  margin-top:20px;
}

.news__all{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-text);
  font-size:14px;
  font-weight:600;
  color:var(--ink-900);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .18s ease, border-color .18s ease;
}
.news__all span{transition:transform .18s ease}
.news__all:hover{color:var(--red-600);border-color:var(--red-600)}
.news__all:hover span{transform:translateX(3px)}

/* ---------- адаптив ---------- */
@media (max-width:1100px){
  .news__item{flex-basis:calc((100% - 16px) / 2)}
}

@media (max-width:820px){
  .news__head{align-items:flex-start}
  .news__bar{width:100%;justify-content:space-between}
  .news__item{flex-basis:min(78%,320px)}
  .news__track{
    /* лента выходит за поля контейнера — карточки «выглядывают» справа */
    margin-right:-16px;
    padding-right:16px;
  }
}

@media (max-width:640px){
  /* на телефоне лента листается пальцем — стрелки не нужны */
  .news__nav{display:none}
}

@media (max-width:480px){
  .news__tabs{padding:3px}
  .news__tab{padding:8px 14px;font-size:12.5px}
  .news__item{flex-basis:min(84%,300px)}
  .news__title{font-size:15.5px}
  .news__body{padding:16px 16px 18px}
}

@media (prefers-reduced-motion:reduce){
  .news__track{scroll-behavior:auto}
  .news__card,.news__media img{transition:none}
}
