.pl-glass-header,
.pl-glass-header * {
  box-sizing: border-box;
}

.pl-glass-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 900;
  width: calc(100% - 28px);
  max-width: var(--wrap); /* один токен на шапку, підвал і контент */
  transform: translateX(-50%);
  font-family: Inter, Arial, sans-serif;
}

.pl-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  padding: 10px 12px 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(246, 243, 234, 0.72);
  box-shadow: 0 18px 60px rgba(16, 30, 22, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.pl-logo {
  display: inline-flex;
  align-items: center;
  min-width: 156px;
  color: #173325;
  text-decoration: none;
}

.pl-logo img {
  display: block;
  width: auto;
  max-width: 176px;
  height: 48px;
  object-fit: contain;
}

.pl-logo-fallback {
  color: #173325;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pl-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.pl-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  color: rgba(23, 51, 37, 0.78);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s ease;
}

.pl-nav a:hover {
  background: rgba(23, 51, 37, 0.08);
  color: #173325;
  transform: translateY(-1px);
}

.pl-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pl-location {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #173325;
  line-height: 1.05;
  white-space: nowrap;
}

.pl-location strong {
  font-size: 13px;
  font-weight: 900;
}

.pl-location span {
  color: rgba(23, 51, 37, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.pl-phone,
.pl-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s ease;
}

.pl-phone {
  border: 1px solid rgba(23, 51, 37, 0.16);
  background: rgba(255, 255, 255, 0.48);
  color: #173325;
}

.pl-cta {
  background: #173325;
  color: #f6f3ea;
  box-shadow: 0 12px 28px rgba(23, 51, 37, 0.22);
}

.pl-phone:hover,
.pl-cta:hover {
  transform: translateY(-1px);
}

.pl-cta:hover {
  background: #244936;
  box-shadow: 0 16px 36px rgba(23, 51, 37, 0.3);
}

.pl-burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #173325;
  cursor: pointer;
  flex: 0 0 auto;
}

.pl-burger span {
  position: absolute;
  left: 13px;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #f6f3ea;
  transition: 0.2s ease;
}

.pl-burger span:first-child {
  top: 18px;
}

.pl-burger span:last-child {
  top: 26px;
}

.pl-glass-header.is-open .pl-burger span:first-child {
  top: 22px;
  transform: rotate(45deg);
}

.pl-glass-header.is-open .pl-burger span:last-child {
  top: 22px;
  transform: rotate(-45deg);
}

.pl-mobile-menu {
  display: none;
}

@media (max-width: 1180px) {
  .pl-header-inner {
    gap: 14px;
  }

  .pl-location {
    display: none;
  }

  .pl-nav a {
    padding: 0 10px;
    font-size: 13px;
  }

  .pl-logo {
    min-width: 140px;
  }

  .pl-phone,
  .pl-cta {
    padding: 0 14px;
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .pl-glass-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .pl-header-inner {
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 8px 8px 8px 14px;
    border-radius: 26px;
  }

  .pl-nav,
  .pl-location,
  .pl-header-actions > .pl-cta {
    display: none;
  }

  .pl-header-actions {
    gap: 8px;
  }

  .pl-header-actions > .pl-phone {
    display: inline-flex;
    min-height: 42px;
    padding: 0 13px;
    font-size: 0;
  }

  .pl-header-actions > .pl-phone::before {
    content: "☎";
    font-size: 17px;
    line-height: 1;
  }

  .pl-burger {
    display: inline-flex;
    width: 42px;
    height: 42px;
  }

  .pl-burger span {
    left: 11px;
  }

  .pl-burger span:first-child {
    top: 16px;
  }

  .pl-burger span:last-child {
    top: 24px;
  }

  .pl-logo {
    min-width: 0;
    max-width: calc(100vw - 132px);
  }

  .pl-logo img {
    max-width: 152px;
    height: 40px;
  }

  /* Розкриття через max-height, яку виставляє header.js за реальною
     висотою вмісту: анімація grid-template-rows не працює в Safari
     до 16.4 і Firefox до 116. */
  .pl-mobile-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 26px;
    background: rgba(246, 243, 234, 0.94);
    box-shadow: 0 18px 60px rgba(16, 30, 22, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: max-height 0.28s ease;
  }

  .pl-mobile-content {
    min-height: 0;
  }

  .pl-mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(23, 51, 37, 0.08);
    color: #173325;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
  }

  .pl-mobile-bottom {
    padding: 14px;
  }

  .pl-mobile-bottom .pl-phone,
  .pl-mobile-bottom .pl-cta {
    display: flex;
    width: 100%;
    min-height: 48px;
    margin-bottom: 10px;
    font-size: 14px;
  }

  .pl-mobile-bottom .pl-phone::before {
    content: none;
  }

  .pl-mobile-bottom p {
    margin: 10px 0 0;
    color: rgba(23, 51, 37, 0.68);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .pl-glass-header {
    top: 8px;
    width: calc(100% - 16px);
  }

  .pl-header-inner {
    min-height: 58px;
    padding: 7px 7px 7px 12px;
    border-radius: 22px;
  }

  .pl-logo img {
    max-width: 132px;
    height: 36px;
  }

  .pl-logo-fallback {
    font-size: 15px;
  }

  .pl-header-actions > .pl-phone,
  .pl-burger {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .pl-mobile-menu {
    border-radius: 22px;
  }

  .pl-mobile-menu a {
    min-height: 50px;
    font-size: 15px;
  }
}
/* =========================
 MOBILE HEADER PATCH
 докинь ниже текущего кода
========================= */

.pl-burger,
.pl-burger:hover,
.pl-burger:focus,
.pl-burger:active {
  background: #173325 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* делаем линии бургера нормально по центру */
.pl-burger {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pl-burger span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 18px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: #f6f3ea !important;
  transform-origin: center !important;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease !important;
}

.pl-burger span:first-child {
  transform: translate(-50%, -6px) !important;
}

.pl-burger span:last-child {
  transform: translate(-50%, 6px) !important;
}

/* открытое состояние — красивый крестик */
.pl-glass-header.is-open .pl-burger,
.pl-glass-header.is-open .pl-burger:hover,
.pl-glass-header.is-open .pl-burger:focus,
.pl-glass-header.is-open .pl-burger:active {
  background: #173325 !important;
}

.pl-glass-header.is-open .pl-burger span:first-child {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.pl-glass-header.is-open .pl-burger span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

/* чтобы не вылезал жёлтый цвет от темы/браузера */
.pl-burger::before,
.pl-burger::after {
  display: none !important;
}

/* =========================
 FIX: убрать линию под хедером,
 когда мобильное меню закрыто
========================= */

@media (max-width: 1024px) {
  /* закрите меню — під хедером не має лишатися ні лінії, ні тіні */
  .pl-glass-header:not(.is-open) .pl-mobile-menu {
    max-height: 0;
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* відкрите — звичайна картка меню (max-height ставить header.js) */
  .pl-glass-header.is-open .pl-mobile-menu {
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 22px;
    background: rgba(246, 243, 234, 0.97);
    box-shadow: 0 18px 60px rgba(16, 30, 22, 0.16);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow-y: auto;
  }

  }
/* =========================
 FIX BURGER: desktop hide + нормальные 3 полоски
========================= */

/* На десктопе бургер и мобильное меню НЕ показываем */
@media (min-width: 1025px) {
  .pl-glass-header .pl-burger {
    display: none !important;
  }

  .pl-glass-header .pl-mobile-menu {
    display: none !important;
  }
}

/* На мобилке/планшете показываем */
@media (max-width: 1024px) {
  .pl-glass-header .pl-burger {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #173325 !important;
    box-shadow: none !important;
    cursor: pointer !important;
  }

  /* убираем старую кривую геометрию */
  .pl-glass-header .pl-burger span,
  .pl-glass-header .pl-burger::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 18px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: #f6f3ea !important;
    transform-origin: center !important;
    transition:
      transform 0.22s ease,
      opacity 0.22s ease !important;
  }

  /* 3 нормальные полоски */
  .pl-glass-header .pl-burger span:first-child {
    transform: translate(-50%, -7px) !important;
  }

  .pl-glass-header .pl-burger::before {
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
  }

  .pl-glass-header .pl-burger span:last-child {
    transform: translate(-50%, 5px) !important;
  }

  .pl-glass-header .pl-burger::after {
    display: none !important;
    content: none !important;
  }

  /* открытое состояние: аккуратный крестик по центру */
  .pl-glass-header.is-open .pl-burger {
    background: #173325 !important;
  }

  .pl-glass-header.is-open .pl-burger span:first-child {
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  .pl-glass-header.is-open .pl-burger::before {
    opacity: 0 !important;
  }

  .pl-glass-header.is-open .pl-burger span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }
}

/* На совсем маленьких телефонах чуть компактнее */
@media (max-width: 480px) {
  .pl-glass-header .pl-burger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  .pl-glass-header .pl-burger span,
  .pl-glass-header .pl-burger::before {
    width: 17px !important;
  }
}

/* мобильная кнопка телефона сверху — иконка трубки */
@media (max-width: 767px) {
  .pl-header-actions > .pl-phone {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.48) !important;
    border: 1px solid rgba(23, 51, 37, 0.16) !important;
    color: #173325 !important;
    box-shadow: none !important;
  }

  .pl-header-actions > .pl-phone::before {
    content: "" !important;
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173325' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.35 1.77.68 2.6a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.48-1.25a2 2 0 0 1 2.11-.45c.83.33 1.7.56 2.6.68A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") !important;
  }

  /* мобильный дропдаун */
  .pl-mobile-menu {
    background: rgba(246, 243, 234, 0.97) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  .pl-mobile-menu a {
    color: #2b4738 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }

  .pl-mobile-menu a:hover,
  .pl-mobile-menu a:focus,
  .pl-mobile-menu a:active {
    color: #173325 !important;
    background: rgba(23, 51, 37, 0.04) !important;
  }

  /* кнопка "Залишити заявку" внутри мобильного меню */
  .pl-mobile-bottom .pl-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    background: #173325 !important;
    color: #f6f3ea !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    text-indent: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .pl-mobile-bottom .pl-cta:hover,
  .pl-mobile-bottom .pl-cta:focus,
  .pl-mobile-bottom .pl-cta:active {
    background: #1f4331 !important;
    color: #f6f3ea !important;
  }

  .pl-mobile-bottom .pl-phone {
    color: #173325 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  .pl-mobile-bottom p {
    color: rgba(23, 51, 37, 0.68) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }
}

/* ═══════════ ДЕКОР: божа корівка по орбіті ═══════════ */
HEADER LADYBUG ORBIT
========================= */

/* убираем старую коровку в хедере, если ты добавлял прошлый вариант через ::after */
.pl-glass-header .pl-header-inner::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.pl-glass-header .pl-header-inner {
  position: relative !important;
  overflow: visible !important;
}

.pl-header-ladybug-orbit {
  position: absolute !important;
  left: 0;
  top: 0;
  z-index: 50 !important;
  width: 34px !important;
  height: 34px !important;
  pointer-events: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  filter: drop-shadow(0 5px 7px rgba(16, 30, 22, 0.16));
  will-change: transform;
}

@media (max-width: 767px) {
  .pl-header-ladybug-orbit {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-header-ladybug-orbit {
    display: none !important;
  }
}

/* ═════════════════ Випадний список послуг ═════════════════
   Будується з типу записів «Послуги», тому новий пункт зʼявляється
   в шапці сам. На десктопі розкривається наведенням і фокусом
   (щоб працювала клавіатура), на мобільному — кнопкою-шевроном. */
.pl-has-sub {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pl-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(23, 51, 37, 0.7);
  cursor: pointer;
}

.pl-sub-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.pl-sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 290px;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  background: rgba(246, 243, 234, 0.97);
  box-shadow: 0 18px 50px rgba(16, 30, 22, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

.pl-nav .pl-sub a {
  display: block;
  min-height: 0;
  padding: 9px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.pl-nav .pl-sub a:hover {
  transform: none;
}

.pl-sub-all {
  margin-top: 4px;
  border-top: 1px solid rgba(23, 51, 37, 0.12);
  color: #173325 !important;
  font-weight: 800 !important;
}

/* розкриття на десктопі */
.pl-nav .pl-has-sub:hover .pl-sub,
.pl-nav .pl-has-sub:focus-within .pl-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pl-nav .pl-has-sub:hover .pl-sub-btn svg,
.pl-nav .pl-has-sub:focus-within .pl-sub-btn svg {
  transform: rotate(180deg);
}

/* ── мобільне меню: список розкривається кнопкою ── */
.pl-mobile-menu .pl-has-sub {
  display: block;
}

.pl-mobile-menu .pl-has-sub > a {
  padding-right: 58px;
}

.pl-mobile-menu .pl-sub-btn {
  position: absolute;
  top: 0;
  right: 8px;
  width: 52px;
  height: 52px;
  margin: 0;
}

.pl-mobile-menu .pl-sub-btn svg {
  width: 18px;
  height: 18px;
}

.pl-mobile-menu .pl-sub {
  position: static;
  min-width: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(23, 51, 37, 0.04);
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transform: none;
  transition: max-height 0.25s ease;
}

.pl-mobile-menu .pl-has-sub.is-open .pl-sub {
  max-height: 900px;
}

.pl-mobile-menu .pl-has-sub.is-open .pl-sub-btn svg {
  transform: rotate(180deg);
}

.pl-mobile-menu .pl-sub a {
  min-height: 46px;
  padding-left: 34px;
  font-size: 14px;
  font-weight: 600;
}

/* Меню з семи пунктів не вміщалось у свою колонку грід-шапки: колонка
   має min-width: 0, тому останній пункт просто виїжджав на блок
   контактів праворуч. Відступи фіксовані, а не в vw: відколи шапка
   обмежена --wrap, вона не росте разом з екраном, і прив'язка до
   ширини вікна лише збільшувала пункти там, де місця не додалось. */
@media (min-width: 1181px) {
  /* 7px, а не 9: після сужения --wrap до 1100 колонка меню дає 554px
     при потрібних 534 — запас 20px з'їдається першим же відхиленням
     у метриках Montserrat. З 7px меню займає ~506px, запас ~48px. */
  .pl-nav a {
    padding: 0 7px;
    font-size: 13px;
  }

  .pl-nav .pl-sub-btn {
    margin-left: -2px;
  }

  /* Телефон і кнопка теж трохи компактніші: запас у смузі потрібен на
     випадок, коли Montserrat вже завантажився — він ширший за запасний
     системний шрифт, і саме на ньому меню й наїжджало на контакти. */
  .pl-header-actions > .pl-phone,
  .pl-header-actions > .pl-cta {
    padding: 0 15px;
    font-size: 13.5px;
  }
}

/* Між 1025 і 1180 шапка вже вузька, але бургера ще немає: семи пунктів
   меню разом із телефоном і кнопкою тут не вистачає місця. Телефон —
   те, чим жертвуємо: він лишається в мобільному меню, у футері та на
   сторінці контактів, а кнопка заявки важливіша. */
@media (min-width: 1025px) and (max-width: 1180px) {
  .pl-header-actions > .pl-phone {
    display: none;
  }
}

/* Адреса з шапки прибрана зовсім. Шапка тепер фіксованої ширини (--wrap,
   1100), і сім пунктів меню разом з телефоном та кнопкою займають її
   повністю — 109px під адресу взяти нема звідки. Адреса лишається
   у футері та на сторінці контактів. */
.pl-location {
  display: none;
}
