/**
 * CTA Banner Widget Styles
 * Compact banner version matching full CTA aesthetic
 */

.cta-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(242, 183, 19, 0.1);
}

/* Subtle background decorative elements */
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  inset-inline-end: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(242, 183, 19, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  inset-inline-start: -5%;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(242, 183, 19, 0.06) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner-constrained {
  max-width: 700px;
  margin-inline: auto;
}

.cta-banner-container {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 24px;
}

.cta-banner-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 2;
}

.cta-banner-text-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: start;
}

.cta-banner-heading {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* Hide initially - GSAP will show it */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-banner-heading-gradient {
  display: inline-block;
  background: linear-gradient(
    to right,
    var(--cta-banner-primary-color, #f2b713),
    #ffffff,
    var(--cta-banner-primary-color, #f2b713)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: ctaBannerGradientShift 3s ease-in-out infinite;
}

@keyframes ctaBannerGradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.cta-banner-description {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.5;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  /* Hide initially - GSAP will show it */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px);
  flex-shrink: 1;
}

/* Button wrapper for glow effect */
.cta-banner-button-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

/* Support for multiple buttons (blog single page) */
.cta-banner-button-wrapper[style*='display: flex'] {
  display: flex !important;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.cta-banner-button-secondary {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  padding: 16px 32px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
}

.cta-banner-button-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Glow effect on individual buttons */
.cta-banner-button::before {
  content: '';
  position: absolute;
  inset: -4px;
  background-color: var(--cta-banner-primary-color, #f2b713);
  filter: blur(20px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  pointer-events: none;
}

.cta-banner-button:hover::before,
.cta-banner-button.is-hovered::before {
  opacity: 0.5;
  animation: ctaBannerButtonGlow 2s ease-in-out infinite;
}

/* Secondary button glow (lighter) */
.cta-banner-button-secondary::before {
  background-color: rgba(255, 255, 255, 0.3);
}

.cta-banner-button-secondary:hover::before,
.cta-banner-button-secondary.is-hovered::before {
  opacity: 0.3;
}

/* Remove glow effect from blog CTA buttons */
.cta-banner-blog .cta-banner-button::before {
  display: none;
}

.cta-banner-blog .cta-banner-button-secondary::before {
  display: none;
}

@keyframes ctaBannerButtonGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.cta-banner-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-weight: 700;
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  border-radius: 8px;
  background-color: var(--cta-banner-primary-color, #f2b713);
  color: var(--cta-banner-bg-color, #1e1d1b);
  /* Hide initially - GSAP will show it */
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  /* Overflow hidden for white overlay animation */
  overflow: hidden;
  z-index: 1;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.cta-banner-button-overlay {
  position: absolute;
  inset: 0;
  background-color: #ffffff;
  z-index: 2;
  /* GSAP will handle the animation */
}

.cta-banner-button-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cta-banner-button-arrow {
  flex-shrink: 0;
  animation: ctaBannerArrowPulse 1.5s ease-in-out infinite;
}

@keyframes ctaBannerArrowPulse {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  .cta-banner-container {
    padding-inline: 20px;
  }

  .cta-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .cta-banner-text-content {
    width: 100%;
    text-align: start;
  }

  .cta-banner-heading {
    font-size: 24px !important;
    white-space: normal;
  }

  .cta-banner-description {
    font-size: 14px !important;
  }

  .cta-banner-button-wrapper {
    width: 100%;
  }

  .cta-banner-button {
    width: 100%;
    justify-content: center;
    padding: 12px 0px;
    font-size: 14px !important;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  .cta-banner-content {
    gap: 18px;
  }
}
