/* =============================================
   news_list.css -- Список новостей (страница /news/)
   Точки перелома Bootstrap 5:
     xl  ≤ 1199.98px
     lg  ≤ 991.98px
     md  ≤ 767.98px
     sm  ≤ 575.98px
   ============================================= */

body {
  background: var(--color-light);
  font-family: var(--font-primary);
  color: var(--color-dark);
  margin: 0;
}

/* --- Контейнер страницы --- */
.news-page__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 60px);
  box-sizing: border-box;
}

/* --- Заголовок страницы --- */
.news-page-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark);
  margin: 0 0 var(--spacing-4xl) 0;
  text-align: left;
}

/* --- Список карточек --- */
#newsList {
  margin-bottom: var(--spacing-3xl);
}

/* --- Карточка новости --- */
.news-card {
  position: relative;
  width: 100%;
  max-width: clamp(260px, 28vw, 300px);
  margin: 0 auto var(--gap-2xl);
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: visible;
}

/* --- Обложка карточки --- */
.news-thumb {
  position: relative;
  height: 100%;
  aspect-ratio: 300 / 268;
  overflow: visible;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Плашка категории --- */
.news-category {
  position: absolute;
  top: -14px;
  right: -20px;
  z-index: 2;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 127px;
  height: 27px;
  background: var(--color-detail);
  color: #000;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-lg);
  white-space: nowrap;
}

/* --- Заголовок карточки --- */
.news-title {
  margin: var(--spacing-md) 0 0;
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

/* --- Кнопка «Ещё» (обёртка + ссылка) --- */
.news-more-box {
  width: clamp(240px, 40vw, 305px);
  height: 52px;
  margin: var(--spacing-xl) auto 200px;
  position: relative;
  border: none;
  outline: none;
  box-shadow: none;
}

.news-more {
  display: inline-block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
  transition: transform var(--transition-fast);
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.news-more img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0 !important;
  outline: 0 !important;
}

/* Текст поверх кнопки */
.news-more__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-light);
  user-select: none;
  pointer-events: none;
}

.news-more:hover {
  transform: scale(1.03);
}

/* Сброс стилей фокуса для кнопки */
.news-more:focus,
.news-more:focus-visible,
.news-more:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.news-more::-moz-focus-inner { border: 0; }


/* ===== АДАПТИВ ===== */

/* --- Планшет (≤ 767.98px) --- */
@media (max-width: 767.98px) {
  .news-page-title {
    margin-bottom: var(--spacing-xl);
    text-align: center;
  }

  .news-more-box {
    width: 260px;
    height: 44px;
  }

  .news-more__label {
    font-size: var(--font-size-lg);
  }
}

/* --- Мобильный (≤ 575.98px) --- */
@media (max-width: 575.98px) {
  .chip {
    height: 22px;
    font-size: var(--font-size-xs);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
  }
}
