/* =====================================================
   HEADER
===================================================== */
.site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Прозрачный хедер на главной */
body.home .site-header,
body.front-page .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
}

body.home .site-header .header-inner,
body.front-page .site-header .header-inner {
  background: transparent;
}

/* Синий хедер на остальных страницах */
body:not(.home):not(.front-page) .site-header {
  position: relative;
  background: #0a2a6b;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  gap: 24px;
  width: 100%;
  max-width: none;       
  margin: 0;
  padding: 0 40px;       
  box-sizing: border-box;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  
}

.site-branding img.custom-logo,
.site-branding img.header-logo {
  max-height: 80px;
  width: auto;
}

.site-branding .site-title,
.site-branding .header-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  max-width: 250px;
  letter-spacing: 0.04em;
  white-space: wrap;
}

.site-branding .site-title a,
.site-branding a.header-title {
  color: #ffffff;
}

/* ---------- Меню ---------- */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-navigation .menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-navigation .menu > li {
  position: relative;
}

.main-navigation .menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: color 0.2s ease;
}

/* Стрелка у пунктов с подменю */
.main-navigation .menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.9);
  margin-left: 2px;
  transition: transform 0.2s ease, border-top-color 0.2s ease;
}

.main-navigation .menu > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  border-top-color: #5b9cff;
}

/* Ховер — только цвет, без фона */
.main-navigation .menu > li > a:hover,
.main-navigation .menu > li.current-menu-item > a,
.main-navigation .menu > li.current-menu-ancestor > a {
  color: #5b9cff;
  background: transparent;
}

/* Подменю */
.main-navigation .menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  pointer-events: none;
}

.main-navigation .menu > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.main-navigation .menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
}

.main-navigation .menu .sub-menu li a:hover {
  color: #1e5bb8;
  background: transparent;
}

.main-navigation .menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

/* ---------- Поиск и языки ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search {
  position: relative;
}

.header-search input[type="search"] {
  width: 160px;
  height: 35px;
  padding: 0 16px 0 40px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a2e;
  font-size: 14px;
  outline: none;
}

.header-search input[type="search"]::placeholder {
  color: #888;
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.header-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}

/* Polylang выводит ul/li */
.header-lang ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-lang li {
  margin: 0;
  padding: 0;
}

.header-lang a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.65);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-lang a:hover {
  color: #ffffff;
}

/* Текущий язык */
.header-lang .current-lang a,
.header-lang a.active,
.header-lang li.current-lang > a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* Бургер */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}
