/* ── Шапка Древесник24 ──────────────────────────────────────────────────── */

.drv-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.drv-header__container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 70px;
}

/* Бренд ----------------------------------------------------------------- */

.drv-header__brand {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.drv-header__brand .custom-logo {
  height: 52px;
  width: auto;
  display: block;
}

.drv-header__brand-text {
  display: flex;
  flex-direction: column;
}

.drv-header__brand-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}

.drv-header__brand-desc {
  font-size: 12px;
  opacity: 0.65;
  line-height: 1.3;
}

/* Навигация — всегда видима, без мобильного переключения ---------------- */

.drv-header #site-navigation,
.drv-header .drv-header__nav {
  display: flex !important;
  flex: 1;
  flex-direction: row !important;
  align-items: center;
  min-width: 0;
  /* сброс стилей GeneratePress */
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Скрываем блоки мобильной панели внутри nav */
.drv-header #site-navigation .mobile-logo,
.drv-header #site-navigation .mobile-contact-form,
.drv-header #site-navigation .mobile-menu-contacts,
.drv-header .mobile-menu-toggle,
.drv-header .mobile-menu-overlay {
  display: none !important;
}

.drv-header .main-menu {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.drv-header .main-menu > .menu-item {
  position: relative;
}

.drv-header .main-menu > .menu-item > a {
  display: flex !important;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.drv-header .main-menu > .menu-item > a:hover,
.drv-header .main-menu > .menu-item.current-menu-item > a,
.drv-header .main-menu > .menu-item.current-menu-ancestor > a {
  background: rgba(0, 0, 0, 0.07);
}

/* Стрелка у пунктов с подменю */
.drv-header .main-menu > .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.5;
  margin-left: 2px;
}

/* Подменю */
.drv-header .main-menu .sub-menu {
  display: none;
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 210px;
  list-style: none;
  padding: 6px;
  margin: 0;
  z-index: 200;
}

.drv-header .main-menu > .menu-item:hover > .sub-menu,
.drv-header .main-menu > .menu-item.sfHover > .sub-menu {
  display: block;
}

.drv-header .main-menu .sub-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s;
}

.drv-header .main-menu .sub-menu a:hover {
  background: rgba(0, 0, 0, .05);
}

/* Первый пункт меню — кнопка с цветом из CSS-переменной темы ----------- */

.drv-header #menu-glavnoe-menyu > li:first-child > a {
  background: var(--ui-accent) !important;
  color: #fff !important;
  border-radius: var(--ui_radius_mini, 8px);
  padding: 0 12px;
  line-height: 36px;
  height: 36px;
  font-weight: 600;
}

.drv-header #menu-glavnoe-menyu > li:first-child:hover > a {
  background: var(--ui-accent-2) !important;
}

/* Действия (мессенджеры, кнопки) --------------------------------------- */

.drv-header__actions {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.drv-header__messengers {
  display: flex;
  gap: 8px;
}

.drv-header__cta {
  display: flex;
  gap: 8px;
}
