/* Global responsive safety net loaded after all page-specific styles. */
html,
body,
#page,
#primary,
.site-main,
.bpi-header,
.bpi-footer,
.bpi-section {
  max-width: 100%;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

iframe,
video { height: auto; }

input,
select,
textarea,
button {
  max-width: 100%;
}

.bpi-container,
.container-xxl.bpi-container {
  width: min(calc(100% - 40px), var(--bpi-container));
  margin-inline: auto;
}

.bpi-grid-2,
.bpi-hero__grid,
.bpi-contact__grid,
.bpi-contact-main__grid,
.bpi-service-hero__grid,
.bpi-about-split,
.bpi-about-mission__grid,
.bpi-process__visual,
.bpi-cta-band__inner {
  min-width: 0;
}

.bpi-grid-2 > *,
.bpi-hero__grid > *,
.bpi-contact__grid > *,
.bpi-contact-main__grid > *,
.bpi-service-hero__grid > *,
.bpi-about-split > *,
.bpi-about-mission__grid > *,
.bpi-process__visual > *,
.bpi-cta-band__inner > * {
  min-width: 0;
}

.bpi-lead-form,
.bpi-contact-form-card,
.bpi-service-hero__form,
.bpi-hero__form-wrap {
  width: 100%;
  max-width: 100%;
}

.bpi-lead-form input,
.bpi-lead-form select,
.bpi-lead-form textarea,
.bpi-contact-form-card input,
.bpi-contact-form-card select,
.bpi-contact-form-card textarea {
  min-width: 0;
}

/* Prevent long CMS content, links or addresses from forcing horizontal scroll. */
.bpi-footer,
.bpi-legal-document,
.bpi-page-content,
.bpi-contact-page,
.bpi-service-template,
.bpi-about-page {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .bpi-section { padding-block: 78px; }

  .bpi-hero,
  .bpi-service-hero {
    min-height: auto;
  }

  .bpi-hero__grid,
  .bpi-service-hero__grid,
  .bpi-contact__grid,
  .bpi-contact-main__grid,
  .bpi-about-split,
  .bpi-about-mission__grid {
    grid-template-columns: 1fr;
  }

  .bpi-hero__form-wrap,
  .bpi-service-hero__form,
  .bpi-contact-form-card {
    max-width: 620px;
    margin-inline: 0;
  }
}

@media (max-width: 991px) {
  .bpi-container,
  .container-xxl.bpi-container {
    width: min(calc(100% - 34px), var(--bpi-container));
  }

  .bpi-section { padding-block: 68px; }

  .bpi-grid-2,
  .bpi-cta-band__inner {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .bpi-service-cards,
  .bpi-services-slider:not(.swiper-initialized) .swiper-wrapper,
  .bpi-testimonials__grid,
  .bpi-about-values__grid,
  .bpi-about-team__grid,
  .bpi-about-process__grid,
  .bpi-contact-why__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bpi-why__grid { grid-template-columns: 1fr; }

  .bpi-why-card:nth-child(5):last-child {
    grid-column: auto;
    max-width: none;
  }

  .bpi-cta-band__image img {
    margin: 0 auto -40px;
  }
}

@media (max-width: 767px) {
  .bpi-container,
  .container-xxl.bpi-container {
    width: min(calc(100% - 28px), var(--bpi-container));
  }

  .bpi-section { padding-block: 56px; }

  h1,
  .bpi-hero h1,
  .bpi-service-hero h1,
  .bpi-about-hero h1,
  .bpi-contact-hero h1,
  .bpi-legal-hero h1 {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .bpi-service-cards,
  .bpi-services-slider:not(.swiper-initialized) .swiper-wrapper,
  .bpi-testimonials__grid,
  .bpi-about-values__grid,
  .bpi-about-team__grid,
  .bpi-about-process__grid,
  .bpi-contact-why__grid,
  .bpi-contact-strips__inner,
  .bpi-books-slider:not(.swiper-initialized) > .swiper-wrapper {
    grid-template-columns: 1fr;
  }

  .bpi-form-row,
  .bpi-contact-form__row {
    grid-template-columns: 1fr;
  }

  .bpi-checkbox-grid,
  .bpi-lead-form--hero .bpi-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bpi-btn-group {
    width: 100%;
    gap: 12px;
  }

  .bpi-btn-group .bpi-btn {
    flex: 1 1 220px;
  }

  .bpi-process-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .bpi-process-num {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }

  .bpi-process-content {
    padding: 18px 16px 18px 28px;
    border-radius: 22px;
  }

  .bpi-service-floating-image::before,
  .bpi-service-floating-image::after,
  .bpi-split-image::before,
  .bpi-split-image::after {
    transform: scale(.72);
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 575px) {
  .bpi-container,
  .container-xxl.bpi-container {
    width: min(calc(100% - 24px), var(--bpi-container));
  }

  .bpi-section { padding-block: 48px; }

  .bpi-text-block h2,
  .bpi-services__head h2,
  .bpi-process__head h2,
  .bpi-offer h2,
  .bpi-testimonials__title,
  .bpi-faq__title,
  .bpi-contact h2,
  .bpi-about-section-head h2,
  .bpi-contact-head h2 {
    font-size: clamp(27px, 8vw, 34px);
    line-height: 1.16;
  }

  .bpi-btn,
  .bpi-btn-group .bpi-btn {
    width: 100%;
    flex-basis: 100%;
  }

  .bpi-checkbox-grid,
  .bpi-lead-form--hero .bpi-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .bpi-lead-form,
  .bpi-lead-form--hero,
  .bpi-contact-form-card {
    padding-inline: 16px;
  }

  .bpi-service-card,
  .bpi-why-card,
  .bpi-testimonial,
  .bpi-about-value-card,
  .bpi-about-process-step {
    padding-left: 20px;
    padding-right: 20px;
  }

  .bpi-faq-question {
    padding-inline: 14px;
    font-size: 14px;
  }

  .bpi-faq-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}

@media (max-width: 390px) {
  .bpi-container,
  .container-xxl.bpi-container {
    width: min(calc(100% - 20px), var(--bpi-container));
  }

  .bpi-process-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bpi-process-num {
    width: 54px;
    height: 54px;
    font-size: 26px;
  }

  .bpi-process-content {
    padding: 18px;
  }
}

/* ==========================================================
   Global CTA band refresh
   Applies to the homepage and every service page using
   .bpi-cta-band. Keeps the section compact, readable and
   visually balanced at every breakpoint.
   ========================================================== */
.bpi-cta-band {
  position: relative;
  margin-top: 0;
  min-height: 0;
  padding: clamp(64px, 5.5vw, 84px) 0;
  display: flex;
  align-items: center;
  isolation: isolate;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 -1px 0 rgba(0,0,0,.08);
}

.bpi-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    100deg,
    rgba(22, 75, 139, .96) 0%,
    rgba(31, 98, 180, .91) 52%,
    rgba(40, 111, 196, .78) 100%
  );
}

.bpi-cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: clamp(42px, 6vw, 92px);
  align-items: center;
}

.bpi-cta-band__inner > div:first-child {
  width: 100%;
  max-width: 650px;
}

.bpi-cta-band h2 {
  max-width: 620px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 3vw, 48px);
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.bpi-cta-band p {
  max-width: 620px;
  margin: 0;
  color: rgba(255,255,255,.94);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.72;
}

.bpi-cta-band .bpi-btn-group {
  margin-top: 26px;
}

.bpi-cta-band .bpi-btn {
  min-height: 46px;
  box-shadow: 0 10px 24px rgba(8, 24, 43, .18);
}

.bpi-cta-band__image {
  min-width: 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  overflow: visible;
}

.bpi-cta-band__image img {
  position: relative;
  display: block;
  width: min(100%, 440px);
  max-width: 440px;
  height: auto;
  max-height: 340px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 22px 24px rgba(8, 26, 48, .24));
}

@media (max-width: 991px) {
  .bpi-cta-band {
    padding: 60px 0 62px;
    text-align: center;
    background-size: cover;
  }

  .bpi-cta-band__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .bpi-cta-band__inner > div:first-child,
  .bpi-cta-band h2,
  .bpi-cta-band p {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .bpi-cta-band .bpi-btn-group {
    justify-content: center;
  }

  .bpi-cta-band__image {
    min-height: 0;
    padding: 2px 0 0;
  }

  .bpi-cta-band__image img {
    width: min(72vw, 340px);
    max-width: 340px;
    max-height: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .bpi-cta-band {
    padding: 50px 0 52px;
  }

  .bpi-cta-band__inner {
    gap: 26px;
  }

  .bpi-cta-band h2 {
    font-size: clamp(28px, 7.5vw, 34px);
    line-height: 1.12;
    margin-bottom: 15px;
  }

  .bpi-cta-band p {
    font-size: 15px;
    line-height: 1.65;
  }

  .bpi-cta-band .bpi-btn-group {
    margin-top: 22px;
  }

  .bpi-cta-band__image img {
    width: min(76vw, 290px);
    max-width: 290px;
    max-height: 245px;
  }
}

@media (max-width: 480px) {
  .bpi-cta-band {
    padding: 44px 0 46px;
  }

  .bpi-cta-band__inner {
    gap: 22px;
  }

  .bpi-cta-band__image img {
    width: min(78vw, 250px);
    max-width: 250px;
    max-height: 215px;
  }
}

/* ==========================================================
   CTA desktop layout: full content width + right-aligned image
   ========================================================== */
@media (min-width: 992px) {
  .bpi-cta-band__inner {
    width: min(calc(100% - 40px), var(--bpi-container));
    max-width: var(--bpi-container);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(40px, 5vw, 80px);
  }

  .bpi-cta-band__inner > div:first-child {
    flex: 1 1 auto;
    width: auto;
    max-width: 820px;
  }

  .bpi-cta-band h2 {
    max-width: 760px;
  }

  .bpi-cta-band p {
    max-width: 760px;
  }

  .bpi-cta-band__image {
    flex: 0 0 auto;
    width: min(34vw, 420px);
    margin-left: auto;
    justify-content: flex-end;
  }

  .bpi-cta-band__image img {
    width: min(100%, 390px);
    max-width: 390px;
    max-height: 310px;
    margin: 0 0 0 auto;
  }
}
