:root {
  --header-height: 100px;
  --window-width: 1200px;
  --maincolor: #4B6DFE;
  --maindark: #272168;  
}

/* общий сброс */
* {
  box-sizing: border-box;
}

/* --- Шапка --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 3000; /* самый высокий: шапка всегда поверх затемнения и меню */
  background: #fff;
  backdrop-filter: blur(4px);
  border-bottom: 1px solid black;
}

.header-inner {
  display: grid;
  grid-template-columns: 250px 1fr 0px 250px; /* logo | center nav | right */
  align-items: center;
  height: var(--header-height);

  max-width: 1200px;       /* ограничение ширины */
  margin: 0 auto;          /* центрирование по горизонтали */
  width: 100%;             /* чтобы занимать всю доступную ширину до 1200px */
  box-sizing: border-box;  /* чтобы padding не выходил за пределы */
}

/* Мобильные: 4 колонки (логотип | центр | бургер | кнопки) */
@media (max-width: 992px) {
  .header-inner {
    grid-template-columns: 300px 1px 48px 1px auto;; /* logo | center nav | burger | right */
  }
  .contact-link {
    display: none;
  }
  .divider {
    display: none;
  }
}

.header-left {
  grid-column: 1;
  justify-self: start;
}
.header-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.header-top-row {
  display: flex;
  justify-content: center;
  font-size: 0.9rem;
}

.contact-info {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: "Montserrat";
}

.contact-link {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--accent);
}

.divider {
  color: #999;
}

.header-bottom-row {
  display: flex;
  justify-content: center;
}
.burger {
  grid-column: 3;
  justify-self: center;
}
.header-right {
  grid-column: 4;
  justify-self: end;
  display: flex;
  align-items: center;
}

/* логотип */
.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  align-items: center;   /* выравнивание по центру по вертикали */
  height: 100%;          /* растягиваем на всю высоту шапки */
}

.logo-img {
  height: var(--header-height);
  width: auto;
  display: block;
}

/* навигация desktop */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-list {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-link {
  display: inline-flex;
  justify-content: center;       /* Центрирует содержимое по горизонтали */
  align-items: center;           /* Центрирует содержимое по вертикали */
  text-align: center;            /* Центрирует текст внутри, если он переносится */
  font-family: "Montserrat";
  gap: 6px;
  padding: 10px 14px;
  color: black;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: color 0.18s ease;
  font-size: 1.2rem;
}

.nav-link:hover {
  color: var(--accent);
}

/* header actions */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.phone {
  font-family: "Montserrat";
  text-decoration: none;
  color: black;
  font-weight: 500;
}

.btn-primary {
  padding: 15px 25px;
  font-family: "Montserrat";
  background-color: var(--maincolor);
  color: #fff;
  border-color: var(--maincolor) !important;
  border: solid;
  text-decoration: none;
  border-radius: 15px;
  font-size: 1.4rem;
}

.btn-primary:hover {  
  background-color: #fff;
  color: var(--maincolor);
}

/* --- Burger (mobile) --- */
.burger {
  display: none; /* появится в медиазапросе */
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  cursor: pointer;
  position: relative;
  align-items: center;
  justify-content: center;
}
.burger-line {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #133248;
  border-radius: 2px;
  transition: all 0.28s ease;
}
.burger-line.top {
  top: 12px;
}
.burger-line.bottom {
  top: 22px;
}
.burger.open .burger-line.top {
  transform: rotate(45deg);
  top: 17px;
}
.burger.open .burger-line.bottom {
  transform: rotate(-45deg);
  top: 17px;
}

/* --- Mobile menu --- */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: -360px;
  width: 360px;
  height: calc(100% - var(--header-height));
  background: #fff;
  z-index: 2200;
  box-shadow: -8px 0 32px rgba(10, 20, 30, 0.12);
  transition: right 0.32s cubic-bezier(0.22, 0.9, 0.25, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-menu.open {
  right: 0;
}

.mobile-menu-inner {
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--maindark);
}

/* список */
.mobile-nav-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* пункты верхнего уровня = .nav-link */
.mobile-nav-list > li > a,
.mobile-has-sub > .mobile-sub-toggle {
  @extend .nav-link; /* используем те же стили */
  width: 100%;
  padding: 10px 0;
  justify-content: space-between;
  text-align: left;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: white;
}

/* блок контактов */
.mobile-contacts {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--maincolor);
  line-height: 2;
}
.mobile-contacts p {
  margin: 6px 0;
  color: white;
}

.mobile-contacts .value a{
  color: white;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
}

.mobile-contacts .label {
  color: var(--maincolor);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.mobile-contacts .value {
  color: white;
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
}

.site-footer {
  background-color: var(--maindark);
  color: white;
  font-family: "Montserrat", sans-serif;
  padding: 0px 20px 10px 0px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;

  max-width: var(--window-width);       /* ограничение ширины */
  margin: 0 auto;          /* центрирование по горизонтали */
  width: 100%;             /* чтобы занимать всю доступную ширину до 1200px */
  box-sizing: border-box;  /* чтобы padding не выходил за пределы */  
}

.footer-logo img {
  height: 150px; /* логотип по высоте футера */
  object-fit: contain;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.footer-column h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
}

.footer-column p {
  margin: 0;
  font-size: 0.95rem;
}

.footer-column a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
}

.footer-column a:hover {
  opacity: 0.7;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 15px;
  font-size: 1.0rem;
  margin: 0;
}

/* 📱 Адаптация для мобильных */
@media (max-width: 992px) {
  .site-footer{
    padding: 10px;
  }
  
  .header-actions .btn-primary {
    display: none;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .footer-logo img {
    margin: 0;
  }

  .footer-column {
    align-items: center;
  }

  .footer-column h4 {
    font-size: 1rem;
  }

  .footer-column p,
  .footer-column a {
    font-size: 0.9rem;
  }

  .nav {
    display: none;
  }
  .phone {
    display: none;
  }
  .burger {
    display: flex;
  }
  .header-center {
    justify-self: start;
  }
  
  .logo-text {
    display: none;
  }
}

@media (max-width: 420px) {
  .mobile-menu {
    width: 100%;
    right: -100%;
  }
  .mobile-menu.open {
    right: 0;
  }
}
