/* Site-wide header tweaks on top of the Elementor styles. */

/* Desktop: the header sits over the hero instead of pushing it down. The inner pages pulled
   their hero up with a fixed negative margin that was 25px short, which left a white strip
   above the header. */
@media (min-width: 1025px) {
  header.elementor-location-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
  }
  .site-main [data-elementor-id] > .e-con.e-parent:first-child {
    --margin-top: 0px !important;
    margin-top: 0 !important;
  }
}

/* Sticky nav bar. Everything (white background, shadow, dark menu text, slimmer logo) keys off
   the moment the bar pins to the top (.elementor-sticky--active) and uses one duration/curve,
   so the background and the logo change together. */
:root { --mm-header-ease: .35s cubic-bezier(.22, .61, .36, 1); }

.elementor-element-17e5ae5.background-container {
  transition: background-color var(--mm-header-ease), box-shadow var(--mm-header-ease), backdrop-filter var(--mm-header-ease) !important;
}
.elementor-element-17e5ae5.background-container.elementor-sticky--active {
  background-color: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 8px 28px rgba(20, 14, 10, .12);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
}
.background-container.elementor-sticky--active .menu-item a { color: black !important; }
.background-container.elementor-sticky--active .menu-item a:hover { color: #FF0000 !important; }

@media (min-width: 1025px) {
  .elementor-element-d5f79cc > .elementor-widget-container {
    transition: padding var(--mm-header-ease);
  }
  /* explicit starting width: the theme sized the logo through max-width, which can't animate
     and made the logo change late */
  .elementor-element-d5f79cc img {
    width: 100px;
    max-width: none !important;
    transition: width var(--mm-header-ease);
  }
  .elementor-sticky--active .elementor-element-d5f79cc > .elementor-widget-container {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  .elementor-sticky--active .elementor-element-d5f79cc img {
    width: 84px !important;
    height: auto !important;
  }
  .elementor-sticky--active .elementor-element-eb580ae {
    border-bottom-color: transparent !important;
  }
}

/* Desktop: header and page content share one width. They grow with the window up to 1200px
   and keep at least 56px of breathing room on each side; nothing sprawls on big screens.
   (The theme mixed % widths for the header with fixed widths for content.) */
@media (min-width: 1025px) {
  :root { --mm-frame: min(1200px, calc(100% - 112px)); }

  /* header: contact strip and the nav bar */
  .elementor-element-7817857 { --content-width: var(--mm-frame) !important; }
  .elementor-element-eb580ae { --width: var(--mm-frame) !important; }

  /* full-width content sections and the footer */
  .elementor-element-3c8788e, .elementor-element-b30dfc4, .elementor-element-2509a8b,
  .elementor-element-6ceffaa, .elementor-element-4e30628, .elementor-element-b5657b9,
  .elementor-element-757caa0, .elementor-element-a050887, .elementor-element-26fd75f,
  .elementor-element-c05ef0b, .elementor-element-1cd8615, .elementor-element-302f227,
  .elementor-element-d6bbc04, .elementor-element-f952665 {
    --content-width: var(--mm-frame) !important;
    /* the frame already leaves the side gutter; section padding would double it */
    --padding-left: 0px !important;
    --padding-right: 0px !important;
  }

  /* centered page titles and call-to-action blocks stay a bit narrower, in step with the frame */
  .elementor-element-4d3c05e, .elementor-element-f797189, .elementor-element-491f216,
  .elementor-element-3ea3fb6, .elementor-element-1dc5948 {
    --content-width: calc(var(--mm-frame) * .8) !important;
  }
  .elementor-element-10cab0d, .elementor-element-8b52d0e, .elementor-element-72d6449,
  .elementor-element-c06547a {
    --content-width: calc(var(--mm-frame) * .7) !important;
  }
}
