/* ===== HERO-БЛОК НОВОСТИ ===== */
.hero-news {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 100px 20px;
  animation: hero-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-news::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 40px));
  height: 1px;
  background-color: var(--color-black);
  opacity: 0.5;
}

.header__title-news {
  font-size: 80px;
  font-weight: 500;
  line-height: 96px;
  margin: 0;
  overflow-wrap: anywhere;
}

.hero-news .container {
  width: 100%;
  min-width: 0;
}

/* ===== МЕТА-СТРОКА (тег + дата) ===== */
.news-post__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 30px;
  animation: hero-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.news-post__tag {
  padding: 6px 16px;
  border: 1px solid #c2551e;
  border-radius: 100px;
  color: #c2551e;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-post__date {
  font-size: 14px;
  opacity: 0.6;
}

/* ===== HERO-ИЗОБРАЖЕНИЕ ===== */
.news-post__hero {
  padding: 60px 0;
}

.news-post__figure {
  margin: 0;
}

.news-post__hero-img {
  width: 80%;
  height: 80vh;
  margin: 0 auto;
  min-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.news-post__caption {
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.6;
  text-align: center;
}

/* ===== ТЕКСТ НОВОСТИ ===== */
/* Узкая колонка для читабельности */
.news-post__text {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Стили для Gutenberg-контента (стандартный HTML) */
.news-post__text > p:first-child {
  font-size: 24px;
  line-height: 36px;
  font-weight: 500;
  margin-bottom: 32px;
}

.news-post__text p {
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.news-post__text h2 {
  font-size: 36px;
  font-weight: 500;
  line-height: 44px;
  margin: 48px 0 24px;
}

.news-post__text h3 {
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
  margin: 36px 0 20px;
}

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

.news-post__text ul li {
  position: relative;
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 12px;
  list-style: none;
}

/* Оранжевая точка-маркер в стиле сайта */
.news-post__text ul li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #c2551e;
}

.news-post__text ol li {
  font-size: 18px;
  line-height: 30px;
  margin-bottom: 12px;
}

.news-post__text blockquote {
  margin: 40px 0;
  padding: 32px 40px;
  border-left: 3px solid #c2551e;
  background-color: rgba(194, 85, 30, 0.06);
  font-size: 22px;
  line-height: 34px;
  font-weight: 500;
  border-radius: 0 2px 2px 0;
}

.news-post__text blockquote p:last-child {
  margin-top: 16px;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  opacity: 0.6;
  margin-bottom: 0;
}

.news-post__text a {
  color: #c2551e;
  text-decoration: underline;
}

.news-post__text a:hover {
  text-decoration: none;
}

.news-post__text img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
  margin: 24px 0;
}

/* ===== ГАЛЕРЕЯ / КАРУСЕЛЬ ===== */
.news-post__gallery {
  padding: 40px 0 80px;
  position: relative; /* Для позиционирования кнопок */
}

.news-post__gallery-title {
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 32px;
}

.news-post__carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.news-post__carousel::-webkit-scrollbar {
  display: none;
}

/* Триггер лайтбокса */
.gallery__lightbox-trigger {
  flex: 0 0 auto;
  width: 480px;
  height: 320px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  scroll-snap-align: start;
  border-radius: 2px;
  overflow: hidden;
}

.gallery__lightbox-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  transition: transform 0.4s ease;
}

.gallery__lightbox-trigger:hover img {
  transform: scale(1.05);
}

/* Иконка лупы при наведении */
.gallery__lightbox-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(194, 85, 30, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.gallery__lightbox-trigger:hover .gallery__lightbox-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== КНОПКИ НАВИГАЦИИ (переиспользуем стили) ===== */
.carousel-btn {
  position: absolute;
  top: 50%; /* Центрируем относительно .news-post__gallery */
  transform: translateY(-50%);
  z-index: 10;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(194, 85, 30, 0.9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover:not(:disabled) {
  background: #c2551e;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active:not(:disabled) {
  transform: translateY(-50%) scale(0.95);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-btn--prev {
  left: 15px;
}
.carousel-btn--next {
  right: 15px;
}

/* ===== ЛАЙТБОКС (МОДАЛЬНОЕ ОКНО) ===== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-modal__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  border: none;
  cursor: zoom-out;
}

.lightbox-modal__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-modal__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-modal.is-open .lightbox-modal__img {
  transform: scale(1);
}

.lightbox-modal__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== НАВИГАЦИЯ ВНИЗУ ===== */
.news-post__nav {
  border-top: 1px solid rgba(27, 25, 23, 0.15);
  padding: 40px 0;
}

.news-post__nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.news-post__back {
  font-size: 16px;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-post__back:hover {
  color: #c2551e;
}

/* ===== АНИМАЦИИ ===== */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ФИЛЬТР ПО РУБРИКАМ ===== */
.news-filter {
  margin-bottom: 60px;
  margin-top: -100px; /* Чтобы кнопки были ближе к hero-блоку */
}

.news-filter__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.news-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid rgba(27, 25, 23, 0.2);
  background-color: transparent;
  color: var(--color-black);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.news-filter__btn:hover {
  border-color: #c2551e;
  color: #c2551e;
}

.news-filter__btn.is-active {
  background-color: #c2551e;
  border-color: #c2551e;
  color: #fff;
}

.news-filter__count {
  font-size: 13px;
  opacity: 0.7;
}

.news-filter__btn.is-active .news-filter__count {
  opacity: 0.9;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
  .carousel-btn {
    width: 44px;
    height: 44px;
  }
  .carousel-btn--prev {
    left: 10px;
  }
  .carousel-btn--next {
    right: 10px;
  }
  .gallery__lightbox-trigger {
    width: 400px;
    height: 266px;
  }
}

@media (max-width: 768px) {
  .hero-news {
    min-height: 60vh;
    padding: 80px 20px;
  }

  .header__title-news {
    font-size: 40px;
    line-height: 48px;
  }

  .news-post__hero {
    padding: 40px 20px;
  }

  .news-post__hero-img {
    height: 50vh;
    min-height: 260px;
  }

  .news-post__content {
    padding: 40px 0 60px;
  }

  .news-post__text > p:first-child {
    font-size: 20px;
    line-height: 30px;
  }

  .news-post__text p,
  .news-post__text ul li,
  .news-post__text ol li {
    font-size: 16px;
    line-height: 26px;
  }

  .news-post__text h2 {
    font-size: 26px;
    line-height: 32px;
  }

  .news-post__text h3 {
    font-size: 22px;
    line-height: 28px;
  }

  .news-post__text blockquote {
    padding: 24px;
    font-size: 18px;
    line-height: 28px;
  }

  .news-post__carousel img {
    width: 85vw;
    height: 60vw;
  }

  .news-post__nav .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .news-filter {
    margin-top: -60px;
    margin-bottom: 40px;
  }

  .news-filter__buttons {
    gap: 8px;
  }

  .news-filter__btn {
    padding: 10px 18px;
    font-size: 14px;
  }

  .gallery__lightbox-trigger {
    width: 85vw;
    height: 56vw;
  }
  .lightbox-modal__close {
    top: -40px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .header__title-news {
    font-size: 32px;
    line-height: 40px;
  }

  .news-filter__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .news-filter__btn {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .header__title-news {
    font-size: 26px;
    line-height: 34px;
  }
}
