/* clever-header.css */

/* 1) Базовый контейнер: в потоке, без плашки */
.mh-header .clever-header-bar {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;

  width: 100% !important;
  max-width: 1080px !important;
  min-height: 100px !important;

  /* в потоке */
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;

  /* убираем отступы вокруг, чтобы WP-бар сразу шел дальше */
  margin: 20px auto 0 !important;

  /* убираем белую плашку и “стекло” */
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* padding как у основного контента*/
  padding: 0 20px !important;

  font-family: Geologica, system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  color: #344147 !important;

  z-index: 10 !important;
}

/* если тема добавляет clearfix через :before/:after - убираем влияние */
.mh-header .clever-header-bar::before,
.mh-header .clever-header-bar::after {
  content: none !important;
}

/* 2) Логотип слева */
.mh-header .clever-header-bar .clever-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  text-decoration: none !important;
  color: #9fd36e !important;
  font-weight: 700 !important;
  font-size: 36px !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.mh-header .clever-header-bar .clever-brand svg {
  width: 48px;
  height: 45px;
  flex: 0 0 auto;
}

/* 3) Меню по центру */
.mh-header .clever-header-bar .clever-nav {
  display: flex !important;
  align-items: center !important;
  gap: 56px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  color: rgba(52, 65, 71, 0.7) !important;
  font-size: 18px !important;
  line-height: 24px !important;
}

.mh-header .clever-header-bar .clever-nav > li {
  position: relative;
}

.mh-header .clever-header-bar .clever-nav a,
.mh-header .clever-header-bar .clever-nav button {
  background: transparent !important;
  border: 0 !important;
  padding: 8px 6px !important;
  margin: 0 !important;
  cursor: pointer;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mh-header .clever-header-bar .clever-nav a:hover,
.mh-header .clever-header-bar .clever-nav button:hover {
  color: #9fd36e !important;
}

/* маленькая стрелка у "Предмети" */
.mh-header .clever-header-bar .clever-nav .chev {
  font-size: 18px;
  opacity: 0.75;
  transform: translateY(1px);
}

/* 4) Правая кнопка "Зв’язатися" */
.mh-header .clever-header-bar .clever-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 150px;
}

.mh-header .clever-header-bar .clever-contact-btn {
  background: #9fd36e !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(159, 211, 110, 0.25);
}

.mh-header .clever-header-bar .clever-contact-btn:hover {
  opacity: 0.9;
}

/* 5) Общий стиль выпадашек (как на скрине: белый блок, скругление, тень) */
.mh-header .clever-header-bar .clever-dd {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: none;
  z-index: 10000;
}

/* показ */
.mh-header .clever-header-bar .clever-dd.is-open {
  display: block;
}

.mh-header .clever-header-bar .clever-dd a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: rgba(52, 65, 71, 0.75);
  text-decoration: none;
  font-size: 16px;
  line-height: 22px;
}

.mh-header .clever-header-bar .clever-dd a:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #344147;
}

/* 6) Выпадашка контактов справа должна раскрываться вправо и быть уже */
.mh-header .clever-header-bar .clever-actions {
  position: relative;
}

.mh-header .clever-header-bar .clever-actions .clever-dd {
  left: auto;
  right: 0;
  min-width: 240px;
  padding: 14px;
}

/* 7) Адаптив под узкие экраны: уменьшаем паддинги, прячем центр-меню */
@media (max-width: 1200px) {
  .mh-header .clever-header-bar {
    padding: 0 20px !important;
    margin: 20px 0 0 !important;
  }
  .mh-header .clever-header-bar .clever-nav {
    gap: 40px !important;
  }
}

@media (max-width: 900px) {
  .mh-header .clever-header-bar {
    width: 100% !important;
    min-height: 86px !important;
  }


  .mh-header .clever-header-bar .clever-brand {
    font-size: 28px !important;
  }
}


/* Анимация выпадашек, без изменения размеров и позиционирования */
.mh-header .clever-header-bar .clever-dd {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.mh-header .clever-header-bar .clever-dd.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s;
}

/* Поворот стрелки у "Предмети" */
.mh-header .clever-header-bar .clever-nav-link.is-open .chev {
  transform: translateY(1px) rotate(180deg);
}

/* Контакты: внешний вид как на главной, с оригинальными SVG */
.mh-header .clever-header-bar .clever-actions #contactMenu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mh-header .clever-header-bar .clever-actions #contactMenu .dropdown-item svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: block;
}

/* Мобильное выезжающее снизу меню хедера */

/* Десктоп (801px и шире): мобильные элементы не существуют визуально */
@media (min-width: 801px) {
  .mh-header .clever-header-bar .clever-mobile-toggle,
  .clever-mobile-panel {
    display: none !important;
  }
}

/* Мобилка (800px и уже) */
@media (max-width: 800px) {

  :root {
    --clever-mobile-gap: 30px; /* можно 12-16px если нужно меньше отступа от хедера */
  }

  /* показываем кнопку-точки */
  .mh-header .clever-header-bar .clever-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    line-height: 0;
  }

  .mh-header .clever-header-bar .clever-mobile-toggle svg {
    display: block;
  }

  /* прячем десктопные элементы на мобилке */
  .mh-header .clever-header-bar .clever-nav {
    display: none !important;
  }

  .mh-header .clever-header-bar .clever-actions {
    display: none !important;
  }

  /* панель */
  .clever-mobile-panel {
    position: fixed;
    left: 0;
    right: 0;

    top: calc(var(--clever-mobile-top, 70px) + var(--clever-mobile-gap));
    bottom: 0;

    background: #fff;
    z-index: 99999;

    /* панель как колонка на всю высоту (БЕЗ 100vh) */
    display: flex;
    flex-direction: column;

    /* важно для корректного расчета размеров */
    box-sizing: border-box;
    min-height: 0;

    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: transform 220ms ease, opacity 220ms ease, visibility 0s linear 220ms;

    /* safe-area снизу, чтобы кнопка не резалась на телефонах */
    padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.10);
  }

  .clever-mobile-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 220ms ease, opacity 220ms ease, visibility 0s linear 0s;
  }

  .clever-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 6px 0 10px;

    flex: 0 0 auto;
    min-height: 0;
  }

  .clever-mobile-link {
    text-decoration: none;
    font-size: 18px;
    line-height: 24px;
    color: rgba(52, 65, 71, 0.75);
  }

  .clever-mobile-link:hover {
    color: #344147;
  }

  /* контакты прижаты вниз */
  .clever-mobile-contacts {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;

    min-height: 0;
  }

  .clever-mobile-contact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #344147;
    font-size: 16px;
    line-height: 22px;
  }

  .clever-mobile-contact svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: block;
  }

  /* кнопка под контактами, тоже внизу */
  .clever-mobile-cta {
    flex: 0 0 auto;
    margin-top: 18px;

    width: 100%;
    height: 56px;
    border-radius: 12px;
    background: #9fd36e;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .clever-mobile-cta-icon {
    display: block;
  }

  /* блокировка скролла когда панель открыта */
  body.clever-no-scroll {
    overflow: hidden !important;
    touch-action: none;
  }
}




