/* === NEWS SECTION === */
:root {
  --yelli-orange: #eb5200;
  --yelli-brown: #493627;
  --yelli-beige: #f7f4ee;
  --yelli-border: #eae4e5;
}

/* === NEWS LIST PAGE === */
.news-page {
  background: #fff;
}

/* Шапка как на /buy/ — белый фон, заголовок + описание */
.news-page__header {
  padding: 100px 0 48px;
  text-align: center;
  background: #fff;
}

.news-page__header h1 {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 55px;
  text-transform: uppercase;
  color: var(--yelli-brown);
  line-height: 1.25;
  margin-bottom: 24px;
}

.news-page__header-note {
  color: rgba(73, 54, 39, 0.8);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 767.98px) {
  .news-page__header h1 {
    font-size: 40px;
  }
  .news-page__header-note {
    font-size: 16px;
  }
}

@media (max-width: 575.98px) {
  .news-page__header h1 {
    font-size: 32px;
  }
}

/* Фильтр по типам — в стиле assortment-page-section__nav */
.news-filter {
  padding: 0 0 48px;
  background: #fff;
}

.news-filter ul {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-filter ul li {
  padding: 0 24px;
}

.news-filter ul li:not(:last-child) {
  border-right: 1px solid var(--yelli-border);
}

@media (max-width: 575.98px) {
  .news-filter ul {
    flex-direction: column;
    gap: 16px;
  }
  .news-filter ul li {
    padding: 0;
    border-right: none !important;
  }
}

.news-filter ul li a {
  color: rgba(73, 54, 39, 0.8);
  font-size: 18px;
  transition: all 0.24s ease-in-out;
  text-decoration: none;
}

.news-filter ul li a:hover {
  color: rgba(73, 54, 39, 0.5);
}

.news-filter ul li a.active {
  color: var(--yelli-orange);
}

/* Список новостей */
.news-list {
  padding: 80px 0 200px;
  background: var(--yelli-beige);
  position: relative;
}

.news-list::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 188.4px;
  background: url("/images/fence-beige.svg") repeat-x center bottom;
  background-size: 1149px 100%;
  z-index: 1;
}

.news-list::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 188.4px;
  background: url("/images/fence-beige.svg") repeat-x center bottom;
  background-size: 1149px 100%;
  z-index: 1;
  transform: rotate(180deg);
}

.news-list__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

@media (max-width: 991.98px) {
  .news-list__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  .news-list__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Карточка новости */
.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.24s ease-in-out, box-shadow 0.24s ease-in-out;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(73, 54, 39, 0.12);
}

.news-card:hover .news-card__image img {
  transform: scale(1.05);
}

.news-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease-in-out;
  display: block;
}

.news-card__date {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--yelli-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 1000px;
  letter-spacing: 0.5px;
}

.news-card__content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-card__title {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--yelli-brown);
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.news-card__excerpt {
  font-size: 16px;
  color: rgba(73, 54, 39, 0.7);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.news-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yelli-orange);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: opacity 0.24s ease-in-out;
}

.news-card__more::after {
  content: "→";
  transition: transform 0.24s ease-in-out;
}

.news-card:hover .news-card__more::after {
  transform: translateX(4px);
}

/* Пагинация */
.news-list__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 64px;
  position: relative;
  z-index: 2;
}

.news-list__page {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--yelli-border);
  background: #fff;
  color: var(--yelli-brown);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.24s ease-in-out;
}

.news-list__page:hover,
.news-list__page_active {
  background: var(--yelli-orange);
  border-color: var(--yelli-orange);
  color: #fff;
}

/* === NEWS DETAIL PAGE === */
.news-detail {
  background: #fff;
}

.news-detail__header {
  padding: 100px 0 48px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.news-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(73, 54, 39, 0.48);
  font-size: 18px;
  margin-bottom: 32px;
  transition: all 0.24s ease-in-out;
  text-decoration: none;
}

.news-detail__back:hover {
  opacity: 0.64;
  color: var(--yelli-orange);
}

.news-detail__back svg {
  transform: rotate(90deg);
  width: 16px;
  height: 16px;
}

/* Дата отдельно — НЕ в одной строке с "Назад" */
.news-detail__date {
  display: inline-block;
  background: var(--yelli-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 1000px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.news-detail__title {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 48px;
  text-transform: uppercase;
  color: var(--yelli-brown);
  line-height: 1.25;
  margin-bottom: 32px;
}

@media (max-width: 767.98px) {
  .news-detail__title {
    font-size: 28px;
  }
}

.news-detail__image {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 64px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.news-detail__image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 44.4px;
  background: url("/images/subscribe-after.svg") repeat-x center bottom;
  background-size: 1141px 100%;
  z-index: 2;
}

.news-detail__image img {
  width: 100%;
  height: auto;
  display: block;
}

.news-detail__body {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 120px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(73, 54, 39, 0.85);
}

.news-detail__body h2 {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 32px;
  text-transform: uppercase;
  color: var(--yelli-brown);
  margin: 48px 0 24px;
  line-height: 1.3;
}

.news-detail__body h3 {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 24px;
  color: var(--yelli-brown);
  margin: 32px 0 16px;
}

.news-detail__body p {
  margin-bottom: 20px;
}

.news-detail__body img {
  border-radius: 10px;
  margin: 32px 0;
  width: 100%;
  display: block;
}

.news-detail__body blockquote {
  background: var(--yelli-beige);
  border-left: 4px solid var(--yelli-orange);
  padding: 24px 32px;
  margin: 32px 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--yelli-brown);
}

.news-detail__body ul,
.news-detail__body ol {
  margin: 20px 0;
  padding-left: 24px;
}

.news-detail__body li {
  margin-bottom: 8px;
}

.news-detail__divider {
  max-width: 800px;
  margin: 0 auto 64px;
  height: 1px;
  background: var(--yelli-border);
}

/* === RELATED NEWS === */
.news-detail__related {
  background: var(--yelli-beige);
  padding: 120px 0;
  position: relative;
}

.news-detail__related::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 188.4px;
  background: url("/images/fence-beige.svg") repeat-x center bottom;
  background-size: 1149px 100%;
  z-index: 1;
}

.news-detail__related-header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  z-index: 2;
}

/* Заголовок в стиле h2 сайта */
.news-detail__related-title {
  font-family: "Avenir Next Cyr", sans-serif;
  font-weight: 500;
  font-size: 55px;
  text-transform: uppercase;
  color: var(--yelli-brown);
  line-height: 1.25;
  margin-bottom: 32px;
}

@media (max-width: 767.98px) {
  .news-detail__related-title {
    font-size: 40px;
  }
}

@media (max-width: 575.98px) {
  .news-detail__related-title {
    font-size: 32px;
  }
}

/* Кнопка "Все новости" */
.news-detail__related-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-family: "Avenir Next Cyr", sans-serif;
  font-size: 18px;
  color: #fff;
  background: var(--yelli-orange);
  border-radius: 1000px;
  text-decoration: none;
  transition: background 0.24s ease-in-out;
}

.news-detail__related-btn:hover {
  background: rgb(255, 109, 31);
}

.news-detail__related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

@media (max-width: 991.98px) {
  .news-detail__related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767.98px) {
  .news-detail__related-grid {
    grid-template-columns: 1fr;
  }
}
