/* Кастомные стили поверх Tilda. Подключается в header.php. */

/* --- Плавное появление фона героя (rec2199243761) ---
   Полное фото грузится лениво в .t396__carrier.t-bgimg (lazyload вешает класс
   loaded). LQIP-заглушку держим на родителе (виден всегда), полный carrier
   фейдим поверх неё — плавное проявление вместо резкого. */
#rec2199243761 .t396__carrier-wrapper {
  background: url('../images/tild3330-3761-4434-a234-323162663062__-__resize__20x_______3jpeg.webp') no-repeat;
  background-position: 50.644% 22.7%;
  background-size: cover;
}

#rec2199243761 .t396__carrier.t-bgimg {
  opacity: 0;
  transition: opacity .6s ease-in-out;
}

#rec2199243761 .t396__carrier.t-bgimg.loaded {
  opacity: 1;
}

/* --- Шапка: закрепление + смена фона при скролле --- */
#rec2171186641 .t-menu-popover_positionabsolute,
#rec2283746811 .t-menu-popover_positionabsolute {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 900;
}

#rec2171186641 .t-menu-popover__maincontainer,
#rec2283746811 .t-menu-popover__maincontainer {
  transition: background-color .3s ease;
}

/* При скролле (класс на body из JS) — фон #371C0C, текст/телефон белые. */
body.hdr-scrolled #rec2171186641 .t-menu-popover__maincontainer,
body.hdr-scrolled #rec2283746811 .t-menu-popover__maincontainer {
  background-color: #371C0C !important;
}

body.hdr-scrolled #rec2171186641 .t-menu__link-item,
body.hdr-scrolled #rec2171186641 .t-menu-popover__descr a,
body.hdr-scrolled #rec2283746811 .t-menu__link-item,
body.hdr-scrolled #rec2283746811 .t-menu-popover__descr a {
  color: #fff !important;
}

/* Страницы с постоянно тёмной шапкой (квартира flat-page, политика dark-header):
   фон всегда #371C0C, текст белый — не зависит от скролла. */
body.flat-page #rec2171186641 .t-menu-popover__maincontainer,
body.flat-page #rec2283746811 .t-menu-popover__maincontainer,
body.dark-header #rec2171186641 .t-menu-popover__maincontainer,
body.dark-header #rec2283746811 .t-menu-popover__maincontainer {
  background-color: #371C0C !important;
}

body.flat-page #rec2171186641 .t-menu__link-item,
body.flat-page #rec2171186641 .t-menu-popover__descr a,
body.flat-page #rec2283746811 .t-menu__link-item,
body.flat-page #rec2283746811 .t-menu-popover__descr a,
body.dark-header #rec2171186641 .t-menu__link-item,
body.dark-header #rec2171186641 .t-menu-popover__descr a,
body.dark-header #rec2283746811 .t-menu__link-item,
body.dark-header #rec2283746811 .t-menu-popover__descr a {
  color: #fff !important;
}

/* --- Логотип «АКСИС ПАТРИОТ» по центру шапки --- */
.t-menu-popover__centerwrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.t-menu-popover__centerwrapper .axis-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.t-menu-popover__centerwrapper .axis-brand img {
  display: block;
  height: 48px;
  width: auto;
}

@media (max-width: 1350px) {
  #rec2171186641 .t-menu__list > .t-menu-base__list-item:nth-child(4),
  #rec2283746811 .t-menu__list > .t-menu-base__list-item:nth-child(4) { display: none !important; }
}

/* --- ≤640px: кнопка «заказать звонок» → иконка-трубка, логотип 36px --- */
@media (max-width: 640px) {
  .t-menu-base__buttons .t-btnflex_type_button {
    width: 48px !important;
    height: 48px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    background: url("../images/call-btn.svg") center / contain no-repeat !important;
    box-shadow: none !important;
  }

  .t-menu-base__buttons .t-btnflex_type_button .t-btnflex__text,
  .t-menu-base__buttons .t-btnflex_type_button .t-btnflex__icon {
    display: none !important;
  }

  .t-menu-popover__centerwrapper .axis-brand img {
    height: 36px !important;
  }
}

/* --- Cookie-баннер --- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 980;
  padding: 16px clamp(16px, 4vw, 40px);
  background: #371C0C;
  color: #fff;
  font-family: var(--t-text-font, 'Nunito Sans', Arial, sans-serif);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-banner__text {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
}

.cookie-banner__text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__text a:hover {
  opacity: .85;
}

.cookie-banner__btn {
  flex: none;
  padding: 12px 28px;
  border: 1px solid #fff;
  border-radius: 30px;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.cookie-banner__btn:hover {
  background: #fff;
  color: #441d03;
}

@media (max-width: 640px) {
  .cookie-banner {
    padding: 14px 16px 18px;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cookie-banner__text {
    font-size: 12px;
    line-height: 1.45;
  }

  .cookie-banner__btn {
    width: 100%;
    padding: 11px 20px;
    max-width: 50%;
  }
}

/* Узкая шапка: скрываем пункт «Уникальность» в десктоп-меню при ≤1500px. */
@media (max-width: 1600px) {
  .t-menu-popover__list_desktop .t-menu-base__list-item:has(a[href="/#uniq"]) {
    display: none;
  }
}
