@import 'variables.css';

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.header-whatsapp i {
  color: #10b77d !important;
  font-size: 1.6rem;
  transition: color 0.18s, filter 0.18s, transform 0.18s;
}

/* Убираем дублирование .site-header - он уже в critical.css */

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  padding: 0 36px;
  width: 100%;
  box-sizing: border-box;
}

.logo img {
  height: 40px;
  margin-bottom: 0;
  margin-right: 0;
  margin-left: 0;
  width: auto;
  object-fit: contain;
  display: block;
}

.main-nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.main-nav a {
  color: #202a34;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #10b77d;
}

/* Специфичное правило для кнопки "Связаться" */
.main-nav a.contact-btn {
  color: var(--white);
}

.main-nav a.contact-btn:hover {
  color: var(--white);
}



/* Кнопка бургер */
.burger {
  display: none;
  flex-direction: column;
  width: 28px;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
  transition: all 0.3s ease;
  position: relative;
}

.burger span {
  display: block;
  height: 3px;
  background: #10b77d;
  border-radius: 2px;
  transition: all 0.3s ease;
  width: 100%;
}

/* Анимация бургера при открытии */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Мобильное меню */
.mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  flex-direction: column;
  align-items: center;
  background: var(--white);
  position: fixed;
  top: 70px;
  /* Прижимаем вплотную к хедеру */
  left: 0;
  right: 0;
  z-index: var(--z-burger);
  box-shadow: var(--shadow-default);
  width: 100%;
  height: auto;
  max-height: none;
  overflow-y: visible;
  margin: 0;
  padding: 20px 0;
  /* Добавляем отступы сверху и снизу */
}

/* При открытии */
.mobile-menu.active {
  display: flex !important;
  max-height: none;
  opacity: 1;
  visibility: visible;
  overflow-y: visible;
}

/* Предотвращение скролла body когда меню открыто */
body.menu-open {
  overflow: hidden;
}

/* Стили для мобильных ссылок */
.mobile-link {
  display: block;
  text-align: center;
  padding: 12px 0;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  transition: background var(--transition-normal);
  width: 100%;
}

.mobile-link:hover {
  background: var(--primary-color);
  color: var(--white);
}

.mobile-link:active {
  background: var(--primary-hover);
  color: var(--white);
}

.mobile-link.contact-btn {
  background: var(--primary-color);
  color: var(--white);
  margin: 8px auto;
  padding: 10px 20px;
  border-radius: var(--border-radius-medium);
  width: fit-content;
  display: block;
  text-align: center;
}

.mobile-link i.fa-whatsapp {
  font-size: 22px;
  color: var(--primary-color);
}

.mobile-menu a:first-child {
  margin-top: 0;
}

.mobile-menu nav {
  width: 100%;
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .mobile-menu {
    display: none;
  }

  .mobile-menu.active {
    display: flex !important;
    visibility: visible;
    opacity: 1;
  }
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  color: #202a34;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.dropdown-toggle:hover {
  color: #10b77d;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
  display: none;
  flex-direction: column;
  min-width: 180px;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  padding: 8px 16px;
  color: #202a34;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: #f8f9fa;
  color: #10b77d;
}