/* ===================================================================
   HEADER & NAVIGATION STYLES
   Подключается на всех страницах вместе с header.js
   =================================================================== */

/* --- Header --- */
.site-header {
  background: #fff;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header__logo {
  font-size: 20px;
  font-weight: 700;
  color: #e67e22;
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.site-header__logo:hover {
  color: #d35400;
}

.site-header__nav {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.site-header__nav > a,
.site-header__nav > .nav-dropdown > .nav-dropdown__toggle {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.site-header__nav > a::after,
.site-header__nav > .nav-dropdown > .nav-dropdown__toggle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #e67e22;
  transition: width 0.3s ease;
}

.site-header__nav > a:hover,
.site-header__nav > .nav-dropdown:hover > .nav-dropdown__toggle {
  color: #e67e22;
}

.site-header__nav > a:hover::after,
.site-header__nav > .nav-dropdown:hover > .nav-dropdown__toggle::after {
  width: 100%;
}

/* --- Dropdown menu --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown__arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

.nav-dropdown:hover .nav-dropdown__arrow {
  transform: rotate(180deg);
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  z-index: 1001;
  margin-top: 12px;
}

.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-dropdown:hover .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-dropdown__menu a::after {
  display: none;
}

.nav-dropdown__menu a:hover {
  background: #fef5ec;
  color: #e67e22;
}

/* --- Phone --- */
.site-header__phone {
  font-size: 14px;
  font-weight: 600;
  color: #e67e22;
  text-decoration: none;
  margin-left: 24px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.site-header__phone:hover {
  color: #d35400;
}

/* --- Burger menu (mobile) --- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.burger__line {
  width: 24px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.burger.is-active .burger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.is-active .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.is-active .burger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile menu --- */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 999;
}

.mobile-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: #e67e22;
}

.mobile-menu__group-title {
  font-size: 12px;
  font-weight: 700;
  color: #e67e22;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 0 4px;
  border-bottom: none;
  cursor: default;
}

.mobile-menu__sub a {
  padding-left: 12px;
  font-size: 15px;
  border-bottom: 1px solid #f5f5f5;
}

/* --- Responsive: hide nav on mobile --- */
@media (max-width: 768px) {
  .site-header__nav {
    display: none;
  }

  .site-header__phone {
    display: none;
  }

  .burger {
    display: flex;
  }
}
