/* custom.css */

/* Бургер-меню */
.t-menuburger {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 20px;
  padding: 0;
  border: none;
  background-color: transparent;
  outline: none;
  -webkit-transform: rotate(0deg);
  transform: rotate(0deg);
  transition: transform .5s ease-in-out;
  cursor: pointer;
  z-index: 999;
}

.t-menuburger span {
  display: block;
  position: absolute;
  width: 100%;
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0deg);
  transform: rotate(0deg);
  transition: .25s ease-in-out;
  height: 3px;
  background-color: #fff;
}

.t-menuburger span:nth-child(1) {
  top: 0px;
}

.t-menuburger span:nth-child(2),
.t-menuburger span:nth-child(3) {
  top: 8px;
}

.t-menuburger span:nth-child(4) {
  top: 16px;
}

.t-menuburger-opened span:nth-child(1) {
  top: 8px;
  width: 0%;
  left: 50%;
}

.t-menuburger-opened span:nth-child(2) {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.t-menuburger-opened span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.t-menuburger-opened span:nth-child(4) {
  top: 8px;
  width: 0%;
  left: 50%;
}

/* Мобильное меню — скрыто по умолчанию на десктопе */
.tmenu-mobile {
  display: none;
}

.gu-mobile-menu {
  display: none;
}

.tmenu-mobile_positionfixed {
  position: fixed;
}

.tmenu-mobile__container {
  min-height: 64px;
  padding: 20px;
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* Навигация — структура и позиционирование */
#rec1340826481 .t446 {
  transition: background-color 0.3s ease;
  height: 80px !important;
}

#rec1340826481 .t446_scrolled {
  background-color: #000000 !important;
}

@media screen and (max-width: 980px) {
  #rec1340826481 .t446_scrolled {
    background-color: #000000 !important;
    /* On mobile, scrolled menu should be black as on desktop */
  }

  /* On home page, if scrolled, header should be black. */
  .t446_white_scrolled {
    background-color: #000000 !important;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
}

#rec1340826481 .t446__maincontainer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  height: 80px !important;
  position: relative !important;
}

/* Колонки */
#rec1340826481 .gu__logowrapper {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  display: flex !important;
  align-items: center !important;
  z-index: 10;
  height: 100% !important;
}

#rec1340826481 .t446__rightwrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  height: 100% !important;
}

#rec1340826481 .t446__leftwrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  height: 100% !important;
}

#rec1340826481 .t446__leftmenuwrapper {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

/* Списки и элементы */
#rec1340826481 .t446__list {
  display: flex !important;
  align-items: center !important;
  gap: 28px !important;
  /* 4 пункта вместо 3, центральный логотип absolute-positioned —
     нужно сжать чтобы не наезжало. На широких экранах остаётся
     достаточно воздуха. На <1024px меню скрывается за burger. */
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
}

/* Под 4 пункта меню чуть меньше шрифт + tighter letter-spacing. */
@media (min-width: 980px) {
  #rec1340826481 .t-menu__link-item {
    font-size: 14px !important;
    letter-spacing: 0.3px !important;
  }
}

#rec1340826481 .t446__list_item {
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

#rec1340826481 .t-menu__link-item {
  font-family: 'TildaSans', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Навигация — логотип */
#rec1340826481 .gu__logo {
  font-family: 'TildaSans', Arial, sans-serif !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 24px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

/* Навигация — ссылки */
#rec1340826481 .t-menu__link-item {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  letter-spacing: 0.5px !important;
  transition: color 0.3s ease-in-out !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

/* Социальные ссылки / Почта */
#rec1340826481 .t-sociallinks__wrapper {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

#rec1340826481 .t-sociallinks__item_email a {
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#rec1340826481 .t-sociallinks__svg path {
  fill: #ffffff !important;
  transition: fill 0.3s ease !important;
}

/* Активный пункт меню и ховер */
#rec1340826481 .t-menu__link-item.t-active,
#rec1340826481 .t-menu__link-item:hover {
  color: #d80027 !important;
}

#rec1340826481 .t-menu__link-item.t-active:not(.t978__menu-link),
#rec1340826481 .t-menu__link-item:not(.t-active):not(.tooltipstered):hover {
  color: #d80027 !important;
}

/* Стили кнопок в проектах */
#rec1385130231 .t-btnflex.t-btnflex_type_button {
  color: #000000;
  background-color: #c7c7c7;
  border-style: none !important;
  border-radius: 30px;
  transition-duration: 0.2s;
  transition-property: background-color, color, border-color, box-shadow, opacity, transform, gap;
  transition-timing-function: ease-in-out;
}

/* Секция "Будем на связи" */
.t-section__descr {
  max-width: 560px;
}

#rec1340793801 .t-section__title {
  margin-bottom: 40px;
}

#rec1340793801 .t-section__descr {
  padding-bottom: 40px;
}

@media screen and (max-width: 960px) {
  #rec1340793801 .t-section__title {
    margin-bottom: 20px;
  }
}

/* Cookie banner */
#rec1458170161 .t886__wrapper {
  background-color: #ebebeb;
  width: 600px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

#rec1458170161 .t-btnflex.t-btnflex_type_button {
  color: #555555;
  background-color: #ebebeb;
  border: 1px solid #999999 !important;
  border-radius: 5px;
  font-weight: 500;
}

#rec1458170161 .t-btnflex:hover {
  color: #111111 !important;
  border-color: #111111 !important;
  background-color: #e8e8e8 !important;
}

/* Ссылки с красным подчеркиванием */
#allrecords .t-text a:not(.t-card__link),
#allrecords .t-descr a:not(.t-card__link),
#allrecords .t-title a:not(.t-card__link) {
  color: inherit;
  font-weight: inherit;
  border-bottom: 2px solid #d80027;
  box-shadow: inset 0px -1px 0px 0px #d80027;
}

/* Footer */
#rec1340820991 .t389__copyright,
#rec1340820991 .t389_scrolltop {
  color: #000000;
}

#rec1340820991 .t389__list_item a {
  color: #000000;
}

/* --- MOBILE OVERRIDES (CLEAN & PREMIUM) --- */
@media screen and (max-width: 980px) {
  /* HIDE DESKTOP MENU COMPLETELY */
  #rec1340826481 .t446,
  #rec1340826481 .t446__maincontainer {
    display: none !important;
  }

  /* MOBILE BAR SETUP */
  .tmenu-mobile { 
    display: block !important; 
    background-color: #000 !important;
    height: 80px !important;
    z-index: 1002 !important;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.5);
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
  }

  .tmenu-mobile__container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 80px !important;
    padding: 0 20px !important;
    max-width: 100% !important;
  }

  /* 1. EMAIL (LEFT) */
  .tmenu-mobile__email {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
  }
  .tmenu-mobile__email svg {
    width: 28px !important;
    height: 28px !important;
    fill: #fff !important;
    transition: transform 0.3s ease;
  }
  .tmenu-mobile__email a:active svg {
    transform: scale(0.9);
  }

  /* 2. LOGO (CENTER) */
  .tmenu-mobile__burgerlogo {
    order: 2 !important;
    display: flex !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: auto !important;
    text-align: center !important;
  }
  .tmenu-mobile__burgerlogo__title {
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
    color: #fff !important;
    opacity: 0.9;
  }

  /* 3. BURGER (RIGHT) */
  .t-menuburger {
    order: 3 !important;
    margin: 0 !important;
    width: 32px !important;
    height: 24px !important;
  }
  .t-menuburger span {
    background-color: #fff !important;
    height: 2px !important;
  }

  /* Side Menu Overlay Styling */
  .gu-mobile-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 2000;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
  }
  .gu-mobile-menu.opened {
    left: 0;
  }
  .gu-mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
  }
  .gu-mobile-menu li {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }
  .gu-mobile-menu.opened li {
    opacity: 1;
    transform: translateY(0);
  }
  .gu-mobile-menu.opened li:nth-child(1) { transition-delay: 0.1s; }
  .gu-mobile-menu.opened li:nth-child(2) { transition-delay: 0.2s; }
  .gu-mobile-menu.opened li:nth-child(3) { transition-delay: 0.3s; }
  .gu-mobile-menu.opened li:nth-child(4) { transition-delay: 0.4s; }
  .gu-mobile-menu.opened li:nth-child(5) { transition-delay: 0.5s; }

  .gu-mobile-menu a {
    font-family: 'TildaSans', Arial, sans-serif !important;
    font-size: 28px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s ease;
  }
  .gu-mobile-menu a:hover {
    color: #d80027;
  }

  .gu-mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 44px;
    font-weight: 300;
    cursor: pointer;
    color: #fff;
    line-height: 1;
  }
}

/* Light Theme Overrides for Mobile */
@media screen and (max-width: 980px) {
  #rec1340826481.t446_white .tmenu-mobile {
    background-color: #fff !important;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.1);
  }
  #rec1340826481.t446_white .tmenu-mobile__burgerlogo__title {
    color: #000 !important;
  }
  #rec1340826481.t446_white .tmenu-mobile__email svg {
    fill: #000 !important;
  }
  #rec1340826481.t446_white .t-menuburger span {
    background-color: #000 !important;
  }
}

/* --- HEADER THEMES --- */
/* Default (Dark header, white elements) is mostly handled by Tilda styles or global overrides above. */

/* Light theme for pages with white background or white scrolled header */
/* We use ID selector here to ensure it overrides the default dark theme selectors */
#rec1340826481.t446_white .gu__logo,
#rec1340826481.t446_white .t-menu__link-item {
  color: #000000 !important;
}

#rec1340826481.t446_white .t-menuburger span {
  background-color: #000000 !important;
}

#rec1340826481.t446_white .t-sociallinks__svg path {
  fill: #000000 !important;
}

/* Hover state for light header */
#rec1340826481.t446_white .t-menu__link-item:hover {
  color: #d80027 !important;
}