/* ==========================================================================
   B West Builders — Header & Footer (Astra header/footer builder)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header: transparent, absolutely positioned over the hero
   -------------------------------------------------------------------------- */
.site-header#masthead {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--bw-motion-instant) var(--bw-ease),
              box-shadow var(--bw-motion-instant) var(--bw-ease);
}
.site-header#masthead .ast-primary-header-bar,
.site-header#masthead .main-header-bar,
.site-header#masthead .site-primary-header-wrap { background: transparent; border: 0; }

.site-header#masthead .ast-container,
.site-header#masthead .ast-builder-grid-row-container-inner > .ast-builder-grid-row {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--bw-space-4);
}

/* Solid state once the page scrolls */
body.bw-header-solid .site-header#masthead {
  position: fixed;
  background: var(--bw-surface-base);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Pages with no dark hero to sit over: keep the header in flow and solid */
body.bw-no-hero .site-header#masthead {
  position: static;
  background: var(--bw-surface-base);
}
body.bw-no-hero.bw-header-solid .site-header#masthead { position: sticky; top: 0; }
body.bw-no-hero .site-content { padding-top: var(--bw-space-8); }

/* Brand lockup */
.bw-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--bw-space-2);
  font-family: var(--bw-font);
  font-size: var(--bw-fs-xl);
  font-weight: var(--bw-fw-bold);
  color: var(--bw-text-inverse);
  line-height: 1.2;
  text-decoration: none;
}
.bw-brand:hover, .bw-brand:focus { color: var(--bw-text-inverse); }
.bw-brand--footer, .bw-brand--footer:hover, .bw-brand--footer:focus { color: var(--bw-text-primary); }
.ast-header-html-1 .ast-builder-html-element { line-height: 1; }

/* --------------------------------------------------------------------------
   Primary navigation
   -------------------------------------------------------------------------- */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item > .ast-menu-toggle {
  color: var(--bw-text-inverse);
  font-family: var(--bw-font);
  font-size: var(--bw-fs-md);
  font-weight: var(--bw-fw-base);
}
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: color var(--bw-motion-instant) var(--bw-ease),
              border-color var(--bw-motion-instant) var(--bw-ease);
}
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:hover,
.ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-ancestor > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item[aria-current="page"] > .menu-link {
  color: var(--bw-border);
  border-bottom-color: var(--bw-border);
}

/* Sub-menus */
.ast-builder-menu-1 .main-header-menu .sub-menu {
  min-width: 240px;
  background: var(--bw-surface-page);
  border: 0;
  border-radius: var(--bw-radius-xs);
  box-shadow: var(--bw-shadow-card);
  padding: var(--bw-space-2);
  overflow: hidden;
}
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link {
  color: var(--bw-text-primary);
  font-size: var(--bw-fs-md);
  padding: var(--bw-space-2);
  border-radius: var(--bw-radius-xs);
  border: 0;
}
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link:hover,
.ast-builder-menu-1 .main-header-menu .sub-menu .menu-link:focus-visible {
  background: #f4f1e8;
  color: var(--bw-text-primary);
}

/* Header CTA button */
.ast-builder-button-wrap .ast-custom-button {
  font-family: var(--bw-font);
  font-size: var(--bw-fs-md);
  font-weight: var(--bw-fw-medium);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--bw-radius-pill);
  white-space: nowrap;
}

/* Mobile trigger */
.ast-mobile-menu-trigger-fill,
.ast-mobile-menu-trigger-minimal { color: var(--bw-text-inverse); background: transparent; min-width: 44px; min-height: 44px; }

/* Off-canvas drawer */
#ast-mobile-popup .ast-mobile-popup-inner { background: var(--bw-surface-base); }
#ast-mobile-popup .menu-link { color: var(--bw-text-inverse); font-family: var(--bw-font); font-size: var(--bw-fs-md); }
#ast-mobile-popup .sub-menu { background: var(--bw-surface-strong); }
#ast-mobile-popup .ast-custom-button { width: 100%; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bw-surface-page);
  border-top: 1px solid var(--bw-border);
}
.site-primary-footer-wrap { padding-block: var(--bw-space-8) var(--bw-space-6); }
.site-primary-footer-wrap .ast-builder-grid-row,
.site-below-footer-wrap .ast-builder-grid-row {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--bw-space-4);
}
.site-primary-footer-wrap .ast-builder-grid-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--bw-space-6);
  align-items: start;
}
@media (max-width: 800px) {
  .site-primary-footer-wrap .ast-builder-grid-row { grid-template-columns: 1fr; }
}

.bw-footer-brand { display: flex; flex-direction: column; gap: var(--bw-space-3); }
.bw-footer-contact { display: flex; gap: var(--bw-space-2); font-size: var(--bw-fs-sm); color: var(--bw-text-secondary); line-height: 1.5; }
.bw-footer-contact strong { color: var(--bw-text-primary); }
.bw-footer-contact a { color: var(--bw-text-secondary); }
.bw-footer-contact a:hover { color: var(--bw-accent); }
.bw-footer-social { display: flex; gap: var(--bw-space-2); margin-top: var(--bw-space-2); }
.bw-footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bw-accent); color: var(--bw-text-inverse);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background var(--bw-motion-instant) var(--bw-ease);
}
.bw-footer-social a:hover { background: var(--bw-surface-strong); color: var(--bw-text-inverse); }

.site-footer .widget-title,
.site-footer .widgettitle {
  font-family: var(--bw-font);
  font-size: var(--bw-fs-md);
  font-weight: var(--bw-fw-bold);
  color: var(--bw-text-primary);
  margin-bottom: var(--bw-space-3);
  text-transform: none;
  letter-spacing: 0;
}
.site-footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget_nav_menu li { margin-bottom: var(--bw-space-2); }
.site-footer .widget_nav_menu a {
  font-size: var(--bw-fs-sm);
  color: var(--bw-text-secondary);
  text-decoration: none;
}
.site-footer .widget_nav_menu a:hover,
.site-footer .widget_nav_menu .current-menu-item > a { color: var(--bw-accent); }

.site-below-footer-wrap {
  border-top: 1px solid var(--bw-border);
  padding-block: var(--bw-space-4);
  margin-top: var(--bw-space-7);
  background: var(--bw-surface-page);
}
.site-below-footer-wrap .ast-footer-copyright,
.site-below-footer-wrap .ast-footer-copyright p {
  font-size: var(--bw-fs-xs);
  color: var(--bw-text-secondary);
  margin: 0;
}
.site-below-footer-wrap .ast-footer-copyright a { color: var(--bw-text-secondary); }
.site-below-footer-wrap .ast-footer-copyright a:hover { text-decoration: underline; color: var(--bw-accent); }

/* --------------------------------------------------------------------------
   Back to top (Astra scroll-to-top)
   -------------------------------------------------------------------------- */
#ast-scroll-top {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bw-surface-strong);
  color: var(--bw-text-inverse);
  box-shadow: var(--bw-shadow-card);
  display: flex; align-items: center; justify-content: center;
  transition: filter var(--bw-motion-instant) var(--bw-ease);
}
#ast-scroll-top:hover { filter: brightness(0.85); background: var(--bw-surface-strong); }
