/* Base wrapper styles */
.call-to-action-wrapper {
  position: relative;
  max-height: 600px;
  display: flex;
  width: 100%;
  height: 100%;
  /* margin: 32px 8px; */
  margin: 0px !important;
}

.layout-builder__section .call-to-action-wrapper {
  height: auto !important;
  padding: 1.5em !important;
  box-sizing: border-box;
}

/* Background styling with theme variables */
.call-to-action__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  border-radius: 4px;
  background: var(--card-bg);
}

/* Color variants */
.call-to-action.green {
  --card-bg: var(--green-4);
  --text-color: var(--green-1);
  --cta-bg: var(--green-1) !important;
  --cta-bg-hover: var(--green-2);
  --cta-text: var(--green-4) !important;
}

.call-to-action.blue {
  --card-bg: var(--blue-4);
  --text-color: var(--blue-4);
  --cta-bg: var(--blue-1) !important;
  --cta-bg-hover: var(--blue-2) !important;
  --cta-text: var(--blue-4) !important;
}

.call-to-action.brown {
  --card-bg: var(--brown-4);
  --text-color: var(--brown-1);
  --cta-bg: var(--brown-1) !important;
  --cta-text: var(--brown-4);
  --cta-bg-hover: var(--brown-2) !important;
}

.call-to-action.gold {
  --card-bg: var(--gold-4);
  --text-color: var(--gold-1) !important;
  --cta-bg: var(--gold-2);
  --cta-bg-hover: var(--gold-3);
}

.call-to-action.gray {
  --card-bg: var(--gray-8);
  --text-color: var(--gray-1);
  --cta-bg: var(--gray-1);
  --cta-text: var(--white);
  --cta-bg-hover: var(--gray-3);
}

.call-to-action.default {
  --card-bg: var(--site-quaternary);
  --text-color: var(--site-primary);
  --cta-bg: var(--site-secondary);
  --cta-bg-hover: var(--site-tertiary);
  --cta-text: var(--white);
}

/* Info section */
.call-to-action {
  display: flex;
  flex-wrap: wrap;
}

.call-to-action__info {
  padding: 24px;
  justify-content: space-between;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  color: var(--text-color);
  margin: 0 auto;
}

/* Responsive adjustments */
@media screen and (max-width: 767px) {
  .call-to-action__info-inner {
    width: 100%;
    padding: 30px;
  }
}

.call-to-action__info-headline {
  text-align: center;
  margin-bottom: 12px;
}

.call-to-action__info-headline h2 {
  line-height: 28px;
}

.call-to-action__info .call-to-action__info-headline h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
}

.call-to-action__info .call-to-action__info-text {
  font-size: 14px;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--text-color);
  text-align: center;
}
.call-to-action__info .call-to-action__info-text p {
  margin-top: 0;
}

/* CTA button with hover effect */
.call-to-action__info-cta div a {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-text);
  padding: 10px 20px;
  transition: background 150ms;
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
}

.call-to-action__info-cta {
  margin-top: auto;
}

.call-to-action__info-cta div a:after {
  display: none;
}

.call-to-action__info-cta a:hover {
  background: var(--cta-bg-hover) !important;
}
