/* Secondary homepage action is mobile-only. */
.page-template-page_home .call-to-action .beitcom-mobile-services {
  display: none;
}

@media (max-width: 991.98px) {
  .page-template-page_home .call-to-action .p-button-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    direction: rtl;
  }

  .page-template-page_home .call-to-action .p-button-primary > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 10px 8px;
    margin: 0;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    text-align: center;
  }

  .page-template-page_home .call-to-action a.beitcom-mobile-services {
    color: #011f3f;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #011f3f;
    border-radius: 2px;
  }

  .page-template-page_home .call-to-action a.beitcom-mobile-services:hover {
    color: #fff;
    background: #011f3f;
  }

  .page-template-page_home .call-to-action .p-button-primary > a:focus-visible {
    outline: 3px solid #e8be4c;
    outline-offset: 3px;
  }

  /* Compact the complete message and let more of the mobile photograph show through. */
  body.page-template-page_home .call-to-action-wrapper {
    position: relative;
    top: 18px;
    background: linear-gradient(
      180deg,
      rgba(250, 249, 243, 0.72) 0%,
      rgba(250, 249, 243, 0.58) 100%
    );
  }

  body.page-template-page_home .call-to-action-wrapper > .col-md-5 {
    float: none;
    margin-right: auto;
    margin-left: auto;
  }

  body.page-template-page_home .call-to-action {
    margin-right: auto;
    margin-bottom: 18px;
    margin-left: auto;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  body.page-template-page_home .call-to-action h1.slogan {
    max-width: 100%;
    margin: 5px auto 6px;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.15;
  }

  body.page-template-page_home .call-to-action hr {
    margin: 0 0 7px;
  }

  body.page-template-page_home .call-to-action p.h6,
  body.page-template-page_home .call-to-action p.h5 {
    margin: 6px 0;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  body.page-template-page_home .call-to-action p.h5 {
    font-size: 15px !important;
  }

  body.page-template-page_home .call-to-action .p-button-primary {
    margin-bottom: 12px;
  }

  body.page-template-page_home .call-to-action .p-button-primary > a {
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 7px;
    text-shadow: none;
  }
}

/* Keep Bootstrap navigation visible when preview utility styles are injected. */
.page-template-page_home #primary-navbar.collapse {
  visibility: visible;
}

/* Desktop-only homepage refinement. Keep the existing mobile layout untouched. */
@media (min-width: 992px) {
  .page-template-page_home .bgtfw-cta.container {
    width: 100%;
    max-width: none;
  }

  /* Preserve the original 750px desktop banner footprint. */
  .page-template-page_home .bgtfw-cta .call-to-action-wrapper {
    position: relative;
    height: 750px;
  }

  .page-template-page_home .call-to-action-wrapper > .col-md-7 {
    display: none;
  }

  .page-template-page_home .call-to-action-wrapper > .col-md-5 {
    position: absolute;
    top: clamp(135px, 9vw, 180px);
    right: clamp(0px, calc(10vw - 128px), 80px);
    left: auto;
    width: min(560px, 39vw);
    padding: 0;
    float: none;
  }

  .page-template-page_home .call-to-action {
    position: relative;
    isolation: isolate;
    min-height: 0;
    padding: 24px;
    color: #011f3f;
  }

  /* Feathered ivory light, without an opaque box covering the coastline. */
  .page-template-page_home .call-to-action::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -48px -32px;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(250, 249, 243, 0.94) 0%, rgba(250, 249, 243, 0.86) 38%, rgba(250, 249, 243, 0.5) 60%, rgba(250, 249, 243, 0) 74%);
  }

  .page-template-page_home .call-to-action h1.slogan {
    margin: 24px 0 14px;
    color: #011f3f;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.5;
  }

  .page-template-page_home .call-to-action hr {
    margin: 0 0 20px;
    border-color: rgba(1, 31, 63, 0.45);
  }

  .page-template-page_home .call-to-action p.h6,
  .page-template-page_home .call-to-action p.h5 {
    margin: 0 0 16px;
    color: #011f3f;
    font-size: 18px !important;
    line-height: 1.65 !important;
  }

  .page-template-page_home .call-to-action p.h6 strong {
    font-weight: 400;
  }

  .page-template-page_home .call-to-action .p-button-primary {
    margin: 24px 0 0;
    text-align: center;
  }
}

