/* ======================
   БАЗОВЫЕ ПЕРЕМЕННЫЕ
   ====================== */
:root {
  /* Цвета */
  --primary-color: #022247;
  --secondary-color: #444545;
  --light-background: #f3f4f8;

  /* Шрифты */
  --primary-font: "Montserrat", sans-serif;
  --additional-font: "Montserrat Alternates", sans-serif;

  /* Градиенты */
  --button-gradient-start: #4a90e2;
  --button-gradient-end: #50e3c2;

  /* Фоны */
  --header-bg: rgba(255, 255, 255, 0.2);
}

/* ======================
   БАЗОВЫЕ СТИЛИ
   ====================== */
html {
  scroll-behavior: smooth;
  min-height: 100dvh;
  transition: height 0.4s linear;
}

body {
  font-family: var(--primary-font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* ======================
   УТИЛИТЫ И КОНТЕЙНЕРЫ
   ====================== */
.container {
  max-width: 1650px;
  padding: 0 15px;
  margin: 0 auto;
  width: 100%;
}

/* ======================
   ХЕДЕР И НАВИГАЦИЯ
   ====================== */
.header__top {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  z-index: 10;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  transition: transform 0.3s, background-color 0.3s, padding 0.3s;
}

.header__top.hide {
  transform: translateY(-100%);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 30px;
  max-width: 1650px;
  margin: 0 auto;
  height: 60px;
}

.nav__logo {
  width: 220px;
  padding: 5px 15px;
}

/* ======================
   ОСНОВНОЕ МЕНЮ
   ====================== */
.menu__btn {
  display: none;
}

.menu__list {
  display: flex;
  align-items: center;
  column-gap: 40px;
  font-weight: 600;
  font-size: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu__item {
  position: relative;
}

.menu__link {
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
}

.menu__link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ======================
   ВЫПАДАЮЩИЕ МЕНЮ
   ====================== */
/* Основное выпадающее меню */
.menu__item--dropdown {
  position: relative;
}

.menu__item--dropdown > .menu__link::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.menu__item--dropdown:hover > .menu__link::after,
.menu__item--dropdown.menu__item--active > .menu__link::after {
  transform: rotate(180deg);
}

.dropdown__list {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  list-style: none;
  padding: 8px 0;
  min-width: 300px;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.dropdown__list--active,
.menu__item--dropdown:hover > .dropdown__list {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Элементы выпадающего меню */
.dropdown__item {
  position: relative;
  padding: 12px 20px;
}

.dropdown__link {
  color: var(--secondary-color);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
  padding: 10px 20px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dropdown__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(
    135deg,
    var(--button-gradient-start),
    var(--button-gradient-end)
  );
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.dropdown__link:hover {
  color: var(--primary-color);
  background: rgba(74, 144, 226, 0.05);
  padding-left: 25px;
}

.dropdown__link:hover::before {
  transform: translateX(0);
}

/* Субменю */
.dropdown__item--submenu {
  position: relative;
}

.dropdown__item--submenu > .dropdown__link::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.3s ease;
}

.dropdown__item--submenu:hover > .dropdown__link::after {
  transform: translateY(-50%) translateX(3px);
  color: var(--primary-color);
}

.dropdown__submenu {
  position: absolute;
  top: -8px;
  left: 100%;
  margin-left: 0px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 300px;
  list-style: none;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1001;
}

.dropdown__submenu--active,
.dropdown__item--submenu:hover > .dropdown__submenu {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ======================
   СЕКЦИЯ КОНТАКТОВ
   ====================== */
.contacts {
  position: relative;
  padding: 3.125rem 0;
  color: var(--primary-color);
  z-index: 1;
  overflow: hidden;
  box-shadow: 0.0625rem 0.0625rem 0.25rem rgba(0, 0, 0, 0.5);
}

.contacts::before,
.contacts::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 58%;
  z-index: -1;
}

.contacts::before {
  left: 0;
  background: linear-gradient(135deg, #a8dadc, #e8eddf);
}

.contacts::after {
  right: 0;
  background-color: #fff;
  transform-origin: bottom left;
  transform: skewX(20deg) translateX(26%);
}

.contacts__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 15px;
}

.contacts__info {
  max-width: 33.75rem;
  margin-right: 1.25rem;
  color: #2c3131;
}

.compact__address,
.contacts__text {
  line-height: 1.5;
  margin-bottom: 2rem;
}

.compact__address span {
  font-weight: 600;
}

.contacts__links a {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #2c3131;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contacts__links a:hover {
  color: var(--primary-color);
}

/* Форма контактов */
.contacts__form {
  max-width: 33.75rem;
  width: 100%;
  color: #444545;
}

.form__input,
.form__textarea {
  background-color: rgba(255, 255, 255, 0.1);
  color: #444545;
  border: 0.0625rem solid rgb(45 45 52 / 42%);
  border-radius: 0.3125rem;
  padding: 0.8125rem 0.9375rem;
  margin-bottom: 0.8125rem;
  outline: transparent;
  font-size: 0.875rem;
  width: 100%;
  display: block;
  transition: border-color 0.3s ease;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--button-gradient-start);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.form__textarea {
  resize: vertical;
  height: 7.25rem;
  margin-bottom: 1.875rem;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
  text-align: left;
}

.form__consent-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1875rem;
  accent-color: var(--button-gradient-start);
  flex-shrink: 0;
}

.form__consent-label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #2c3131;
}

.form__consent-label a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

.form__btn {
  display: block;
  width: 240px;
  padding: 0.3125rem 0.625rem;
  background: linear-gradient(
    135deg,
    var(--button-gradient-start),
    var(--button-gradient-end)
  );
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.form__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(74, 144, 226, 0.6);
}

.form__btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(74, 144, 226, 0.4);
}

/* ======================
   ФУТЕР
   ====================== */
.footer {
  padding: 2.25rem 0;
  background: var(--light-background);
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.0625rem solid var(--secondary-color);
  padding-bottom: 1.875rem;
  max-width: 1650px;
  margin: 0 auto;
  margin-bottom: 15px;
  padding: 15px 0;
}

.footer-top__logo {
  display: block;
}

.logo__img {
  width: 12.5rem;
  max-width: 100%;
  height: auto;
  display: block;
}

.footer-bottom {
  padding-top: 1.25rem;
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer__polit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9375rem;
  font-size: 0.875rem;
  color: var(--primary-color);
}

.footer__polit-text,
.footer__polit-link a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__polit-link a:hover {
  color: #444545;
  text-decoration: underline;
}

/* ======================
   COOKIE УВЕДОМЛЕНИЕ
   ====================== */
#cookie__note {
  display: none;
  position: fixed;
  bottom: 0.9375rem;
  left: 50%;
  width: 50%;
  transform: translateX(-50%);
  padding: 1.25rem;
  background-color: white;
  border-radius: 0.25rem;
  box-shadow: 0.125rem 0.1875rem 0.625rem rgba(0, 0, 0, 0.4);
  z-index: 10000;
  align-items: center;
}

.cookie__descr {
  margin: 0;
  font-size: 0.875rem;
  color: black;
  margin-right: 0.9375rem;
  flex: 1;
}

.cookie__descr span {
  font-weight: 600;
}

.cookie__accept {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background: linear-gradient(
    135deg,
    var(--button-gradient-start),
    var(--button-gradient-end)
  );
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  text-align: center;
  z-index: 1000;
}

.cookie__accept:hover {
  background-color: #fff;
  box-shadow: 0 6px 15px rgba(74, 144, 226, 0.6);
}

.cookie__accept:active {
  box-shadow: inset 0.0625rem 0.0625rem 0.25rem rgba(0, 0, 0, 0.5);
}

#cookie__note.show {
  display: flex;
}

/* ======================
   АДАПТИВНЫЙ ДИЗАЙН
   ====================== */
@media (max-width: 1200px) {
  .menu__list {
    column-gap: 0px;
  }
}

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
  /* === КНОПКА БУРГЕР === */
  .menu__btn {
    display: block;
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
  }

  .menu__btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .menu__btn span::before,
  .menu__btn span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    transition: inherit;
  }

  .menu__btn span::before {
    top: -7px;
  }
  .menu__btn span::after {
    top: 7px;
  }

  .menu__btn.active span {
    background: transparent;
  }
  .menu__btn.active span::before {
    top: 0;
    transform: rotate(45deg);
  }
  .menu__btn.active span::after {
    top: 0;
    transform: rotate(-45deg);
  }
  .menu__btn.active span::before,
  .menu__btn.active span::after {
    background: white;
  }

  /* === МЕНЮ НА ВСЮ ШИРИНУ === */
  .menu__list {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 80px 20px 40px;
    background: var(--secondary-color);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-direction: column;
    align-items: flex-start;
    z-index: 100;
    transform: translateX(100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .menu__list--active {
    transform: translateX(0);
  }

  .menu__list--active::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: -1;
    pointer-events: none;
  }

  body.menu-open {
    overflow: hidden;
    height: 100vh;
  }

  /* Пункты меню */
  .menu__item {
    width: 100%;
    margin-bottom: 0;
  }

  .menu__link {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .menu__link:hover {
    color: #a0d8ff;
    padding-left: 5px;
  }

  /* СТРЕЛКА ДЛЯ ДРОПДАУНОВ */
  .menu__item--dropdown > .menu__link::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid currentColor;
    transition: transform 0.3s ease;
    margin-left: auto;
  }

  .menu__item--dropdown.menu__item--active > .menu__link::after {
    transform: rotate(180deg);
  }

  /* Выпадающие меню (аккордеон) */
  .dropdown__list {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 20px;
    visibility: visible;
    opacity: 1;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }

  .dropdown__list--active {
    max-height: 1200px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .dropdown__item {
    padding: 0;
  }

  .dropdown__link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    padding: 10px 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .dropdown__link:hover {
    color: white;
    padding-left: 15px;
  }
  .dropdown__link::before {
    display: none;
  }

  /* СТРЕЛКА ДЛЯ СУБМЕНЮ */
  .dropdown__item--submenu > .dropdown__link::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform 0.3s ease;
    margin-left: auto;
  }

  .dropdown__item--submenu.dropdown__item--active > .dropdown__link::after {
    transform: rotate(90deg);
  }

  /* Субменю (внутри аккордеона) */
  .dropdown__submenu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
  }

  .dropdown__submenu--active {
    max-height: 800px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .menu__list * {
    pointer-events: auto;
  }
  .menu__list,
  .menu__list * {
    cursor: pointer;
  }

  .menu__link,
  .dropdown__link {
    -webkit-tap-highlight-color: transparent;
  }

  .menu__item--dropdown > .menu__link::after,
  .dropdown__item--submenu > .dropdown__link::after {
    pointer-events: none;
  }

  .menu__item--dropdown > .menu__link,
  .dropdown__item--submenu > .dropdown__link {
    pointer-events: auto;
  }

  .contacts__inner {
    flex-direction: column;
    text-align: center;
  }
  .contacts__info,
  .contacts__form {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 2rem;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
    margin-bottom: 15px;
  }
}

/* Мобильные устройства (480px и меньше) */
@media (max-width: 480px) {
  .nav__logo {
    width: 180px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 !important;
  }

  .contacts {
    padding: 1.875rem 0;
    box-shadow: none;
  }

  .contacts::before,
  .contacts::after {
    display: none;
  }

  .form__btn {
    font-size: 1.25rem;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  .footer__polit {
    flex-direction: column;
    text-align: center;
  }

  .footer__polit-text {
    margin-bottom: 0.9375rem;
  }

  .cookie__accept {
    width: 100%;
    margin-top: 10px;
  }

  #cookie__note {
    flex-direction: column;
    text-align: center;
    width: 90%;
  }

  .cookie__descr {
    margin-right: 0;
    margin-bottom: 10px;
  }
}

/* Очень маленькие экраны (320px и меньше) */
@media (max-width: 320px) {
  .nav__logo {
    width: 150px;
  }

  .form__btn {
    font-size: 1.1rem;
    padding: 0.25rem;
  }
}

/* === Toast notifications === */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 360px;
  padding: 14px 18px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-10px);
  animation: toast-in 0.3s ease forwards;
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.toast--success {
  background: linear-gradient(
    135deg,
    var(--button-gradient-start),
    var(--button-gradient-end)
  );
  color: #fff;
}

.toast--error {
  background: linear-gradient(135deg, #b71c1c, #e53935);
  color: #fff;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
