/* ==================== ОБЩИЕ СТИЛИ И СБРОС ==================== */
/* Сброс стилей для всех элементов */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
}

/* Убираем маркеры у списков */
ul {
  list-style: none;
}

/* Стили для кнопок */
button {
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Стили для полей ввода */
input {
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

/* Стили для текстовых областей */
textarea {
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

/* Стили для ссылок */
a {
  text-decoration: none;
  color: inherit;
}

/* ==================== ПЕРЕМЕННЫЕ ==================== */
:root {
  /* Цвет основого текста */
  --primary-text-color: #80b3ff;
  /* Дополнительный цвет/чёрный цвет */
  --second-color: #000;
  /* Цвет основого фона/белый цвет */
  --primary-bg-color: #fff;
  /* Контейнер */
  --container-width: 1400px;
  --container-padding: 16px;
  /* Отступ секции */
  --section-margin: 80px;
  /* Граница карточки/контента */
  --border: 2px solid #80b3ff;
  /* Граница карточки/контента HOVER*/
  --border-hover: 2.1px solid #588cdb;
  /* Размер основного заголовка страницы */
  --primary-size-title: 40px;
}

@media (max-width: 1600px) {
  :root {
    --container-width: 1200px;
    --primary-size-title: 35px;
    --section-margin: 70px;
  }
}

@media (max-width: 1400px) {
  :root {
    --container-width: 1100px;
    --primary-size-title: 30px;
    --section-margin: 60px;
  }
}

@media (max-width: 1024px) {
  :root {
    --container-width: 900px;
    --primary-size-title: 28px;
    --section-margin: 50px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-width: 650px;
    --primary-size-title: 25px;
    --section-margin: 40px;
  }
}

@media (max-width: 480px) {
  :root {
    --container-width: 350px;
    --primary-size-title: 20px;
    --section-margin: 30px;
  }
}

@media (max-width: 390px) {
  :root {
    --container-width: 300px;
    --primary-size-title: 18px;
    --section-margin: 20px;
  }
}

/* ==================== БАЗОВЫЕ ШАБЛОНЫ ==================== */
/* Основной контейнер для центрирования контента */
.container {
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Отступ между секциями */
.section {
  padding-top: var(--section-margin);
}
.section:last-child {
  padding-bottom: var(--section-margin);
}

/* Фон основной области */
.main,
.footer {
  background: rgba(249, 249, 249, 1);
}

/* Заголовок секции */
.section__title {
  font-size: var(--primary-size-title);
  font-weight: 800;
  color: var(--primary-text-color);
  line-height: 1.2;
}

/* Декоративная часть заголовка (черный текст) */
.section__title-decor {
  color: var(--second-color);
}

/* Стиль для ссылок "Смотреть все" */
.look-all {
  color: var(--primary-text-color);
  font-size: 25px;
  font-weight: 500;
  margin-right: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.look-all:hover {
  color: #5090ff;
}

.look-all svg {
  max-width: 50px;
  width: 100%;
}

/* Шапка секции с заголовком и ссылкой */
.section__top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

/* Карточка/дочерний элемент секции */
.content__card {
  border: var(--border);
}

.content__card:hover {
  border: var(--border-hover);
}

/* ==================== КНОПКА НАВЕРХ ==================== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #fff;
  border: 3px solid #80b3ff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(128, 179, 255, 0.2);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #80b3ff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(128, 179, 255, 0.4);
}

.scroll-to-top:hover svg path {
  fill: #fff;
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

.scroll-to-top svg path {
  fill: #80b3ff;
  transition: fill 0.3s ease;
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ==================== ХЛЕБНЫЕ КРОШКИ ==================== */
/* .crumbs {
  margin-bottom: 15px;
  padding-bottom: 0;
  padding-top: 30px;
}

.crumbs__container {
  padding-top: 30px;
}

.crumbs__list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.crumbs__item {
  color: #c6c2fe;
  font-size: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.crumbs__item:hover {
  text-decoration: underline;
}

.crumbs__item::after {
  content: url("../assets/svg/Arrow-crumbs.svg");
}

.crumbs__item:last-child::after {
  content: none;
} */

/* ==================== HEADER (ШАПКА) ==================== */
/* Основной блок шапки */
.header {
  box-shadow: 0px 3px 20px rgba(0, 0, 0, 0.4);
  background: #fff;
  padding: 11px 0 22px 0;
  position: sticky;
  z-index: 1000;
  width: 100%;
}

/* Контейнер шапки с уменьшенными отступами */
.header__container {
  max-width: 1500px;
}

/* Блок с контактной информацией */
.header__text {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Стили для номеров телефонов */
.header__phones,
.header__number {
  color: var(--primary-text-color);
  font-size: 20px;
  font-weight: 700;
}

/* Заголовок "Бесплатно по РФ" */
.header__title {
  color: var(--primary-text-color);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
}

/* Декоративная линия-разделитель */
.header__border {
  border: 2px solid rgba(198, 194, 254, 1);
  margin: 15px 0;
  transition: all 0.3s ease;
}

.header__email {
  color: var(--primary-text-color);
  font-size: 18px;
  font-weight: 500;
}

/* Основная навигация */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

/* Логотип */
.header__logo {
  transition: all 0.7s ease;
  max-width: 150px;
  width: 100%;
  flex-shrink: 0;
}

/* Эффект наведения */
.header__logo:hover {
  transform: translateY(5px);
}

/* Список пунктов меню */
.nav__list {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 0 auto;
  flex: 1;
  justify-content: center;
}

/* Стиль для активного пункта меню (Главная) */
.nav__link.active {
  color: black;
}

/* Стиль для обычных пунктов меню */
.nav__link {
  color: rgba(198, 194, 254, 1);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.5s ease;
  display: inline-block;
}

.nav__link.active,
.nav__link:hover {
  color: #000;
}

.nav__profile {
  margin-left: auto;
  flex-shrink: 0;
}

/* ==================== DROPDOWN МЕНЮ ==================== */
.dropdown {
  position: relative;
}

/* При наведении на страницу */
.dropdown__toggle {
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.dropdown__toggle:hover .nav__link,
.nav__link:hover {
  color: black;
}

.dropdown__toggle-img {
  padding: 0 0 0 10px;
  transition: transform 0.7s ease;
  height: 12px;
}

.dropdown__separator {
  color: rgba(198, 194, 254, 1);
  font-size: 20px;
  font-weight: 500;
  margin-left: 8px;
  margin-right: 8px;
  display: inline-block;
  transition: all 0.5s ease;
}

.dropdown__toggle.active .dropdown__separator {
  transform: rotate(90deg);
  color: #000;
}

.dropdown__toggle:hover .dropdown__separator {
  color: #000;
}

.dropdown__menu {
  display: none;
  position: absolute;
  z-index: 100;
  top: 55px;
  left: -150px;
  width: 450px;
  flex-direction: column;
  gap: 10px;
  background-color: #fff;
  padding: 15px 20px;
  border-radius: 20px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown__menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.dropdown__menu-link {
  color: rgba(198, 194, 254, 1);
  font-size: 20px;
  font-weight: 500;
  transition: all 0.4s ease;
  padding: 15px 20px;
  border-radius: 20px;
  text-align: center;
  display: block;
}

.dropdown__menu-link:hover {
  background: #c6c2fe;
  color: #000;
}

.img__click {
  transform: rotate(180deg);
  margin-left: 10px;
}

.dropdown__toggle:hover .nav__link,
.nav__link:hover {
  color: #000;
}

/* Анимация скрытия header при скролле */
/* Стили для анимации header__text */
.header__text.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
}

.header__border.hide {
  display: none;
}

/* Важно: добавьте это, чтобы плавно схлопывалась высота */
.header__container:first-child {
  transition: all 0.3s ease;
  overflow: hidden;
}

/* ==================== БУРГЕР МЕНЮ ==================== */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.header__burger span {
  width: 30px;
  height: 3px;
  background: rgba(128, 179, 255, 1);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.header__burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__burger.active span:nth-child(2) {
  opacity: 0;
}

.header__burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.header__nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 999;
  padding: 100px 20px 20px;
  overflow-y: auto;
}

.header__nav-mobile.active {
  display: block;
}

.header__nav-mobile-inner {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

/*   ЛОГОТИП В МОБИЛЬНОМ МЕНЮ - ПО ЦЕНТРУ */
.header__logo-mobile {
  display: block;
  max-width: 150px;
  margin: 0 auto 30px;
  text-align: center;
}

.header__logo-mobile img {
  display: block;
  margin: 0 auto;
}

/* Кнопка закрытия (крестик) */
.header__burger-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__burger-close span {
  position: absolute;
  width: 30px;
  height: 3px;
  background: rgba(128, 179, 255, 1);
  border-radius: 3px;
}

.header__burger-close span:nth-child(1) {
  transform: rotate(45deg);
}

.header__burger-close span:nth-child(2) {
  transform: rotate(-45deg);
}

.header__mobile-contacts {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(198, 194, 254, 1);
}

.header__nav-mobile .nav__list {
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  margin: 0;
}

.header__nav-mobile .nav__link {
  font-size: 20px;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  width: 100%;
  display: block;
  text-align: center;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== FOOTER (ПОДВАЛ) ==================== */
.footer {
  padding: 40px;
  text-align: center;
  background-color: transparent;
}

.footer__container {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer__title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
}

.footer__nav {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer__link {
  color: rgba(128, 179, 255, 1);
  font-size: 24px;
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: rgba(198, 194, 254, 1);
}

.footer__link-text {
  color: #1a1a2e;
  font-size: 20px;
  font-weight: 600;
}

.footer__separator {
  color: rgba(128, 179, 255, 1);
  font-size: 24px;
  font-weight: 500;
}

/* ==================== АДАПТИВ 1400px ==================== */
@media (max-width: 1400px) {
  .footer__container {
    padding: 0 15px;
  }

  .section__title {
    font-size: 42px;
  }

  .header__number {
    font-size: 22px;
  }

  .header__title {
    font-size: 18px;
  }

  .header__email {
    font-size: 16px;
  }

  .nav__list {
    gap: 30px;
  }

  .nav__link {
    font-size: 18px;
  }

  .header__logo {
    max-width: 160px;
  }

  .dropdown__menu {
    left: -100px;
    width: 400px;
  }

  .dropdown__menu-link {
    font-size: 18px;
  }

  .footer__title {
    font-size: 28px;
  }

  .footer__link {
    font-size: 22px;
  }

  .crumbs__item {
    font-size: 18px;
  }
}

/* ==================== АДАПТИВ 768px ==================== */
@media (max-width: 768px) {

  .section__title {
    font-size: 32px;
  }

  .section__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .header {
    padding: 10px 0 15px 0;
  }

  .header__container {
    padding: 0 15px;
  }

  .header__text {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }

  .header__phones {
    align-items: center;
  }

  .header__number {
    font-size: 18px;
  }

  .header__title {
    font-size: 16px;
  }

  .header__email {
    display: none;
  }

  .header__border {
    margin: 10px 0;
  }

  .nav {
    justify-content: space-between;
    margin-top: 15px;
  }

  .header__logo {
    max-width: 140px;
  }

  .nav__list {
    display: none !important;
  }

  .nav__profile {
    display: none !important;
  }

  .header__burger {
    display: flex !important;
  }

  .header__nav-mobile .nav__list {
    display: flex !important;
  }

  .dropdown__menu {
    position: static;
    width: 100%;
    left: 0;
    box-shadow: none;
    padding: 10px 0;
  }

  .dropdown__menu-link {
    font-size: 16px;
    padding: 12px 15px;
  }

  .footer {
    padding: 40px 30px 60px 30px;
  }

  .footer__container {
    padding: 0 15px;
  }

  .footer__title {
    font-size: 24px;
  }

  .footer__nav {
    flex-direction: column;
    gap: 12px;
  }

  .footer__link {
    font-size: 20px;
  }

  .footer__link-text {
    font-size: 16px;
  }

  .footer__separator {
    font-size: 20px;
  }

  .crumbs {
    padding: 25px 0 10px;
  }

  .crumbs__container {
    padding: 0 15px;
  }

  .crumbs__item {
    font-size: 16px;
  }

  .nav__link,
  .dropdown__menu-link,
  .footer__link,
  .header__burger {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header__logo-mobile {
    max-width: 140px;
    margin: 0 auto 25px;
  }
}

/* ==================== АДАПТИВ 490px ==================== */
@media (max-width: 490px) {
  :root {
    --container-padding: 12px;
  }

  .section__title {
    font-size: 26px;
  }

  .header {
    padding: 8px 0 12px 0;
  }

  .header__container {
    padding: 0 12px;
  }

  .header__number {
    font-size: 16px;
  }

  .header__title {
    font-size: 14px;
  }

  .header__logo {
    max-width: 120px;
  }

  .header__burger span {
    width: 26px;
    height: 3px;
  }

  .header__nav-mobile {
    padding: 80px 15px 15px;
  }

  .header__nav-mobile .nav__link {
    font-size: 18px;
    padding: 12px 15px;
  }

  .header__logo-mobile {
    max-width: 120px;
    margin: 0 auto 20px;
  }

  .dropdown__menu-link {
    font-size: 15px;
    padding: 10px 12px;
  }

  .footer {
    padding: 35px 20px 50px 20px;
  }

  .footer__container {
    padding: 0 12px;
  }

  .footer__title {
    font-size: 20px;
  }

  .footer__link {
    font-size: 18px;
  }

  .crumbs {
    padding: 20px 0 8px;
  }

  .crumbs__container {
    padding: 0 12px;
  }

  .crumbs__item {
    font-size: 14px;
  }
}

/* ==================== АДАПТИВ 390px ==================== */
@media (max-width: 390px) {
  :root {
    --container-padding: 10px;
  }
  .section__title {
    font-size: 22px;
  }

  .header {
    padding: 6px 0 10px 0;
  }

  .header__container {
    padding: 0 10px;
  }

  .header__number {
    font-size: 14px;
  }

  .header__title {
    font-size: 12px;
  }

  .header__logo {
    max-width: 100px;
  }

  .header__burger span {
    width: 24px;
    height: 2px;
  }

  .header__nav-mobile {
    padding: 70px 12px 12px;
  }

  .header__nav-mobile .nav__link {
    font-size: 16px;
    padding: 10px 12px;
  }

  .header__nav-mobile-inner {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
  }

  .header__logo-mobile {
    display: block;
    max-width: 150px;
    margin: 0 auto 30px;
    text-align: center;
  }

  .header__logo-mobile img {
    display: block;
    margin: 0 auto;
  }

  .dropdown__menu-link {
    font-size: 14px;
    padding: 8px 10px;
  }

  .footer {
    padding: 30px 15px 40px 15px;
  }

  .footer__container {
    padding: 0 10px;
  }

  .footer__title {
    font-size: 18px;
  }

  .footer__link {
    font-size: 16px;
  }

  .crumbs {
    padding: 18px 0 6px;
  }

  .crumbs__container {
    padding: 0 10px;
  }

  .crumbs__item {
    font-size: 12px;
  }
}

/* ==================== МОБИЛЬНОЕ DROPDOWN МЕНЮ ==================== */
/* Контейнер dropdown в мобильном меню */
.dropdown-mobile {
  width: 100%;
}

/* Кнопка переключения dropdown */
.dropdown-mobile__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  min-height: 48px;
}

/* Стрелка dropdown */
.dropdown-mobile__arrow {
  font-size: 12px;
  color: rgba(198, 194, 254, 1);
  transition: transform 0.3s ease;
}

/* Поворот стрелки при открытии */
.dropdown-mobile__toggle.active .dropdown-mobile__arrow {
  transform: rotate(180deg);
  color: #000;
}

/* Выпадающее меню (скрыто по умолчанию) */
.dropdown-mobile__menu {
  display: none;
  flex-direction: column;
  background: #f8f9ff;
  padding: 10px 0;
}

/* Показываем меню при классе .open */
.dropdown-mobile__menu.open {
  display: flex;
}

/* Ссылки внутри мобильного dropdown */
.dropdown-mobile__link {
  display: block;
  padding: 12px 30px;
  color: rgba(198, 194, 254, 1);
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.dropdown-mobile__link:last-child {
  border-bottom: none;
}

.dropdown-mobile__link:hover {
  color: #000;
  background: rgba(198, 194, 254, 0.1);
}

/* Адаптив для мобильного dropdown */
@media (max-width: 768px) {
  .dropdown-mobile__toggle {
    padding: 12px 15px;
  }

  .dropdown-mobile__link {
    padding: 10px 25px;
    font-size: 16px;
  }
}

@media (max-width: 490px) {
  .dropdown-mobile__toggle {
    padding: 10px 12px;
  }

  .dropdown-mobile__link {
    padding: 8px 20px;
    font-size: 14px;
  }

  .dropdown-mobile__arrow {
    font-size: 10px;
  }
}
