/* ============================================================
   Qera — CTA Banner Styles
   Configures full-width navy banners and floating brand SVGs.
   ============================================================ */

{% scope_css %}
.qera-cta-banner {
  background-color: var(--primitives-qera-blue-900); /* Premium deep navy */
  padding-block: var(--spacing-2xl);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.qera-cta-banner__wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2xl);
}

/* Positioned above the brand graphic (z-index 1). Side by side the two
   never met, but once the button stacks under the text the graphic
   reached up and was painted over the last lines of copy. */
.qera-cta-banner__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  flex: 1 1 auto;
  max-width: 680px;
}

/* White on navy by default; the Styles-tab heading and body colours
   arrive as --qera-heading-override / --qera-body-override. */
.qera-cta-banner__text {
  color: var(--qera-heading-override, var(--primitives-qera-white-0));
  font-family: var(--typography-family-primary);
  font-weight: var(--typography-weight-bold);
  font-size: var(--typography-size-h3);
  line-height: var(--typography-line-height-h3);
  margin: 0;
}

.qera-cta-banner__desc {
  color: var(--qera-body-override, var(--primitives-qera-blue-100));
  font-family: var(--typography-family-primary);
  font-size: var(--typography-size-body-reg);
  line-height: var(--typography-line-height-body);
  max-width: 58ch;
}

.qera-cta-banner__desc p {
  margin: 0;
}

.qera-cta-banner__desc p + p {
  margin-top: var(--spacing-xs);
}

.qera-cta-banner__desc a {
  color: var(--color-text-accent, var(--primitives-qera-orange-500));
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--motion-duration-fast) var(--motion-easing-enter);
}

.qera-cta-banner__desc a:hover {
  opacity: 0.85;
}

/* Action button area */
.qera-cta-banner__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl); /* Expands click-protection padding */
}

/* Wrapper ensuring HubSpot CTAs and custom buttons always render above SVG backdrop */
.qera-cta-banner__btn-wrap {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ensure HubSpot native CTA elements (wrapper, node, iframes) sit above z-index: 1 backdrop */
.qera-cta-banner__action .hs-cta-wrapper,
.qera-cta-banner__action .hs-cta-node,
.qera-cta-banner__action .hs-cta-node > a,
.qera-cta-banner__action iframe {
  position: relative !important;
  z-index: 3 !important;
}

/* Solid Qera orange button */
.qera-cta-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--color-action-primary-bg); /* brand orange */
  color: var(--primitives-qera-white-0);
  font-family: var(--typography-family-primary);
  font-weight: var(--typography-weight-bold);
  font-size: var(--typography-size-body-reg);
  border-radius: var(--radius-sm);
  transition: 
    background-color var(--motion-duration-fast) var(--motion-easing-enter),
    transform var(--motion-duration-fast) var(--motion-easing-enter),
    box-shadow var(--motion-duration-fast) var(--motion-easing-enter);
  text-align: center;
  white-space: nowrap;
  position: relative;
  z-index: 2; /* Sits cleanly above the SVG background */
  box-shadow: 0 4px 14px rgba(255, 127, 17, 0.2);
}

.qera-cta-banner__btn:hover {
  background-color: var(--primitives-qera-orange-500); /* slightly brighter orange */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 17, 0.35);
}

/* Absolutely positioned SVG brand backdrop graphic */
.qera-cta-banner__brand-asset {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px; /* Calibrated size to frame the CTA button beautifully */
  height: auto;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
  transition: transform var(--motion-duration-slow) var(--motion-easing-enter),
              opacity var(--motion-duration-slow) var(--motion-easing-enter);
}

.qera-cta-banner__action:hover .qera-cta-banner__brand-asset {
  transform: translate(-50%, -50%) scale(1.08) rotate(4deg);
  opacity: 1;
}

/* ---- Responsive Viewports ---- */

/* Stacked: text above the button, left aligned like the rest of the
   site. The button keeps its own width so the brand graphic behind it
   stays centred on the button rather than on the screen. */
@media (max-width: 991px) {
  .qera-cta-banner__wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-lg);
  }

  .qera-cta-banner__content {
    max-width: 100%;
  }

  .qera-cta-banner__text {
    max-width: 100%;
    font-size: var(--typography-size-body-lg);
    line-height: var(--typography-line-height-body-lg);
  }

  .qera-cta-banner__desc {
    max-width: 100%;
  }

  .qera-cta-banner__action {
    padding: var(--spacing-sm) 0;
  }
}

@media (max-width: 767px) {
  .qera-cta-banner {
    padding-block: var(--spacing-xl);
  }

  .qera-cta-banner__btn {
    white-space: normal; /* wrap text cleanly on small mobile phones */
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .qera-cta-banner__wrap {
    gap: var(--spacing-xl);
  }

  .qera-cta-banner__brand-asset {
    width: 160px; /* smaller on phones so it stays around the button */
  }
}
{% endscope_css %}
