/* Heatmaster header: trust bar, sticky main bar, desktop dropdowns, mobile drawer, mobile action bar. */

/* --- Trust bar (desktop and tablet) --- */
.hm-topbar { background: var(--hm-green-900); color: rgba(250, 247, 240, 0.9); font-size: var(--hm-fs-xs); }
.hm-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: var(--hm-s-4); min-height: 2.5rem; }
.hm-topbar ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.hm-topbar li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hm-topbar svg { width: 0.95rem; height: 0.95rem; color: var(--hm-gold-500); }
.hm-topbar a { display: inline-flex; align-items: center; gap: 0.45rem; color: inherit; text-decoration: none; }
.hm-topbar a:hover { color: var(--hm-gold-300); }
.hm-topbar b { font-weight: 650; color: var(--hm-ivory); }
.hm-topbar__links { display: flex; gap: 1.4rem; }
.hm-topbar__links a { display: inline-flex; align-items: center; min-height: 2.5rem; font-weight: 550; }
.hm-topbar__links a[aria-current="page"] { color: var(--hm-gold-300); }
@media (max-width: 47.99rem) {
  .hm-topbar__in { justify-content: center; }
  .hm-topbar li:not(:first-child), .hm-topbar__links { display: none; }
}

/* --- Main bar --- */
.hm-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 240, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hm-line);
  transition: transform 0.3s var(--hm-ease), box-shadow 0.3s var(--hm-ease);
}
.hm-header.is-stuck { box-shadow: 0 6px 24px rgba(6, 35, 29, 0.08); }
.hm-header.is-hidden { transform: translateY(-101%); }
.hm-header__in { display: flex; align-items: center; gap: var(--hm-s-4); min-height: var(--hm-header-h); }
.hm-logo { display: block; flex: none; }
.hm-logo img { width: auto; height: 2.75rem; }
@media (max-width: 47.99rem) { :root { --hm-header-h: 4rem; } .hm-logo img { height: 2.35rem; } }

.hm-nav { margin-inline: auto; }
.hm-menu { display: flex; align-items: center; gap: 0.1rem; margin: 0; padding: 0; list-style: none; }
.hm-menu > li { position: relative; }
.hm-menu > li > :is(a, button) {
  display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2.75rem; padding: 0.4rem 0.6rem;
  border: 0; border-radius: var(--hm-r-sm); background: none; color: var(--hm-ink);
  font: 550 0.9375rem/1.2 var(--hm-font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.hm-menu > li > :is(a, button):hover, .hm-menu > li:focus-within > button, .hm-menu > li > [aria-current="page"] { color: var(--hm-green-600); background: var(--hm-green-50); }
.hm-menu > li > [aria-current="page"] { box-shadow: inset 0 -2px 0 var(--hm-gold-500); border-radius: var(--hm-r-sm) var(--hm-r-sm) 0 0; }
.hm-menu svg { flex: none; width: 0.9rem; height: 0.9rem; opacity: 0.75; transition: transform 0.2s var(--hm-ease); }
.hm-sub {
  position: absolute; left: 0; top: calc(100% + 0.35rem); z-index: 5; min-width: 17rem;
  margin: 0; padding: 0.5rem; list-style: none;
  background: var(--hm-white); border: 1px solid var(--hm-line); border-top: 2px solid var(--hm-gold-500); border-radius: 0 0 var(--hm-r-md) var(--hm-r-md);
  box-shadow: var(--hm-shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.18s var(--hm-ease), transform 0.18s var(--hm-ease), visibility 0.18s;
}
.hm-menu > li:hover > .hm-sub, .hm-menu > li:focus-within > .hm-sub, .hm-menu > li.is-open > .hm-sub { opacity: 1; visibility: visible; transform: none; }
.hm-menu > li:hover > button svg, .hm-menu > li.is-open > button svg { transform: rotate(180deg); }
.hm-sub a { display: block; padding: 0.7rem 0.8rem; border-radius: var(--hm-r-sm); color: var(--hm-ink); font-weight: 500; text-decoration: none; }
.hm-sub a:hover { background: var(--hm-green-50); color: var(--hm-green-700); }
.hm-sub small { display: block; margin-top: 0.1rem; color: var(--hm-ink-3); font-size: var(--hm-fs-xs); font-weight: 400; }

.hm-header__actions { display: flex; align-items: center; gap: var(--hm-s-3); margin-left: auto; }
.hm-phone { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--hm-green-800); text-decoration: none; line-height: 1.15; }
.hm-phone svg { flex: none; width: 1.15rem; height: 1.15rem; color: var(--hm-gold-700); align-self: flex-end; margin-bottom: 0.18rem; }
.hm-phone small { display: block; font-size: 0.75rem; color: var(--hm-ink-3); }
.hm-phone span { white-space: nowrap; }
.hm-phone b { display: block; font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.hm-iconbtn { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: var(--hm-green-800); color: var(--hm-ivory); cursor: pointer; }
.hm-iconbtn svg { width: 1.35rem; height: 1.35rem; }
.hm-burger { background: transparent; color: var(--hm-green-800); border: 1.5px solid var(--hm-line-2); border-radius: var(--hm-r-md); }
.hm-header__call, .hm-burger { display: none; }

/* Below 1248 px the full menu no longer fits: logo, call button and menu button only. */
@media (max-width: 77.99rem) {
  .hm-nav, .hm-phone, .hm-header__actions > .hm-btn { display: none; }
  .hm-header__call, .hm-burger { display: inline-grid; }
}

/* --- Mobile drawer (native <dialog>: focus stays inside, Esc closes) --- */
.hm-drawer {
  width: 100%; max-width: 26rem; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 0;
  border: 0; background: var(--hm-ivory); color: var(--hm-ink);
  box-shadow: -20px 0 60px rgba(6, 35, 29, 0.25);
}
.hm-drawer::backdrop { background: rgba(6, 35, 29, 0.55); }
.hm-drawer[open] { display: flex; flex-direction: column; animation: hm-drawer-in 0.28s var(--hm-ease); }
@keyframes hm-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.hm-drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem var(--hm-gutter); border-bottom: 1px solid var(--hm-line); }
.hm-drawer__top img { height: 2.25rem; width: auto; }
.hm-drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem var(--hm-gutter) 1rem; }
.hm-drawer__list { margin: 0; padding: 0; list-style: none; }
.hm-drawer__list > li { border-bottom: 1px solid var(--hm-line); }
.hm-drawer__list > li > a, .hm-drawer summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; padding: 0.5rem 0.25rem;
  color: var(--hm-green-800); font: 600 1.125rem/1.2 var(--hm-font-display); text-decoration: none; cursor: pointer; list-style: none;
}
.hm-drawer summary::-webkit-details-marker { display: none; }
.hm-drawer summary svg { width: 1.1rem; height: 1.1rem; color: var(--hm-gold-700); transition: transform 0.2s var(--hm-ease); }
.hm-drawer details[open] summary svg { transform: rotate(180deg); }
.hm-drawer details ul { margin: 0 0 0.75rem; padding: 0; list-style: none; }
.hm-drawer details a { display: flex; align-items: center; min-height: 3rem; padding: 0.4rem 0.9rem; border-left: 2px solid var(--hm-gold-300); color: var(--hm-ink); text-decoration: none; }
.hm-drawer__foot { display: grid; gap: 0.6rem; padding: 0.9rem var(--hm-gutter) calc(0.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--hm-line); background: var(--hm-white); }
.hm-drawer__facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; font-size: var(--hm-fs-xs); color: var(--hm-ink-2); }
.hm-drawer__facts li { display: inline-flex; align-items: center; gap: 0.35rem; }
.hm-drawer__facts svg { width: 0.9rem; height: 0.9rem; color: var(--hm-gold-700); }

/* --- Mobile action bar (thumb zone) --- */
.hm-actionbar { display: none; }
@media (max-width: 47.99rem) {
  body.has-actionbar { padding-bottom: calc(var(--hm-actionbar-h) + env(safe-area-inset-bottom)); }
  .hm-actionbar {
    position: fixed; inset: auto 0 0 0; z-index: 90;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--hm-line); box-shadow: 0 -8px 24px rgba(6, 35, 29, 0.1);
    transform: translateY(110%); transition: transform 0.3s var(--hm-ease);
  }
  .hm-actionbar.is-visible { transform: none; }
  .hm-actionbar a {
    display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 3.25rem;
    border-radius: var(--hm-r-md); border: 1.5px solid var(--hm-line-2); background: var(--hm-white); color: var(--hm-green-800);
    font: 650 0.9375rem/1 var(--hm-font-body); text-decoration: none;
  }
  .hm-actionbar svg { width: 1.2rem; height: 1.2rem; }
  .hm-actionbar a.is-call { background: var(--hm-green-800); border-color: var(--hm-green-800); color: var(--hm-ivory); }
  .hm-actionbar a.is-quote { background: var(--hm-orange-500); border-color: var(--hm-orange-500); color: var(--hm-green-950); }
}

/* Breadcrumbs */
.hm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin: 0 0 var(--hm-s-4); padding: 0; list-style: none; font-size: var(--hm-fs-xs); color: var(--hm-c-faint); }
.hm-crumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--hm-gold-600); }
.hm-crumbs a { color: inherit; text-decoration: none; }
.hm-crumbs a:hover { color: var(--hm-c-link); text-decoration: underline; }

/* Hidden while a quote form is in view, so the two never compete. */
@media (max-width: 47.99rem) { .hm-actionbar.is-covered { transform: translateY(110%); } }
