/* Сброс и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* Базовый размер шрифта для масштабирования */
html {
  font-size: 16px;
}

@media screen and (max-width: 1200px) {
  html {
    font-size: 14px;
  }
}

/* Отступ для основного контента, чтобы не скрывался под фиксированными блоками */
main {
  margin-top: 140px;
}

/* Топ-бар (фиксированный в самом верху) */
.top-bar {
  background: #1a3c5e;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 0.9rem;
}

.top-bar-left span {
  color: #fff;
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.top-bar-left span:hover {
  color: #f25c05;
}

.top-bar-left i {
  color: #f25c05;
}

.top-bar-left a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-bar-left a:hover {
  color: #f25c05;
}

.top-bar-right a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-bar-right a:hover {
  color: #f25c05;
}

/* Шапка (header), фиксированная под топ-баром */
header {
  background: #ffffff;
  position: fixed;
  top: 50px;
  left: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  transition: background 0.3s ease;
  box-sizing: border-box;
}

header:hover {
  background: linear-gradient(90deg, #ffffff, #f5f5f5);
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.1);
}

/* Кнопка-гамбургер */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #1a3c5e;
  padding: 5px;
  transition: color 0.3s ease;
  position: relative;
  z-index: 1002;
}

.menu-toggle:hover {
  color: #f25c05;
}

.nav-links a {
  color: #1a3c5e;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #f25c05;
  opacity: 1;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #f25c05;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Активный пункт меню */
.nav-links a.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #f25c05;
}

/* Стили для ссылки-домика */
.nav-links a.home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a3c5e;
  position: relative;
  transition: all 0.3s ease;
}

.nav-links a.home-link:hover {
  color: #f25c05;
}

.nav-links a.home-link.active::after {
  display: none;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  color: #1a3c5e;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  padding: 10px 15px;
  display: block;
  transition: all 0.3s ease;
}

.dropdown-toggle:hover {
  color: #f25c05;
  opacity: 1;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: auto;
  max-width: 400px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  top: 100%;
  left: 0;
}

.dropdown-menu a {
  color: #1a3c5e;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #f1f1f1;
  text-transform: none;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  transition: all 0.3s ease;
}

.dropdown-menu a:hover {
  color: #f25c05;
  opacity: 1;
}

.dropdown-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 5px;
  left: 16px;
  background: #f25c05;
  transition: width 0.3s ease;
}

.dropdown-menu a:hover::after {
  width: calc(100% - 32px);
}

/* Удалить или закомментировать этот ховер: */
/*
.dropdown:hover .dropdown-menu {
  display: block;
}
*/
.dropdown-menu {
  display: none;
  transition: all 0.2s ease;
}

.dropdown-menu.visible {
  display: block;
}


/* Изменили цвет с черного (#0d1b2a) на темно-синий (#1a3c5e) */
.phone {
  color: #1a3c5e;
  font-weight: 500;
  font-size: 1rem;
}

/* Кнопка "Заказать звонок" */
.request-call {
  background: linear-gradient(45deg, #f25c05, #ff8c33);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
  min-height: 40px;
  font-size: 1rem;
}

.request-call:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(242, 92, 5, 0.6), 0 0 5px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45deg, #d94a00, #ff8c33);
  animation: pulse 0.5s infinite;
}

.request-call.mobile {
  display: none;
}

/* Плавающая кнопка CTA */
.floating-cta {
  background: linear-gradient(45deg, #f25c05, #ff8c33);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
  min-height: 40px;
  font-size: 1rem;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.floating-cta:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(242, 92, 5, 0.6), 0 0 5px rgba(0, 0, 0, 0.2);
  background: linear-gradient(45deg, #d94a00, #ff8c33);
  animation: pulse 0.5s infinite;
}

/* Эффект пульсации */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 6px 20px rgba(242, 92, 5, 0.6), 0 0 5px rgba(0, 0, 0, 0.2);
  }
  100% {
    box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
  }
}

/* Десктопное меню (при ширине больше 1536px) */
@media screen and (min-width: 1537px) {
  .nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
    justify-content: center;
    flex: 1;
    transition: all 0.4s ease;
    flex-wrap: nowrap;
  }

  .contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
  }
}

/* Мобильная адаптация (с 1536px) */
@media screen and (max-width: 1536px) {
  .menu-toggle {
    display: block !important;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 10000; /* Увеличиваем z-index */
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #ffffff !important;
    opacity: 1 !important;
    position: fixed;
    top: 0;
    right: 0;
    width: auto;
    height: auto;
    padding: 20px;
    padding-top: 100px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 9999; /* Увеличиваем z-index */
    border-radius: 0 0 0 15px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
    transform: translateY(0);
    background: #ffffff !important;
    opacity: 1 !important;
    z-index: 9999;
  }

  .nav-links a {
    padding: 10px;
    text-align: center;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: #f9f9f9;
    padding-left: 20px;
    min-width: auto;
    width: auto;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .dropdown-menu a::after {
    bottom: 0;
  }

  .dropdown-menu a:hover::after {
    width: calc(100% - 36px);
  }

  .request-call.mobile {
    display: block;
    margin: 15px auto 0;
    padding: 10px 20px;
    border-radius: 50px;
    background: linear-gradient(45deg, #f25c05, #ff8c33);
    font-weight: bold;
    width: 90%;
    box-shadow: 0 4px 15px rgba(242, 92, 5, 0.4), 0 0 5px rgba(0, 0, 0, 0.1);
    min-height: 40px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    line-height: 1.5;
  }

  .request-call.mobile:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(242, 92, 5, 0.6), 0 0 5px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #d94a00, #ff8c33);
    animation: pulse 0.5s infinite;
  }

  .contact-info.desktop {
    display: none;
  }

  .logo img {
    height: 50px;
  }

  .floating-cta {
    padding: 10px 20px;
    font-size: 0.9rem;
    bottom: 15px;
    right: 15px;
  }
}

/* Дополнительная адаптация для узких экранов (меньше 400px) */
@media screen and (max-width: 400px) {
  header {
    padding: 10px 15px;
  }

  .menu-toggle {
    right: 5px;
    font-size: 24px;
    padding: 3px;
  }

  .logo img {
    height: 40px;
  }
}