/* ==========================================================================
   ИНТЕГРАЛ — основной стиль темы
   Значения взяты из замеров оригинала (вычисленные стили и размеры блоков).
   Порядок: переменные -> база -> шапка -> баннер -> контент -> блоки ->
   карточки -> новости -> контакты -> подвал -> адаптив.
   ========================================================================== */

/* 1. Переменные дизайна ------------------------------------------------ */
:root {
  --c-white: #ffffff;
  --c-black: #000000;
  --c-dark: #11151c;
  --c-menu: #bcc4d5;
  --c-menu-hover: #4d7bc0;
  --c-footer-link: #b2bcc3;
  --c-body-on-dark: #ffffff;
  --c-body-on-light: #343e45;
  --c-post-date: #647886;
  --c-link: #3772ff;

  --c-btn: #28395c;
  --c-btn-hover: #3d7fc9;
  --c-btn-active: #0061fe;
  --c-btn-text: #ffffff;

  --header-bg: rgba(17, 21, 28, 0.42);
  --header-blur: blur(32px);
  --footer-bg: #11151c;

  --container: 84.5rem;      /* 1352px */
  --gutter: 1.25rem;         /* 20px  */

  --font-text: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-head: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --radius-card: 12px;
  --radius-btn: 3.25px;
}

/* 2. База --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background-color: var(--c-black);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--c-body-on-dark);
  /* Прозрачный фон: сквозь него видно .site-background (общий фон сайта). */
  background: transparent;
  overflow-x: hidden;
}

/* Фоновая картинка сайта: чёрная подложка + рисунок, как в оригинале */
.site-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--c-black);
  background-position: top center;
  background-repeat: repeat-y;
  background-size: cover;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  margin: 0 0 1rem;
  line-height: 1.2;
}

p { margin: 0 0 1.2em; }

 ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Кнопка «Узнать больше» — размеры и цвет из оригинала */
.btn {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--c-btn-text);
  background-color: var(--c-btn);
  border: 2px solid var(--c-btn);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.btn:hover, .btn:focus {
  background-color: var(--c-btn-hover);
  border-color: var(--c-btn-hover);
  color: var(--c-btn-text);
  text-decoration: none;
}
.btn:active {
  background-color: var(--c-btn-active);
  border-color: var(--c-btn-active);
}

/* 3. Шапка -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--c-white);
}

.site-header__inner {
  background: var(--header-bg);
  -webkit-backdrop-filter: var(--header-blur);
  backdrop-filter: var(--header-blur);
}

.site-header__top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 46px;
  font-family: var(--font-head);
  font-size: 14px;
  line-height: 21px;
  font-weight: 800;
}

.site-header__phone {
  color: var(--c-menu);
  padding-left: 12px;
  text-decoration: none;
}
.site-header__phone:hover { color: var(--c-menu-hover); text-decoration: none; }

.site-header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
}

.site-logo { flex: 0 0 auto; max-width: 367px; }
.site-logo img { width: 367px; max-width: 100%; }

/* Меню: 18px/27px, вес 800, межбуквенный 0.24px, отступы 8/18 */
.site-menu { flex: 1 1 auto; }
.site-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-menu a {
  display: block;
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 27px;
  font-weight: 800;
  letter-spacing: .24px;
  color: var(--c-menu);
  padding: 8px 18px;
  text-decoration: none;
  transition: color .2s ease;
}
.site-menu a:hover, .site-menu a:focus { color: var(--c-menu-hover); text-decoration: none; }
.site-menu .current-menu-item > a,
.site-menu .current_page_item > a,
.site-menu .current-menu-ancestor > a { color: var(--c-menu-hover); }

/* Кнопка мобильного меню */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-menu);
  border-radius: 4px;
  color: var(--c-menu);
  font-size: 24px;
  line-height: 1;
  padding: 8px 12px;
  cursor: pointer;
}

/* 4. Полноэкранная карусель главной ------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

.hero__slides {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
}

/* Слайд — это только картинка по центру: фоном служит общий фон сайта */
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

.hero__image { width: auto; max-width: 100%; height: auto; }

.hero__link { position: absolute; inset: 0; display: block; }

.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  color: #f2f2f2;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__arrow:hover { background: rgba(0, 0, 0, .45); }
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }

.hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 2;
}
.hero__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  cursor: pointer;
}
.hero__dot.is-active { width: 13px; height: 13px; background: rgba(0, 0, 0, .7); }

/* 5. Баннер заголовка страницы ----------------------------------------- */
.page-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 265px;
  padding: 40px 0;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--c-black);
  text-align: center;
}
.page-banner__title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 46.7px;
  line-height: 56px;
  font-weight: 900;
  color: var(--c-white);
}

/* 6. Текстовые страницы ------------------------------------------------- */
.page-content { padding: 45px 0 80px; }

/* Текстовая колонка уже контейнера — как в оригинале (874px по центру) */
.page-content__body {
  max-width: 874px;
  margin: 0 auto;
  color: var(--c-body-on-dark);
  font-size: 16px;      /* базовый размер в конструкторе */
  line-height: 24px;
}

/* Там, где в оригинале был выбран размер 18 — сохраняем его */
.page-content__body .nh-text-editor__fontsize-18,
.page-content__body p.nh-text-editor__fontsize-18 { font-size: 18px; line-height: 27px; }
.page-content__body h2 { font-size: 28px; line-height: 1.25; margin-top: 1.6em; }
.page-content__body h3 { font-size: 22px; line-height: 1.3; margin-top: 1.5em; }
.page-content__body ul li { margin-bottom: .35em; }

/* 7. Блоки «картинка + текст» ------------------------------------------ */
.features { padding: 0; }

/*
 * Плотный фон контентных секций.
 * В конструкторе каждый блок (nh-features, nh-paragraph) задаёт
 * background-color: rgba(0,0,0,1), поэтому общий фон сайта на страницах
 * не просвечивает и текст читается на чёрном. На главной в промежутках
 * между блоками фон виден — там оставляем прозрачность.
 */
.page-content,
body:not(.home) .features { background-color: var(--c-black); }

/* Фон секции задан один на все блоки, как в оригинале */
.features--with-bg {
  background-color: var(--c-black);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.feature {
  position: relative;
  background-color: transparent;
}

/* Разделитель-полоса между блоками, как на оригинале (мягкая тень снизу) */
.feature__inner {
  display: grid;
  grid-template-columns: 608fr 704fr;   /* как в оригинале: картинка 528, текст 704 */
  align-items: center;
  gap: 0;
  padding: 24px 20px;
  max-width: var(--container);
  margin: 0 auto;
}
/* Когда картинка справа — колонки меняются местами, текст остаётся 704px */
.feature--image-right .feature__inner { grid-template-columns: 704fr 608fr; }
.feature--image-right .feature__figure { order: 2; }

/*
 * Вертикальное выравнивание. В конструкторе картинка позиционируется
 * атрибутом data-desktop-position: 0/1 — по центру (главная),
 * 4/6 — по верху (внутренние страницы, где текст заметно выше картинки).
 */
body:not(.home) .feature__inner { align-items: start; }
.feature--image-right .feature__info { order: 1; }

.feature__figure { margin: 0; }
.feature__figure img { width: 528px; max-width: 100%; height: auto; }

.feature__info { color: var(--c-white); font-size: 18px; line-height: 27px; }
.feature__info p { margin: 0 0 .8em; }
.feature__info ul { margin: 0 0 1.2em; padding-left: 1.4em; }
.feature__info li { margin-bottom: .55em; }
.feature__info h2,
.feature__info h3,
.feature__info h6 { font-size: 20px; line-height: 30px; font-weight: 900; margin: 0 0 .6em; }
.feature__info .btn { margin-top: 20px; }

/* 8. Карточки (партнёры) ------------------------------------------------ */
/* В оригинале под сеткой логотипов остаётся большой отступ до подвала */
.cards { padding: 120px 0 420px; }
.cards__items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.cards__item {
  width: 202px;
  height: 198px;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.cards__item img { max-height: 99px; width: auto; object-fit: contain; }
.cards__title {
  font-family: var(--font-head);
  font-size: 18px;
  line-height: 21.6px;
  font-weight: 900;
  color: var(--c-black);
  margin: 0;
}

/* 9. Новости ------------------------------------------------------------ */
.news-panel { background: #fff; color: var(--c-body-on-light); }
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 990px) 260px;
  gap: 60px;
  padding: 60px 0 90px;
}

.news-item { margin-bottom: 40px; }
.news-item__date {
  font-size: 14px;
  line-height: 16.8px;
  letter-spacing: 3.5px;
  color: var(--c-post-date);
  margin-bottom: 14px;
}
.news-item__title {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 28.8px;
  font-weight: 900;
  margin: 0 0 8px;
}
.news-item__title a { color: inherit; text-decoration: none; }
.news-item__title a:hover { text-decoration: underline; }
.news-item__excerpt { font-size: 16px; line-height: 24px; margin: 0; }

.news-side { text-align: center; }
.news-side__icon { font-size: 28px; line-height: 1; margin-bottom: 16px; }
.news-side__years { font-size: 16px; line-height: 24px; }
.news-side__years a { color: var(--c-link); }
.news-side__years .sep { color: var(--c-body-on-light); }
.news-side__all { display: block; margin-top: 12px; }
.news-side__years a.is-active { color: var(--c-body-on-light); text-decoration: none; font-weight: 700; }

.news-pagination { margin-top: 40px; }
.news-pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  margin-right: 6px;
  color: var(--c-link);
}
.news-pagination .page-numbers.current {
  color: var(--c-body-on-light);
  font-weight: 700;
  text-decoration: none;
}

/* Отдельная новость */
.post-body { background: #fff; color: var(--c-body-on-light); padding: 60px 0 90px; }
.post-body__inner { max-width: 1095px; }

/* «Хлебные крошки» над статьёй, как в оригинале */
.post-breadcrumb {
  font-size: 13px;
  line-height: 20px;
  color: var(--c-body-on-light);
  margin-bottom: 30px;
}
.post-breadcrumb a { color: var(--c-link); }
.post-breadcrumb .sep { color: var(--c-post-date); margin: 0 6px; }
.post-body img { max-width: 670px; margin: 24px 0; }
.post-body p { font-size: 16px; line-height: 24px; color: var(--c-body-on-light); }
.post-body h2 { font-size: 24px; line-height: 28.8px; margin-top: 1.6em; color: var(--c-body-on-light); }
.post-body h3 { font-size: 20px; line-height: 1.3; margin-top: 1.5em; color: var(--c-body-on-light); }
.post-body a { color: var(--c-link); }
.post-banner__date {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: 3.5px;
  color: var(--c-white);
}

/* 10. Контакты ---------------------------------------------------------- */
/* В оригинале блок контактов идёт на белой панели */
.contacts-panel { background: #fff; color: var(--c-body-on-light); }

.contacts-info { padding: 45px 0 0; font-size: 18px; line-height: 27px; }

/* Разметка контактов пришла из старого сайта — приводим её к виду панели.
   В оригинале это сетка: слева подпись с иконкой, справа значение,
   компактные пункты (телефон, часы, сайт, почта) идут в две колонки. */
.contacts-panel .contact {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px 20px;
  align-items: start;
  padding: 8px 0;
}
.contacts-panel .contact > .row { display: contents; }
.contacts-panel .contact .column { display: block; }

.contacts-panel .contact__title { display: flex; align-items: center; gap: 10px; }
.contacts-panel .contact__icon { flex: 0 0 auto; display: flex; }
.contacts-panel .contact__icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
  color: var(--c-post-date);
}
.contacts-panel .contact__label {
  font-size: 14px;
  line-height: 21px;
  color: var(--c-post-date);
}

.contacts-panel .-inline-group_top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 48px;
}
.contacts-panel .contacts__item { display: block; }

.contacts-panel .contact__item,
.contacts-panel .contact__item a,
.contacts-panel .contact-address__part {
  font-size: 16px;
  line-height: 24px;
  color: var(--c-link);
}
.contacts-panel .contact-address__part { color: var(--c-body-on-light); }
.contacts-panel .contacts__list { margin-bottom: 10px; }

.contacts-map { padding: 60px 0 140px; }
.contacts-map__title,
.contacts-social__title {
  font-size: 24px;
  line-height: 30px;
  font-weight: 900;
  color: var(--c-body-on-light);
  margin: 0 0 20px;
}
.contacts-map iframe { width: 100%; height: 432px; border: 0; display: block; background: #eef1f5; }
.contacts-social { padding: 0 0 150px; }
.contacts-social__qr { max-width: 200px; margin-bottom: 20px; border-radius: 8px; }
.contacts-social__items { display: flex; gap: 20px; flex-wrap: wrap; }
.contacts-social__items img { border-radius: 8px; }

/* 11. Подвал ------------------------------------------------------------ */
.site-footer {
  background: var(--footer-bg);
  color: var(--c-menu);
  padding: 40px 0 20px;
  font-size: 14px;
  line-height: 21px;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}
.footer-columns__title {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--c-white);
  margin: 0 0 16px;
}
.footer-columns ul { list-style: none; margin: 0; padding: 0; }
.footer-columns li { margin-bottom: 10px; }
.footer-columns a { color: var(--c-footer-link); text-decoration: none; }
.footer-columns a:hover { color: var(--c-white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 20px;
  font-size: 13px;
  line-height: 18px;
}
.footer-bottom__about { color: var(--c-menu); }
.footer-bottom__desc { color: var(--c-menu); }

.footer-social { margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-social a { color: var(--c-footer-link); }
.footer-social a:hover { color: var(--c-white); }

/* 12. Адаптив ----------------------------------------------------------- */
@media (max-width: 1023px) {
  .feature__inner { grid-template-columns: 1fr; gap: 24px; }
  .feature--image-right .feature__figure,
  .feature--image-right .feature__info { order: 0; }
  .news-layout { grid-template-columns: 1fr; gap: 40px; }
  .news-side { text-align: left; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }

  /* Шапка как в оригинале: строка с телефоном скрыта, меню слева, логотип компактнее */
  .site-header__top { display: none; }
  .site-header__main { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .menu-toggle { display: block; order: 1; }
  .site-logo { order: 2; max-width: 210px; flex: 1 1 auto; }
  .site-logo img { width: 200px; }
  .site-menu {
    display: none;
    flex-basis: 100%;
    order: 3;
  }
  .site-menu.is-open { display: block; }
  .site-menu ul { flex-direction: column; justify-content: flex-start; }
  .site-menu a { padding: 10px 0; }

  /* Карусель на мобильном тоже во всю высоту экрана, как в оригинале */
  .page-banner { min-height: 120px; padding: 24px 0; }
  .page-banner__title { font-size: 26px; line-height: 32px; }

  /* Текст блоков на мобильном — 14px и без вертикальных отступов, как в оригинале */
  .feature__inner { padding: 0 16px; gap: 18px; }
  .feature__info { font-size: 14px; line-height: 22.4px; }
  .feature__info h2, .feature__info h3, .feature__info h6 { font-size: 15px; line-height: 24px; }

  .footer-columns { grid-template-columns: 1fr; gap: 0; padding-bottom: 20px; }
  /* На мобильном колонки подвала складываются, как в оригинале */
  .footer-columns__column { border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .footer-columns__title {
    position: relative;
    margin: 0;
    padding: 16px 32px 16px 0;
    cursor: pointer;
  }
  .footer-columns__title::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -7px;
    border-right: 2px solid var(--c-menu);
    border-bottom: 2px solid var(--c-menu);
    transform: rotate(45deg);
    transition: transform .2s ease;
  }
  .footer-columns__column.is-open .footer-columns__title::after { transform: rotate(-135deg); }
  .footer-columns__column ul { display: none; padding-bottom: 14px; }
  .footer-columns__column.is-open ul { display: block; }

  .footer-bottom { text-align: center; padding-top: 24px; }
  .footer-social { justify-content: center; }
  .cards { padding: 40px 0 320px; }
  .cards__item { width: calc(50% - 10px); height: auto; min-height: 160px; }

  .post-body img { max-width: 100%; }
  .news-item__title { font-size: 20px; line-height: 24px; }
}

/* 13. Плавающие кнопки на мобильном: звонок и возврат наверх ------------ */
.mobile-actions { display: none; }

@media (max-width: 767px) {
  .mobile-actions {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    padding: 0 16px;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    pointer-events: none;
  }
  .mobile-actions a,
  .mobile-actions button {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 21, 28, .85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
  }
  .mobile-actions a:hover,
  .mobile-actions button:hover { background: var(--c-btn); text-decoration: none; }
}
