/**
 * Block: call-to-action-band variants
 */

.tidal-wave-cta-band__panel {
  overflow-x: clip;
  box-sizing: border-box;
  max-width: var(--wp--style--global--wide-size, 1240px);
}

/*
 * Desktop (homepage band): left = title + description + button;
 * right = compact trust-badge stack. Centered as one group so they stay
 * close together on wide screens instead of spreading to the edges.
 */
.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) {
  --wp--style--block-gap: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3rem);
  width: 100%;
  max-width: min(100%, 52rem);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
  text-align: left;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > * {
  margin-block: 0 !important;
  min-width: 0;
  max-width: 100%;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__main {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--tidal-wave-block-gap);
  width: auto;
  max-width: min(100%, 275px);
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__main > * {
  margin-block: 0 !important;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__copy {
  width: 100%;
  max-width: 100%;
  text-align: left;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__action {
  width: auto;
  max-width: 100%;
  margin: 0;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .wp-block-html,
.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .tidal-wave-trust-badges,
.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .wp-block-group.tidal-wave-trust-badges {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
}

.tidal-wave-cta-band__action.wp-block-buttons {
  width: auto;
  max-width: 100%;
  margin-block: 0 !important;
}

.tidal-wave-cta-band__action .wp-block-button {
  width: auto;
  max-width: 100%;
}

/*
 * Shared stacked CTA (homepage / HIW / Contact / FAQ / About):
 * title → subtitle uses --tidal-wave-title-support-gap;
 * copy → button uses the global --tidal-wave-copy-action-gap.
 */
.tidal-wave-cta-band__layout--house {
  --wp--style--block-gap: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--tidal-wave-copy-action-gap);
  width: 100%;
  text-align: left;
}

.tidal-wave-cta-band__layout--house > * {
  margin-block: 0 !important;
  min-width: 0;
  max-width: 100%;
}

.tidal-wave-cta-band__illus {
  flex-shrink: 0;
}

.tidal-wave-cta-band__illus img,
.tidal-wave-cta-band__illus .tidal-wave-media-placeholder {
  display: block;
  width: min(12rem, 28vw);
  height: auto;
}

.tidal-wave-cta-band__title {
  margin: 0;
  font-size: var(--tidal-wave-section-title-size);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wp--preset--color--surface);
  line-height: 1.15;
}

.tidal-wave-cta-band__title .tidal-wave-headline__accent {
  color: var(--wp--preset--color--accent);
}

.tidal-wave-cta-band__subtitle {
  margin: 0;
  color: var(--wp--preset--color--surface-soft);
  font-size: var(--tidal-wave-body-size);
  line-height: 1.6;
}

/* Soft-measure stack, centered as a unit; copy + button stay left-aligned. */
.tidal-wave-cta-band__layout--house .tidal-wave-cta-band__copy {
  --wp--style--block-gap: 0;
  flex: 0 1 auto;
  width: 100%;
  max-width: min(100%, 32rem);
  margin-inline: auto;
  text-align: left;
}

.tidal-wave-cta-band__layout--house .tidal-wave-cta-band__copy > * {
  margin-block-start: 0 !important;
}

.tidal-wave-cta-band__layout--house .tidal-wave-cta-band__subtitle {
  margin-block-start: 0 !important;
}

.tidal-wave-cta-band__layout--house .tidal-wave-cta-band__action {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: min(100%, 32rem);
  margin: 0 auto !important;
}

.tidal-wave-trust-badges,
.wp-block-group.tidal-wave-trust-badges {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
  width: auto;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

.tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-trust-badges {
  /* Keep the three badges as a tight stack — never stretch to fill the left column. */
  justify-content: flex-start;
  align-self: center;
}

.tidal-wave-trust-badges__item,
.wp-block-group.tidal-wave-trust-badges__item {
  --wp--style--block-gap: 0;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  /* Same tight icon → title spacing as title → support site-wide. */
  gap: var(--tidal-wave-title-support-gap);
  /* Wide enough for uppercase titles like “SATISFACTION” / “GUARANTEED” on their own lines. */
  width: 12rem;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.tidal-wave-trust-badges__item > *,
.wp-block-group.tidal-wave-trust-badges__item > * {
  margin-block: 0 !important;
}

.tidal-wave-trust-badges__icon,
.wp-block-image.tidal-wave-trust-badges__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  max-width: 50px;
  max-height: 50px;
  margin: 0 !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--wp--preset--color--accent);
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}

.tidal-wave-trust-badges__icon img,
.tidal-wave-trust-badges__icon .tidal-wave-media-placeholder,
.tidal-wave-trust-badges__icon .tidal-wave-theme-icon,
.wp-block-image.tidal-wave-trust-badges__icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tidal-wave-trust-badges__copy,
.wp-block-group.tidal-wave-trust-badges__copy {
  --wp--style--block-gap: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tidal-wave-title-support-gap);
  width: 100%;
  margin: 0 !important;
  /* Keep room for the longest single title word; never shrink into mid-word breaks. */
  min-width: 8.75rem;
}

.tidal-wave-trust-badges__copy > *,
.wp-block-group.tidal-wave-trust-badges__copy > * {
  margin-block: 0 !important;
}

.tidal-wave-trust-badges__label,
.tidal-wave-trust-badges__label strong,
p.tidal-wave-trust-badges__label {
  display: block;
  margin: 0;
  color: var(--wp--preset--color--surface);
  /* Match .tidal-wave-step__title */
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.tidal-wave-trust-badges__desc,
p.tidal-wave-trust-badges__desc {
  display: block;
  margin: 0;
  color: var(--wp--preset--color--surface-soft);
  /* Match .tidal-wave-step__body */
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.tidal-wave-cta-band__action .wp-block-button__link,
.tidal-wave-cta-band__action .tidal-wave-button {
  white-space: nowrap;
  text-align: center;
  width: auto;
  max-width: none;
  line-height: 1.25;
  box-sizing: border-box;
}

@media (max-width: 781px) {
  .tidal-wave-cta-band__layout,
  .tidal-wave-cta-band__layout--house,
  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: 100%;
    gap: var(--tidal-wave-copy-action-gap);
  }

  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) {
    text-align: center;
  }

  .tidal-wave-cta-band__layout--house {
    text-align: left;
  }

  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--tidal-wave-copy-action-gap);
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
  }

  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__copy {
    display: grid;
    justify-items: center;
    gap: 0;
    flex: none;
    min-width: 0;
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    text-align: center;
  }

  .tidal-wave-cta-band__layout--house .tidal-wave-cta-band__copy {
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    margin-inline: auto;
    text-align: left;
  }

  .tidal-wave-cta-band__layout--house .tidal-wave-cta-band__action {
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    margin-inline: auto;
    justify-content: flex-start;
  }

  /* Same section title + body scale as Pricing / process / site-wide tokens */
  .tidal-wave-cta-band__title {
    margin: 0;
    font-size: var(--tidal-wave-section-title-size);
    letter-spacing: 0.05em;
    line-height: 1.15;
  }

  .tidal-wave-cta-band__subtitle {
    margin: 0;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    font-size: var(--tidal-wave-body-size);
    line-height: 1.6;
  }

  .tidal-wave-cta-band__layout > .wp-block-html,
  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .wp-block-html,
  .tidal-wave-cta-band__layout > .tidal-wave-trust-badges,
  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .tidal-wave-trust-badges,
  .tidal-wave-cta-band__layout > .wp-block-group.tidal-wave-trust-badges,
  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) > .wp-block-group.tidal-wave-trust-badges {
    flex: none;
    width: 100%;
    justify-content: center;
    align-self: auto;
  }

  .tidal-wave-trust-badges,
  .wp-block-group.tidal-wave-trust-badges {
    flex-direction: column;
    align-items: center;
    gap: var(--tidal-wave-block-gap);
    width: 100%;
  }

  /*
   * Icon + title + body stack — same structure/sizes as
   * .tidal-wave-step / .tidal-wave-feature-card on mobile.
   */
  .tidal-wave-trust-badges__item,
  .wp-block-group.tidal-wave-trust-badges__item {
    display: grid;
    justify-items: center;
    align-items: start;
    gap: var(--tidal-wave-title-support-gap);
    flex: none;
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    min-width: 0;
    text-align: center;
  }

  .tidal-wave-trust-badges__icon,
  .wp-block-image.tidal-wave-trust-badges__icon {
    width: 50px;
    height: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
  }

  .tidal-wave-trust-badges__icon img,
  .tidal-wave-trust-badges__icon .tidal-wave-media-placeholder,
  .tidal-wave-trust-badges__icon .tidal-wave-theme-icon,
  .wp-block-image.tidal-wave-trust-badges__icon img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .tidal-wave-trust-badges__copy,
  .wp-block-group.tidal-wave-trust-badges__copy {
    align-items: center;
    gap: var(--tidal-wave-title-support-gap);
    width: 100%;
    max-width: 18rem;
    min-width: 0;
  }

  .tidal-wave-cta-band__layout:not(.tidal-wave-cta-band__layout--house) .tidal-wave-cta-band__action {
    display: flex;
    justify-content: center;
    width: auto;
    max-width: 100%;
    margin-left: 0;
  }

  .tidal-wave-cta-band__layout--house .tidal-wave-cta-band__action {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: min(100%, var(--tidal-wave-measure-sm));
    margin-inline: auto;
  }

  .tidal-wave-cta-band__action .wp-block-button,
  .tidal-wave-cta-band__action .wp-block-button__link {
    width: auto;
    max-width: none;
    white-space: nowrap;
  }
}
