/**
 * CTA Shape Banner — front-end styles
 */

.cta-sb {
  --cta-sb-left: #1e4db7;
  --cta-sb-right: #f5a623;
  --cta-sb-text: #ffffff;
  --cta-sb-btn-text: #ffffff;
  --cta-sb-btn-border: rgba(255, 255, 255, 0.85);
  --cta-sb-btn-bg: transparent;
  --cta-sb-radius: 18px;
  --cta-sb-min-height: 150px;
  --cta-sb-shape-width: 38%;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--cta-sb-min-height);
  padding: 1.75rem 2.5rem;
  overflow: hidden;
  border-radius: var(--cta-sb-radius);
  background-color: var(--cta-sb-left);
  color: var(--cta-sb-text);
  box-sizing: border-box;
  isolation: isolate;
}

.cta-sb *,
.cta-sb *::before,
.cta-sb *::after {
  box-sizing: border-box;
}

/* Decorative right-side shape */
.cta-sb__shape {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--cta-sb-shape-width);
  background-color: var(--cta-sb-right);
  pointer-events: none;
}

/* Circle / arc — convex curve into the left panel; right edge stays solid */
.cta-sb--circle .cta-sb__shape {
  width: calc(var(--cta-sb-shape-width) + 18%);
  right: 0;
  border-radius: 0;
  transform: none;
  clip-path: ellipse(95% 80% at 100% 50%);
}

/* Rectangle — straight vertical split */
.cta-sb--rectangle .cta-sb__shape {
  border-radius: 0;
}

/* Box — inset rounded block on the right */
.cta-sb--box {
  background-color: var(--cta-sb-left);
}

.cta-sb--box .cta-sb__shape {
  top: 12%;
  bottom: 12%;
  right: 1.25rem;
  width: calc(var(--cta-sb-shape-width) - 4%);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Content layers above the shape */
.cta-sb__content,
.cta-sb__action {
  position: relative;
  z-index: 1;
}

.cta-sb__content {
  flex: 1 1 auto;
  max-width: 58%;
  min-width: 0;
}

.cta-sb__heading {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--cta-sb-text);
  white-space: pre-line;
}

.cta-sb__action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--cta-sb-shape-width);
  min-width: 9rem;
}

.cta-sb--box .cta-sb__action {
  width: calc(var(--cta-sb-shape-width) - 2%);
  margin-right: 0.5rem;
}

.cta-sb__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid var(--cta-sb-btn-border);
  border-radius: 6px;
  background: var(--cta-sb-btn-bg);
  color: var(--cta-sb-btn-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cta-sb__button:hover,
.cta-sb__button:focus {
  background: rgba(255, 255, 255, 0.14);
  color: var(--cta-sb-btn-text);
  text-decoration: none;
  outline: none;
}

.cta-sb__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.cta-sb__button--filled {
  background: var(--cta-sb-btn-bg, #ffffff);
  border-color: transparent;
}

.cta-sb__button--filled:hover,
.cta-sb__button--filled:focus {
  filter: brightness(0.95);
  background: var(--cta-sb-btn-bg, #ffffff);
}

/* Alignment helpers */
.cta-sb--align-center {
  text-align: center;
}

.cta-sb--align-center .cta-sb__content {
  max-width: none;
}

.cta-sb--align-right {
  text-align: right;
}

/* Responsive */
@media (max-width: 767px) {
  .cta-sb {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem 1.35rem 1.75rem;
    min-height: 0;
    text-align: center;
  }

  .cta-sb__content {
    max-width: none;
  }

  .cta-sb__heading {
    font-size: 1.35rem;
  }

  .cta-sb__shape {
    width: 100% !important;
    height: 42%;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
  }

  .cta-sb--circle .cta-sb__shape {
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    height: 48%;
  }

  .cta-sb--rectangle .cta-sb__shape {
    border-radius: 0;
    height: 40%;
  }

  .cta-sb--box .cta-sb__shape {
    top: auto;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto !important;
    height: 38%;
    border-radius: 12px;
  }

  .cta-sb__action {
    width: auto;
    min-width: 0;
    margin: 0;
    padding-top: 2.5rem;
  }

  .cta-sb--box .cta-sb__action {
    width: auto;
    margin-right: 0;
  }
}
