.elementor-18 .elementor-element.elementor-element-1bd911ef{--display:flex;}:root{--page-title-display:none;}/* Start custom CSS */<style>
.bhn-page,
.bhn-page *,
.bhn-page *::before,
.bhn-page *::after {
  box-sizing: border-box;
}

.bhn-page {
  --bhn-black: #050605;
  --bhn-dark: #10120d;
  --bhn-dark-soft: #15140f;
  --bhn-cream: #f2ecdf;
  --bhn-cream-soft: #d7cbb7;
  --bhn-muted: #a99f8d;
  --bhn-gold: #c8a24a;
  --bhn-gold-light: #dfbd63;
  --bhn-gold-dark: #9e7d2c;
  --bhn-card: #f6efe1;
  --bhn-copy: #514a3d;

  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--bhn-cream);
  background: var(--bhn-black);
}

.bhn-page section,
.bhn-page main,
.bhn-page div,
.bhn-page article,
.bhn-page header {
  min-width: 0;
}

.bhn-page h1,
.bhn-page h2,
.bhn-page h3,
.bhn-page p,
.bhn-page a,
.bhn-page span,
.bhn-page time {
  max-width: 100%;
  overflow-wrap: break-word;
}

.bhn-page a {
  color: inherit;
  text-decoration: none;
}

.bhn-page img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.bhn-container {
  width: min(1280px, calc(100% - 48px));
  max-width: 1280px;
  margin-inline: auto;
}

/* ---------- DECOR ---------- */

.bhn-texture,
.bhn-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bhn-texture {
  opacity: 0.16;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.bhn-vignette {
  background:
    radial-gradient(
      circle at center,
      transparent 0,
      transparent 42%,
      rgba(0, 0, 0, 0.64) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.25),
      transparent 18%,
      rgba(0, 0, 0, 0.62)
    );
}

/* ---------- TYPOGRAPHY ---------- */

.bhn-kicker {
  margin: 0 0 18px;
  color: var(--bhn-gold);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.bhn-page-title {
  max-width: 920px;
  margin: 0 0 24px;
  color: var(--bhn-cream);
  font-family: "Bebas Neue", "Oswald", Arial, sans-serif;
  font-size: clamp(64px, 8.4vw, 128px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.022em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 26px 80px rgba(0, 0, 0, 0.88);
}

.bhn-section-title {
  margin: 0;
  color: var(--bhn-cream);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.bhn-lead {
  max-width: 760px;
  margin: 0;
  color: var(--bhn-cream-soft);
  font-family: "Inter", Arial, sans-serif;
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.58;
}

.bhn-section-note {
  max-width: 490px;
  margin: 0;
  color: var(--bhn-muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.62;
}

/* ---------- BUTTONS ---------- */

.bhn-btn,
.bhn-load-more {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.bhn-btn:hover,
.bhn-load-more:hover {
  transform: translateY(-2px);
}

.bhn-btn--gold,
.bhn-load-more {
  color: #171207;
  background: linear-gradient(180deg, var(--bhn-gold-light), var(--bhn-gold));
  box-shadow: 0 16px 42px rgba(200, 162, 74, 0.26);
}

.bhn-btn--outline {
  color: var(--bhn-cream);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.26);
}

.bhn-btn--outline:hover {
  color: var(--bhn-gold);
  border-color: var(--bhn-gold);
}

.bhn-load-more:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

/* =========================================================
   HERO
   ========================================================= */

.bhn-hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  padding: 176px 0 96px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.94),
      rgba(0, 0, 0, 0.57) 54%,
      rgba(0, 0, 0, 0.88)
    ),
    url("/wp-content/uploads/bh-assets/news/news-hero.webp")
      center / cover no-repeat,
    #080907;
}

.bhn-hero::after,
.bhn-news-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1280px, calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 162, 74, 0.44),
    transparent
  );
}

.bhn-hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 790px) minmax(310px, 410px);
  gap: clamp(40px, 5vw, 72px);
  align-items: end;
}

.bhn-hero__meta,
.bhn-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bhn-hero__meta {
  margin-top: 32px;
}

.bhn-hero__actions {
  margin-top: 27px;
}

.bhn-hero__meta span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  color: var(--bhn-cream-soft);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bhn-hero-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  justify-self: end;
  padding: 31px;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.065),
      rgba(255, 255, 255, 0.025)
    ),
    rgba(8, 9, 7, 0.78);
  border: 1px solid rgba(200, 162, 74, 0.32);
  border-radius: 28px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bhn-hero-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(200, 162, 74, 0.13);
  border-radius: 21px;
  pointer-events: none;
}

.bhn-hero-card > * {
  position: relative;
  z-index: 1;
}

.bhn-hero-card__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--bhn-cream-soft);
  font-family: "Inter", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bhn-hero-card__status i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #74d46e;
  box-shadow: 0 0 0 0 rgba(116, 212, 110, 0.7);
  animation: bhnPulse 1.45s infinite;
}

@keyframes bhnPulse {
  to {
    box-shadow: 0 0 0 14px rgba(116, 212, 110, 0);
  }
}

.bhn-hero-card h2 {
  margin: 0 0 13px;
  color: var(--bhn-cream);
  font-family: "Oswald", Arial, sans-serif;
  font-size: 31px;
  line-height: 1.07;
  text-transform: uppercase;
}

.bhn-hero-card p {
  margin: 0 0 22px;
  color: var(--bhn-muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.62;
}

.bhn-card-link {
  color: var(--bhn-gold);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   DYNAMIC NEWS GRID
   ========================================================= */

.bhn-news-section {
  position: relative;
  padding: 104px 0 112px;
  background:
    radial-gradient(
      circle at 50% 0,
      rgba(200, 162, 74, 0.13),
      transparent 30%
    ),
    var(--bhn-black);
}

.bhn-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}

.bhn-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.bhn-news-card {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--bhn-dark-soft);
  background: var(--bhn-card);
  border: 1px solid rgba(200, 162, 74, 0.23);
  border-radius: 27px;
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.bhn-news-card:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 162, 74, 0.5);
  box-shadow: 0 27px 76px rgba(0, 0, 0, 0.25);
}

.bhn-news-card__image-link {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(200, 162, 74, 0.24),
      transparent 34%
    ),
    linear-gradient(145deg, #171a13, #080907);
}

.bhn-news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.bhn-news-card:hover .bhn-news-card__image {
  transform: scale(1.045);
}

.bhn-news-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.24));
  pointer-events: none;
}

.bhn-news-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--bhn-gold);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.bhn-news-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.bhn-news-card__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--bhn-gold-dark);
  font-family: "Inter", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bhn-news-card__date::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--bhn-gold);
  box-shadow: 0 0 0 4px rgba(200, 162, 74, 0.13);
}

.bhn-news-card__title {
  margin: 0;
  color: var(--bhn-dark-soft);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(25px, 2vw, 31px);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bhn-news-card__title a {
  transition: color 0.2s ease;
}

.bhn-news-card__title a:hover {
  color: var(--bhn-gold-dark);
}

.bhn-news-card__excerpt {
  display: -webkit-box;
  margin: 15px 0 0;
  overflow: hidden;
  color: var(--bhn-copy);
  font-family: "Inter", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.bhn-news-card__footer {
  margin-top: auto;
  padding-top: 22px;
}

.bhn-news-card__button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  color: #171207 !important;
  background: linear-gradient(180deg, var(--bhn-gold-light), var(--bhn-gold));
  border: 1px solid rgba(126, 96, 25, 0.22);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(200, 162, 74, 0.2);
  font-family: "Inter", Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.bhn-news-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 38px rgba(200, 162, 74, 0.3);
}

.bhn-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

.bhn-load-more[hidden] {
  display: none;
}

/* ---------- STATES ---------- */

.bhn-loading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ВАЖНО: скрывает скелетон после завершения загрузки.
   Без этого display:grid может визуально переопределить атрибут hidden. */
.bhn-loading-grid[hidden] {
  display: none !important;
}

.bhn-skeleton {
  min-height: 430px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 27px;
}

.bhn-skeleton::before {
  content: "";
  display: block;
  width: 100%;
  height: 210px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.02)
    );
  background-size: 220% 100%;
  animation: bhnSkeleton 1.3s linear infinite;
}

.bhn-skeleton::after {
  content: "";
  display: block;
  width: calc(100% - 48px);
  height: 122px;
  margin: 28px 24px;
  border-radius: 12px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02)
    );
  background-size: 220% 100%;
  animation: bhnSkeleton 1.3s linear infinite;
}

@keyframes bhnSkeleton {
  to {
    background-position: -220% 0;
  }
}

.bhn-message {
  padding: 25px;
  color: var(--bhn-cream-soft);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 21px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.bhn-message--error {
  color: #e7bbb4;
  border-color: rgba(168, 73, 49, 0.35);
  background: rgba(168, 73, 49, 0.1);
}

/* =========================================================
   CTA
   ========================================================= */

.bhn-cta {
  position: relative;
  padding: 104px 0;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.9),
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.9)
    ),
    url("/wp-content/uploads/bh-assets/news/news-cta.webp")
      center / cover no-repeat,
    #080907;
}

.bhn-cta__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 740px) auto;
  gap: 36px;
  align-items: center;
}

.bhn-cta__text {
  max-width: 720px;
  margin: 23px 0 0;
  color: var(--bhn-cream-soft);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

.bhn-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .bhn-news-grid,
  .bhn-loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bhn-cta__grid {
    grid-template-columns: 1fr;
  }

  .bhn-cta__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .bhn-container {
    width: min(1280px, calc(100% - 34px));
  }

  .bhn-hero {
    min-height: auto;
    padding-top: 145px;
  }

  .bhn-hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .bhn-hero-card {
    max-width: 720px;
    justify-self: start;
  }

  .bhn-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }
}

@media (max-width: 767px) {
  .bhn-container {
    width: calc(100% - 30px);
  }

  .bhn-hero {
    padding: 124px 0 68px;
  }

  .bhn-page-title {
    font-size: clamp(52px, 16vw, 78px);
    line-height: 0.95;
  }

  .bhn-lead {
    font-size: 16px;
  }

  .bhn-hero__meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bhn-hero__meta span {
    justify-content: flex-start;
  }

  .bhn-hero__actions,
  .bhn-cta__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bhn-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .bhn-hero-card {
    padding: 23px;
    border-radius: 23px;
  }

  .bhn-news-section,
  .bhn-cta {
    padding-top: 70px;
    padding-bottom: 74px;
  }

  .bhn-section-title {
    font-size: clamp(31px, 9vw, 43px);
  }

  .bhn-news-grid,
  .bhn-loading-grid {
    grid-template-columns: 1fr;
  }

  .bhn-news-card {
    border-radius: 22px;
  }

  .bhn-news-card__body {
    padding: 20px;
  }

  .bhn-news-card__button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .bhn-container {
    width: calc(100% - 24px);
  }

  .bhn-page-title {
    font-size: clamp(46px, 15vw, 66px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bhn-news-card,
  .bhn-news-card__image,
  .bhn-news-card__button,
  .bhn-btn,
  .bhn-load-more {
    transition: none;
  }

  .bhn-skeleton::before,
  .bhn-skeleton::after {
    animation: none;
  }
}

/* =========================================================
   FINAL ADAPTIVE FIX — NEWS PAGE
   Аккуратная адаптация под все устройства
   + запрет переноса заголовков по буквам.
   Плашка HERO не сдвигается.
   ========================================================= */

/* Базовая защита страницы */
.bhn-page {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Контент остаётся в читаемой ширине */
.bhn-page .bhn-container {
  width: min(1280px, calc(100% - 48px)) !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  min-width: 0 !important;
}

/* Запрет переноса заголовков по буквам */
.bhn-page h1,
.bhn-page h2,
.bhn-page h3,
.bhn-page h4,
.bhn-page .bhn-page-title,
.bhn-page .bhn-section-title,
.bhn-page .bhn-hero-card h2,
.bhn-page .bhn-news-card__title,
.bhn-page .bhn-news-card__title a,
.bhn-page .bhn-news-card__placeholder {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  white-space: normal !important;
  text-wrap: balance;
}

/* Обычный текст переносится нормально, без разрыва заголовков по буквам */
.bhn-page p,
.bhn-page li,
.bhn-page span,
.bhn-page time,
.bhn-page a {
  word-break: normal !important;
  hyphens: none !important;
}

/* Для длинных фрагментов в обычном тексте оставляем безопасный перенос */
.bhn-page p,
.bhn-page li {
  overflow-wrap: break-word !important;
}

/* Кнопки не ломают сетку */
.bhn-page .bhn-btn,
.bhn-page .bhn-load-more,
.bhn-page .bhn-news-card__button {
  max-width: 100% !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.15 !important;
}

/* HERO — аккуратные размеры без сдвига правой плашки */
.bhn-page .bhn-hero {
  min-height: clamp(620px, 72vh, 760px);
}

.bhn-page .bhn-hero__grid {
  min-width: 0;
}

.bhn-page .bhn-page-title {
  font-size: clamp(60px, 7.8vw, 124px) !important;
  line-height: 0.92 !important;
  letter-spacing: 0.02em !important;
}

.bhn-page .bhn-lead {
  font-size: clamp(18px, 1.7vw, 23px) !important;
  line-height: 1.6 !important;
}

.bhn-page .bhn-hero-card h2 {
  font-size: clamp(26px, 2.1vw, 32px) !important;
  line-height: 1.1 !important;
  letter-spacing: 0.018em !important;
}

.bhn-page .bhn-hero-card p {
  line-height: 1.62 !important;
}

/* Секции и заголовки */
.bhn-page .bhn-section-title {
  font-size: clamp(34px, 4.15vw, 62px) !important;
  line-height: 1.04 !important;
  letter-spacing: 0.026em !important;
}

.bhn-page .bhn-news-section,
.bhn-page .bhn-cta {
  overflow: hidden;
}

/* Шапка секции новостей */
.bhn-page .bhn-section-head {
  min-width: 0;
}

.bhn-page .bhn-section-note {
  line-height: 1.62 !important;
}

/* Карточки новостей */
.bhn-page .bhn-news-grid,
.bhn-page .bhn-loading-grid {
  align-items: stretch;
}

.bhn-page .bhn-news-card {
  height: 100%;
}

.bhn-page .bhn-news-card__title {
  font-size: clamp(24px, 1.9vw, 31px) !important;
  line-height: 1.1 !important;
  letter-spacing: 0.018em !important;
}

.bhn-page .bhn-news-card__excerpt {
  font-size: 14.5px !important;
  line-height: 1.62 !important;
}

/* CTA */
.bhn-page .bhn-cta__grid,
.bhn-page .bhn-cta__actions {
  min-width: 0;
}

/* =========================================================
   LAPTOP / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1180px) {
  .bhn-page .bhn-container {
    width: min(1280px, calc(100% - 44px)) !important;
  }

  .bhn-page .bhn-news-grid,
  .bhn-page .bhn-loading-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .bhn-page .bhn-cta__grid {
    grid-template-columns: 1fr !important;
  }

  .bhn-page .bhn-cta__actions {
    justify-content: flex-start !important;
  }

  .bhn-page .bhn-page-title {
    font-size: clamp(56px, 8.2vw, 96px) !important;
    line-height: 0.96 !important;
  }

  .bhn-page .bhn-section-title {
    font-size: clamp(31px, 5vw, 52px) !important;
    line-height: 1.07 !important;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 980px) {
  .bhn-page .bhn-container {
    width: min(1280px, calc(100% - 38px)) !important;
  }

  .bhn-page .bhn-hero {
    min-height: auto !important;
    padding-top: 145px !important;
    padding-bottom: 84px !important;
  }

  .bhn-page .bhn-hero__grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .bhn-page .bhn-hero-card {
    max-width: 720px !important;
    justify-self: start !important;
  }

  .bhn-page .bhn-page-title {
    font-size: clamp(50px, 10vw, 82px) !important;
    line-height: 0.98 !important;
    letter-spacing: 0.014em !important;
  }

  .bhn-page .bhn-lead {
    max-width: 680px !important;
    font-size: 17px !important;
    line-height: 1.62 !important;
  }

  .bhn-page .bhn-hero__meta {
    gap: 9px !important;
  }

  .bhn-page .bhn-hero__meta span {
    min-height: 36px !important;
    font-size: 11px !important;
  }

  .bhn-page .bhn-section-head {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 22px !important;
  }

  .bhn-page .bhn-section-note {
    max-width: 720px !important;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
  .bhn-page .bhn-container {
    width: calc(100% - 34px) !important;
  }

  .bhn-page .bhn-hero {
    padding-top: 124px !important;
    padding-bottom: 70px !important;
  }

  .bhn-page .bhn-page-title {
    font-size: clamp(40px, 11.8vw, 62px) !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
  }

  .bhn-page .bhn-lead {
    font-size: 16px !important;
    line-height: 1.62 !important;
  }

  .bhn-page .bhn-section-title {
    font-size: clamp(27px, 7.7vw, 40px) !important;
    line-height: 1.12 !important;
    letter-spacing: 0.014em !important;
  }

  .bhn-page .bhn-section-head {
    margin-bottom: 34px !important;
  }

  .bhn-page .bhn-section-note {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  .bhn-page .bhn-hero__meta,
  .bhn-page .bhn-hero__actions,
  .bhn-page .bhn-cta__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .bhn-page .bhn-hero__meta span {
    justify-content: flex-start !important;
    width: 100% !important;
  }

  .bhn-page .bhn-btn,
  .bhn-page .bhn-load-more {
    width: 100% !important;
    min-height: 50px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    white-space: normal !important;
  }

  .bhn-page .bhn-hero-card {
    max-width: 100% !important;
    padding: 24px !important;
    border-radius: 24px !important;
  }

  .bhn-page .bhn-hero-card h2 {
    font-size: clamp(24px, 6.5vw, 32px) !important;
    line-height: 1.12 !important;
  }

  .bhn-page .bhn-hero-card p {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
  }

  .bhn-page .bhn-news-section,
  .bhn-page .bhn-cta {
    padding-top: 72px !important;
    padding-bottom: 74px !important;
  }

  .bhn-page .bhn-news-grid,
  .bhn-page .bhn-loading-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .bhn-page .bhn-news-card {
    border-radius: 22px !important;
  }

  .bhn-page .bhn-news-card__body {
    padding: 22px !important;
  }

  .bhn-page .bhn-news-card__title {
    font-size: clamp(24px, 6.6vw, 33px) !important;
    line-height: 1.12 !important;
  }

  .bhn-page .bhn-news-card__excerpt {
    font-size: 14.5px !important;
    line-height: 1.58 !important;
  }

  .bhn-page .bhn-news-card__button {
    width: 100% !important;
  }

  .bhn-page .bhn-skeleton {
    min-height: 390px !important;
    border-radius: 22px !important;
  }

  .bhn-page .bhn-skeleton::before {
    height: 190px !important;
  }

  .bhn-page .bhn-message {
    padding: 22px !important;
    font-size: 14.5px !important;
    line-height: 1.58 !important;
  }

  .bhn-page .bhn-cta__grid {
    gap: 26px !important;
  }

  .bhn-page .bhn-cta__text {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 430px) {
  .bhn-page .bhn-container {
    width: calc(100% - 24px) !important;
  }

  .bhn-page .bhn-hero {
    padding-top: 112px !important;
    padding-bottom: 62px !important;
  }

  .bhn-page .bhn-page-title {
    font-size: clamp(36px, 10.8vw, 54px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0.006em !important;
  }

  .bhn-page .bhn-section-title {
    font-size: clamp(24px, 7.1vw, 34px) !important;
    line-height: 1.14 !important;
  }

  .bhn-page .bhn-kicker {
    font-size: 10.5px !important;
    letter-spacing: 0.17em !important;
  }

  .bhn-page .bhn-hero-card {
    padding: 22px !important;
  }

  .bhn-page .bhn-news-card__body {
    padding: 20px !important;
  }

  .bhn-page .bhn-news-card__title {
    font-size: clamp(22px, 6.4vw, 30px) !important;
    line-height: 1.14 !important;
  }

  .bhn-page .bhn-news-card__date {
    font-size: 9.5px !important;
    letter-spacing: 0.1em !important;
  }
}

/* =========================================================
   EXTRA SMALL
   ========================================================= */

@media (max-width: 360px) {
  .bhn-page .bhn-page-title {
    font-size: 34px !important;
  }

  .bhn-page .bhn-section-title {
    font-size: 23px !important;
  }

  .bhn-page .bhn-news-card__title {
    font-size: 21px !important;
  }

  .bhn-page .bhn-btn,
  .bhn-page .bhn-load-more,
  .bhn-page .bhn-news-card__button {
    font-size: 11.5px !important;
    letter-spacing: 0.045em !important;
  }
}

<\/style>

<main class="bhn-page" id="bhn-news-page">

  <section class="bhn-hero">
    <div class="bhn-texture" aria-hidden="true"></div>
    <div class="bhn-vignette" aria-hidden="true"></div>

    <div class="bhn-container bhn-hero__grid">

      <div class="bhn-hero__content">
        <p class="bhn-kicker">Новости сервера</p>

        <h1 class="bhn-page-title">
          Новости<br>
          Beyond Horizons
        </h1>

        <p class="bhn-lead">
          Здесь публикуются обновления проекта, изменения сервера,
          анонсы сезонов, новости сообщества, игровые события
          и важные объявления администрации.
        </p>

        <div class="bhn-hero__meta">
          <span>DayZ PVE</span>
          <span>Season 2</span>
          <span>The Tension</span>
          <span>Community News</span>
        </div>

        <div class="bhn-hero__actions">
          <a class="bhn-btn bhn-btn--gold" href="#bhn-latest-news">
            Последние новости
          </a>

          <a class="bhn-btn bhn-btn--outline"
             href="/podklyuchitsya-k-serveru/">
            Подключиться
          </a>
        </div>
      </div>

      <aside class="bhn-hero-card">
        <div class="bhn-hero-card__status">
          <i aria-hidden="true"></i>
          <span>Лента активна</span>
        </div>

        <h2>Следите за событиями</h2>

        <p>
          Новые публикации автоматически появляются здесь после создания
          записи WordPress в рубрике «Новости».
        </p>

        <a href="#bhn-latest-news" class="bhn-card-link">
          Перейти к ленте →
        </a>
      </aside>

    </div>
  </section>

  <section class="bhn-news-section" id="bhn-latest-news">
    <div class="bhn-container">

      <header class="bhn-section-head">
        <div>
          <p class="bhn-kicker">Лента</p>

          <h2 class="bhn-section-title">
            Последние новости
          </h2>
        </div>

        <p class="bhn-section-note">
          Новости выводятся автоматически из рубрики WordPress
          с ярлыком <strong>news</strong>.
        </p>
      </header>

      <div class="bhn-loading-grid" data-bhn-loading aria-label="Загрузка новостей">
        <div class="bhn-skeleton"></div>
        <div class="bhn-skeleton"></div>
        <div class="bhn-skeleton"></div>
      </div>

      <div class="bhn-news-grid" data-bhn-news-grid></div>

      <div class="bhn-message" data-bhn-empty hidden>
        В рубрике «Новости» пока нет опубликованных записей.
      </div>

      <div class="bhn-message bhn-message--error" data-bhn-error hidden>
        Не удалось загрузить новости. Проверьте доступность WordPress REST API
        и наличие рубрики с ярлыком <strong>news</strong>.
      </div>

      <div class="bhn-load-more-wrap">
        <button class="bhn-load-more"
                type="button"
                data-bhn-load-more
                hidden>
          Загрузить ещё
          <span aria-hidden="true">↓</span>
        </button>
      </div>

    </div>
  </section>

  <section class="bhn-cta">
    <div class="bhn-texture" aria-hidden="true"></div>
    <div class="bhn-vignette" aria-hidden="true"></div>

    <div class="bhn-container bhn-cta__grid">
      <div>
        <p class="bhn-kicker">Следите за проектом</p>

        <h2 class="bhn-section-title">
          Не пропускайте важные обновления
        </h2>

        <p class="bhn-cta__text">
          Подпишитесь на Discord и VK проекта, чтобы первыми узнавать
          о событиях, рестартах, обновлениях и сюжетных изменениях.
        </p>
      </div>

      <div class="bhn-cta__actions">
        <a class="bhn-btn bhn-btn--gold"
           href="https://discord.gg/3aBTEy5u8M"
           target="_blank"
           rel="noopener noreferrer">
          Discord
        </a>

        <a class="bhn-btn bhn-btn--outline"
           href="https://vk.ru/club232125889"
           target="_blank"
           rel="noopener noreferrer">
          VK
        </a>

        <a class="bhn-btn bhn-btn--outline"
           href="/podklyuchitsya-k-serveru/">
          Подключиться
        </a>
      </div>
    </div>
  </section>

</main>

<script>
(function () {
  "use strict";

  if (window.BHNewsPageInitialized) {
    return;
  }

  window.BHNewsPageInitialized = true;

  const page = document.getElementById("bhn-news-page");

  if (!page) {
    return;
  }

  const CONFIG = {
    categorySlug: "news",
    postsPerPage: 6,
    excerptLength: 190,
    apiBase: window.location.origin.replace(/\/$/, "") + "/wp-json/wp/v2"
  };

  const grid = page.querySelector("[data-bhn-news-grid]");
  const loading = page.querySelector("[data-bhn-loading]");
  const empty = page.querySelector("[data-bhn-empty]");
  const error = page.querySelector("[data-bhn-error]");
  const loadMoreButton = page.querySelector("[data-bhn-load-more]");

  let categoryId = null;
  let currentPage = 1;
  let totalPages = 1;
  let isLoading = false;

  function decodeEntities(value) {
    const textarea = document.createElement("textarea");
    textarea.innerHTML = String(value || "");
    return textarea.value;
  }

  function stripHtml(value) {
    const temp = document.createElement("div");
    temp.innerHTML = String(value || "");
    return (temp.textContent || temp.innerText || "")
      .replace(/\s+/g, " ")
      .trim();
  }

  function limitText(value, limit) {
    const text = String(value || "").trim();

    if (text.length <= limit) {
      return text;
    }

    const shortened = text.slice(0, limit + 1);
    const lastSpace = shortened.lastIndexOf(" ");

    return (
      shortened.slice(0, lastSpace > 80 ? lastSpace : limit).trim() + "…"
    );
  }

  function formatDate(value) {
    const date = new Date(value);

    if (Number.isNaN(date.getTime())) {
      return "";
    }

    return new Intl.DateTimeFormat("ru-RU", {
      day: "2-digit",
      month: "2-digit",
      year: "numeric"
    }).format(date);
  }

  function getFeaturedImage(post) {
    const embedded = post &&
      post._embedded &&
      post._embedded["wp:featuredmedia"] &&
      post._embedded["wp:featuredmedia"][0];

    if (!embedded) {
      return null;
    }

    const sizes = embedded.media_details && embedded.media_details.sizes;

    const source =
      (sizes && sizes.large && sizes.large.source_url) ||
      (sizes && sizes.medium_large && sizes.medium_large.source_url) ||
      embedded.source_url ||
      "";

    if (!source) {
      return null;
    }

    return {
      source: source,
      alt: embedded.alt_text || stripHtml(post.title && post.title.rendered)
    };
  }

  function createElement(tag, className, text) {
    const element = document.createElement(tag);

    if (className) {
      element.className = className;
    }

    if (typeof text === "string") {
      element.textContent = text;
    }

    return element;
  }

  function createCard(post) {
    const article = createElement("article", "bhn-news-card");
    const link = post.link || "#";
    const title = decodeEntities(
      stripHtml(post.title && post.title.rendered)
    );
    const excerpt = limitText(
      decodeEntities(stripHtml(post.excerpt && post.excerpt.rendered)),
      CONFIG.excerptLength
    );
    const image = getFeaturedImage(post);

    const imageLink = createElement("a", "bhn-news-card__image-link");
    imageLink.href = link;
    imageLink.setAttribute(
      "aria-label",
      "Открыть новость: " + (title || "Без названия")
    );

    if (image) {
      const imageElement = createElement("img", "bhn-news-card__image");
      imageElement.src = image.source;
      imageElement.alt = image.alt || title;
      imageElement.loading = "lazy";
      imageElement.decoding = "async";
      imageLink.appendChild(imageElement);
    } else {
      const placeholder = createElement(
        "span",
        "bhn-news-card__placeholder",
        "BH"
      );
      placeholder.setAttribute("aria-hidden", "true");
      imageLink.appendChild(placeholder);
    }

    imageLink.appendChild(
      createElement("span", "bhn-news-card__shade")
    );

    const body = createElement("div", "bhn-news-card__body");

    const time = createElement(
      "time",
      "bhn-news-card__date",
      formatDate(post.date)
    );
    time.dateTime = post.date || "";

    const heading = createElement("h3", "bhn-news-card__title");
    const titleLink = createElement("a", "", title || "Без названия");
    titleLink.href = link;
    heading.appendChild(titleLink);

    body.appendChild(time);
    body.appendChild(heading);

    if (excerpt) {
      body.appendChild(
        createElement("p", "bhn-news-card__excerpt", excerpt)
      );
    }

    const footer = createElement("div", "bhn-news-card__footer");
    const button = createElement("a", "bhn-news-card__button");
    button.href = link;

    button.appendChild(createElement("span", "", "Читать далее"));
    button.appendChild(createElement("span", "", "→"));

    footer.appendChild(button);
    body.appendChild(footer);

    article.appendChild(imageLink);
    article.appendChild(body);

    return article;
  }

  async function getCategoryId() {
    const url =
      CONFIG.apiBase +
      "/categories?slug=" +
      encodeURIComponent(CONFIG.categorySlug) +
      "&per_page=1";

    const response = await fetch(url, {
      credentials: "same-origin",
      headers: {
        Accept: "application/json"
      }
    });

    if (!response.ok) {
      throw new Error("Category request failed: " + response.status);
    }

    const categories = await response.json();

    if (!Array.isArray(categories) || !categories.length) {
      return null;
    }

    return categories[0].id;
  }

  async function getPosts(pageNumber) {
    const params = new URLSearchParams({
      categories: String(categoryId),
      per_page: String(CONFIG.postsPerPage),
      page: String(pageNumber),
      orderby: "date",
      order: "desc",
      status: "publish",
      _embed: "wp:featuredmedia"
    });

    const response = await fetch(
      CONFIG.apiBase + "/posts?" + params.toString(),
      {
        credentials: "same-origin",
        headers: {
          Accept: "application/json"
        }
      }
    );

    if (!response.ok) {
      throw new Error("Posts request failed: " + response.status);
    }

    totalPages = Number(
      response.headers.get("X-WP-TotalPages") || 1
    );

    return response.json();
  }

  function updateControls() {
    const hasMore = currentPage < totalPages;

    loadMoreButton.hidden = !hasMore;
    loadMoreButton.disabled = isLoading;
    loadMoreButton.firstChild.textContent =
      isLoading ? "Загрузка… " : "Загрузить ещё ";
  }

  async function loadPosts(append) {
    if (isLoading) {
      return;
    }

    isLoading = true;
    error.hidden = true;
    empty.hidden = true;

    if (!append) {
      loading.hidden = false;
    }

    updateControls();

    try {
      if (categoryId === null) {
        categoryId = await getCategoryId();
      }

      if (!categoryId) {
        throw new Error("Category not found");
      }

      const posts = await getPosts(currentPage);

      if (!append) {
        grid.innerHTML = "";
      }

      posts.forEach(function (post) {
        grid.appendChild(createCard(post));
      });

      if (!append && posts.length === 0) {
        empty.hidden = false;
      }
    } catch (requestError) {
      console.error("BH News:", requestError);

      if (!append) {
        grid.innerHTML = "";
      }

      error.hidden = false;
      loadMoreButton.hidden = true;
    } finally {
      loading.hidden = true;
      isLoading = false;
      updateControls();
    }
  }

  loadMoreButton.addEventListener("click", function () {
    if (currentPage >= totalPages || isLoading) {
      return;
    }

    currentPage += 1;
    loadPosts(true);
  });

  page.addEventListener("click", function (event) {
    const anchor = event.target.closest('a[href^="#"]');

    if (!anchor) {
      return;
    }

    const body.elementor-page-18 = anchor.getAttribute("href");
    const target = body.elementor-page-18 && body.elementor-page-18 !== "#"
      ? document.querySelector(body.elementor-page-18)
      : null;

    if (!target) {
      return;
    }

    event.preventDefault();

    const reducedMotion = window.matchMedia(
      "(prefers-reduced-motion: reduce)"
    ).matches;

    target.scrollIntoView({
      behavior: reducedMotion ? "auto" : "smooth",
      block: "start"
    });

    history.replaceState(null, "", body.elementor-page-18);
  });

  loadPosts(false);
})();
</script>/* End custom CSS */