/* Contact CTA (templates/components/contact-cta.html.twig). Standalone:
   rounded image card with a colour gradient over it. */

/* Gradient colours (the `gradient` option) */
.contact-cta--pink {
  --contact-cta-color: var(--brand-pink);
}

.contact-cta--fuego {
  --contact-cta-color: var(--brand-fuego);
}

.contact-cta--amber-orange {
  --contact-cta-color: var(--brand-amber-orange);
}

.contact-cta--tangerine {
  --contact-cta-color: var(--brand-tangerine);
}

.contact-cta--midnight-blue {
  --contact-cta-color: var(--brand-midnight-blue);
}

.contact-cta--azure {
  --contact-cta-color: var(--brand-azure);
}

.contact-cta--cerulean-blue {
  --contact-cta-color: var(--brand-cerulean-blue);
}
/* End of gradient colours */

/* Mobile (default, gradient_position 'bottom'): image showing at the top,
   colour and content at the bottom. gradient_position 'top' flips it. */
.contact-cta {
  --contact-cta-direction: to top;
  --contact-cta-image-position: center center;
  --contact-cta-gradient-start: 40%;
  --contact-cta-gradient-end: 70%;
  --contact-cta-padding: 21.25rem 1.25rem 2.5rem;
}

.contact-cta--gradient-top {
  --contact-cta-direction: to bottom;
  --contact-cta-image-position: bottom center;
  --contact-cta-padding: 2.5rem 1.25rem 21.25rem;
}

.contact-cta__card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: 2rem;
  background: var(--contact-cta-color);
}

.contact-cta--gradient-top .contact-cta__card {
  align-items: flex-start;
}

/* Content at the top on mobile when gradient_position is 'top' */
.contact-cta--gradient-top .contact-cta__content {
  justify-content: flex-start;
}

.contact-cta__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--contact-cta-image-position);
  z-index: 1;
}

.contact-cta__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    var(--contact-cta-direction),
    var(--contact-cta-color) var(--contact-cta-gradient-start),
    transparent var(--contact-cta-gradient-end)
  );
  z-index: 2;
}

.contact-cta__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: var(--contact-cta-padding);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--brand-off-white);
  min-height: 800px;
  justify-content: flex-end;
}

.contact-cta .contact-cta__title {
  margin-bottom: 0;
}

.contact-cta .section-title__subtitle,
.contact-cta .section-title__heading,
.contact-cta .section-description {
  color: var(--brand-off-white);
}

.contact-cta .section-title__subtitle::before {
  background: var(--brand-off-white);
}

.contact-cta__content .section-description {
  font-size: 14px;
  max-width: unset;
}

/* Contact */
.contact-cta__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.contact-cta__contact p {
  margin-bottom: 0;
}

.contact-cta__contact-name {
  font-family: var(--font-ideal-sans-regular);
  font-weight: 400;
  font-size: 18px;
}

.contact-cta__contact-email,
.contact-cta__contact-email:hover {
  color: inherit;
  text-decoration: underline;
  width: fit-content;
  font-size: 18px;
  font-family: var(--font-ideal-sans-medium);
  font-weight: 500;
}

.contact-cta .contact-cta__button {
  margin-top: 0.5rem;
  font-size: 18px;
  padding: 1.25rem;
  align-content: center;
  min-height: unset;
}

.contact-cta .contact-cta__button.white {
  background: var(--brand-off-white);
}

.contact-cta .contact-cta__button.white:hover {
  background: var(--brand-cerulean-blue);
}

/* Compact variant (variant: 'compact'), used on the Livable Cities pages */
.contact-cta--compact .section-title__subtitle::before {
  background: var(--brand-cerulean-blue);
}

.contact-cta--compact .contact-cta__content {
  gap: 16px;
  color: #fff;
}

.contact-cta--compact .section-title__subtitle,
.contact-cta--compact .section-title__heading,
.contact-cta--compact .section-description {
  color: inherit;
}

.contact-cta--compact .section-title__subtitle::before {
  background: #fff;
}

.contact-cta--compact .contact-cta__contact {
  margin-top: 4px;
}

.contact-cta--compact .contact-cta__contact-name {
  font-family: var(--font-ideal-sans-medium);
  font-weight: 500;
  font-size: 1.125rem;
}

.contact-cta--compact .contact-cta__contact-role {
  font-size: 16px;
  margin-bottom: -4px;
}

.contact-cta--compact .contact-cta__contact-email,
.contact-cta--compact .contact-cta__contact-email:hover {
  font-family: var(--font-ideal-sans-regular);
  font-weight: 400;
  font-size: 16px;
  text-decoration: none;
}

.contact-cta--compact .contact-cta__button {
  font-size: 14px;
  padding: 1rem 1.25rem;
  margin-top: 0;
}

@media (min-width: 768px) {
  .contact-cta,
  .contact-cta--gradient-top {
    --contact-cta-direction: to right;
    --contact-cta-image-position: 75% center;
    --contact-cta-gradient-start: 20%;
    --contact-cta-gradient-end: 65%;
    --contact-cta-padding: 4rem;
  }

  .contact-cta__card,
  .contact-cta--gradient-top .contact-cta__card {
    align-items: center;
    border-radius: 3.75rem;
  }

  .contact-cta .contact-cta__title {
    max-width: 500px;
  }

  .contact-cta .contact-cta__button {
    width: fit-content;
    font-size: 18px;
  }

  .contact-cta__content .section-description,
  .contact-cta__contact-name,
  .contact-cta__contact-email,
  .contact-cta__contact-email:hover {
    font-size: 20px;
  }

  .contact-cta__content {
    min-height: unset;
    justify-content: flex-end;
  }

  .contact-cta--compact .contact-cta__contact-name {
    font-size: 1.125rem;
  }

  .contact-cta--compact .contact-cta__button {
    font-size: 14px;
  }

  .contact-cta--compact .contact-cta__content .section-description {
    font-size: 18px;
    max-width: 600px;
  }
}

/* 100px on all sides inside the card */
@media (min-width: 1080px) {
  .contact-cta,
  .contact-cta--gradient-top {
    --contact-cta-padding: 6.25rem;
  }

  .contact-cta--compact .contact-cta__content {
    --contact-cta-padding: 5rem;
  }

  .contact-cta .contact-cta__title {
    max-width: 712px;
  }
}

@media (min-width: 1600px) {
  .contact-cta,
  .contact-cta--gradient-top {
    --contact-cta-image-position: center right;
  }
}
