/* ==========================================================================
   business_header — fixed nav that starts transparent over the hero and turns
   solid on scroll. Mirrors the Firbeson brochure header.
   ========================================================================== */

.biz-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: background-color .3s ease, box-shadow .3s ease;
}

.biz-header--sticky {
  position: fixed;
}

/* Solid state — applied by header.js once the page is scrolled, and always for
   non-transparent headers. */
.biz-header.is-solid,
.biz-header:not(.biz-header--transparent) {
  background-color: rgba(0, 0, 0, .82);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}

.biz-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 1580px) {
  .biz-header__inner {
    max-width: 1480px;
  }
  /* .biz-header__inner { height: 80px; } */
}

/* Logo */
.biz-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.biz-header__logo img {
  height: clamp(28px, 1.25rem + 1vw, 36px);
  width: auto;
  display: block;
}
.biz-header__logo-text {
  color: #fff;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .04em;
}

/* Desktop menu */
.biz-header__menu {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  .biz-header__menu { display: flex; }
}
.biz-header__menu-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: #fff;
  text-decoration: none;
  font-size: .98rem;
  font-weight: 500;
  transition: color .25s ease;
}
.biz-header__menu-link:hover { color: var(--color-secondary, #0ea5e9); }

.biz-header__caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.has-submenu.is-open > .biz-header__menu-link .biz-header__caret { transform: rotate(180deg); }

/* ── Mega menu (desktop) ───────────────────────────────────────────────── */
/* Backdrop scrim shown behind the panel while a mega menu is open, like a
   modal — dims the hero/page content so the panel reads as the focus. */
.biz-mega-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s;
}
.biz-mega-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.biz-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  width: calc(100% - 3rem);
  max-width: 1100px;
  min-height: 300px;
  margin-top: -0.2rem;
  background: #F5F5F4;
  color: #1e293b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-mega.is-open .biz-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.biz-mega__inner {
  padding: 2rem;
}
.biz-mega__columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
}

.biz-mega__col-title {
  display: block;
  color: #0f172a;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  margin-bottom: .75rem;
}
.biz-mega__col-title:hover { color: var(--color-secondary, #0ea5e9); }
.biz-mega__col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.biz-mega__col-list a {
  color: #475569;
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s ease;
}
.biz-mega__col-list a:hover { color: var(--color-secondary, #0ea5e9); }

/* ── Dropdown menu (desktop, menu_style: dropdown) ──────────────────────── */
/* Anchored under its own item (not the full nav width like the mega panel),
   so this needs its own positioning context on the li. */
.biz-header__menu-item.has-dropdown { position: relative; }

.biz-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: .5rem;
  width: 280px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .18);
  padding: .5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 10;
}
.has-dropdown.is-open > .biz-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.biz-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.biz-dropdown__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.biz-dropdown__link {
  display: block;
  flex: 1;
  min-width: 0;
  padding: .6rem .85rem;
  color: #1e293b;
  text-decoration: none;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.biz-dropdown__link:hover,
.biz-dropdown__link:focus {
  background: #f1f5f9;
  color: var(--color-secondary, #0ea5e9);
}

/* Expand toggle — click-to-open accordion, same interaction as the mobile
   drawer, so nested levels stay readable instead of stacking side-flyouts. */
.biz-dropdown__toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border: 0;
  border-left: 1px solid #ccc;
}
.biz-dropdown__toggle:hover { background: #f1f5f9; color: var(--color-secondary, #0ea5e9); }
.biz-dropdown__caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.biz-dropdown__item.has-sub.is-expanded > .biz-dropdown__row .biz-dropdown__caret {
  transform: rotate(180deg);
}

.biz-dropdown__sub {
  max-height: 0;
  overflow: hidden;
  margin-left: .85rem;
  padding-left: .65rem;
  border-left: 1px solid #e2e8f0;
  transition: max-height .25s ease;
}
.biz-dropdown__item.has-sub.is-expanded > .biz-dropdown__sub {
  max-height: 1000px;
}
.biz-dropdown__sub .biz-dropdown__link {
  font-size: .88rem;
  color: #475569;
}

/* Mobile toggle */
.biz-header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.biz-header__toggle svg { width: 26px; height: 26px; }
@media (min-width: 768px) {
  .biz-header__toggle { display: none; }
}

/* Icon swap is keyed off aria-expanded (kept in sync by header.js) rather
   than each svg's own hidden state, so there's a single source of truth and
   the two icons can never both be visible at once. */
.biz-header__toggle-close { display: none; }
.biz-header__toggle[aria-expanded="true"] .biz-header__toggle-open { display: none; }
.biz-header__toggle[aria-expanded="true"] .biz-header__toggle-close { display: block; }

/* Mobile menu */
.biz-header__mobile {
  background-color: rgba(0, 0, 0, .95);
}
@media (min-width: 768px) {
  .biz-header__mobile { display: none !important; }
}
.biz-header__mobile-list {
  list-style: none;
  margin: 0;
  padding: .5rem;
}
.biz-header__mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.biz-header__mobile-link {
  display: block;
  flex: 1;
  padding: .75rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background-color .25s ease;
}
.biz-header__mobile-link:hover {
  color: var(--color-secondary, #0ea5e9);
  background-color: rgba(255, 255, 255, .1);
}

.biz-header__mobile-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-left: 1px solid #44403B;
}
.biz-header__mobile-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform .2s ease;
}
.biz-header__mobile-item.is-expanded > .biz-header__mobile-row .biz-header__mobile-toggle svg {
  transform: rotate(180deg);
}

.biz-header__mobile-sub {
  max-height: 0;
  overflow: hidden;
  padding-left: 1rem;
  transition: max-height .25s ease;
}
.biz-header__mobile-item.is-expanded > .biz-header__mobile-sub {
  max-height: 1000px;
}
.biz-header__mobile-sub .biz-header__mobile-link {
  font-weight: 400;
  font-size: .92rem;
}
