/* ==========================================================================
   Texium Solutions — CTA Banner widget
   A single full-width banner: dark gradient background with an optional
   dotted texture, heading + description on the left, pill button with
   an icon on the right. Stacks to one column on narrow viewports.
   Consumes design tokens from theme.css only.
   ========================================================================== */

.texium-cta-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(115deg, #0a1a4a 0%, #13309e 100%);
}

/* The background (gradient + dotted pattern) lives on its own layer,
   slightly oversized, so it can scale + blur on hover without smearing
   past the banner's rounded corners (clipped by overflow: hidden on the
   banner itself) or affecting the text/button layered above it. */

.texium-cta-banner::before {
  content: '';
  position: absolute;
  inset: -4%;
  z-index: -1;
  background: inherit;
  background-color: inherit;
  transform: scale(1);
  filter: blur(0);
  transition: transform var(--texium-transition-normal), filter var(--texium-transition-normal);
}

.texium-cta-banner:hover::before {
  transform: scale(1.08);
  filter: blur(6px);
}

@media (prefers-reduced-motion: reduce) {
  .texium-cta-banner::before {
    transition: none;
  }

  .texium-cta-banner:hover::before {
    transform: none;
    filter: none;
  }
}

/* .texium-pattern-dots::after (theme.css) draws the dotted texture;
   it needs to sit on the same scaling/blurring layer as the background
   (gradient, solid color, or uploaded image — whatever Elementor's
   Background control set on .texium-cta-banner itself), so it's drawn
   as a second ::before/::after pair stacked above the inherited
   background layer rather than replacing it. */

.texium-cta-banner.texium-pattern-dots::after {
  content: '';
  position: absolute;
  inset: -4%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--texium-dot-color, rgba(255, 255, 255, 0.18)) var(--texium-dot-size), transparent var(--texium-dot-size));
  background-size: var(--texium-dot-gap) var(--texium-dot-gap);
  background-position: 0 0;
  background-repeat: repeat;
  transform: scale(1);
  filter: blur(0);
  transition: transform var(--texium-transition-normal), filter var(--texium-transition-normal);
}

.texium-cta-banner.texium-pattern-dots:hover::after {
  transform: scale(1.08);
  filter: blur(6px);
}

@media (prefers-reduced-motion: reduce) {
  .texium-cta-banner.texium-pattern-dots::after {
    transition: none;
  }

  .texium-cta-banner.texium-pattern-dots:hover::after {
    transform: none;
    filter: none;
  }
}

.texium-cta-banner__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.texium-cta-banner__heading {
  margin: 0;
  font-family: var(--texium-font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: var(--texium-leading-tight);
  color: #fff;
}

.texium-cta-banner__description {
  margin: 0;
  font-size: var(--texium-font-size-md);
  line-height: var(--texium-leading-body);
  color: rgba(255, 255, 255, 0.75);
}

.texium-cta-banner__button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 14px 26px;
  font-size: var(--texium-font-size-sm);
  font-weight: var(--texium-weight-semibold);
  color: var(--texium-primary);
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: var(--texium-radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--texium-transition-fast), color var(--texium-transition-fast), transform var(--texium-transition-fast);
}

.texium-cta-banner__button:hover,
.texium-cta-banner__button:focus-visible {
  color: var(--texium-primary-dark);
  background-color: #f0f3fa;
  text-decoration: none;
}

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

.texium-cta-banner__button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  transition: transform var(--texium-transition-fast);
}

.texium-cta-banner__button-icon svg,
.texium-cta-banner__button-icon i {
  width: 1em;
  height: 1em;
  font-size: 1em;
}

.texium-cta-banner__button:hover .texium-cta-banner__button-icon,
.texium-cta-banner__button:focus-visible .texium-cta-banner__button-icon {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .texium-cta-banner__button,
  .texium-cta-banner__button-icon {
    transition: none;
  }
}

/* ---- Responsive ----
   Button drops below the text once there's no room to sit beside it on
   one line without crowding; alignment control stays in effect for the
   stacked state too (flex-start/center/flex-end maps to left/center/
   right on cross-axis when wrapped). */

@media (max-width: 782px) {
  .texium-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .texium-cta-banner__heading {
    font-size: 26px;
  }

  .texium-cta-banner__button {
    width: 100%;
    justify-content: center;
  }
}
