.footer-section {
  display: flex;
  flex-direction: column;
}

/* footer top section */
.footer-top-section {
  background-image: url("../images/footer-cta-background.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  height: 100%;
  overflow: hidden;
  padding-top: 120px;
  position: relative;
  @media (max-width: 768px) {
    padding-top: 90px;
  }
  @media (max-width: 449px) {
    padding-top: 80px;
  }
}

.footer-top-section .section-description p {
  color: var(--black);
}

.footer-top-section .section-title {
  font: var(--heading-h2);
  color: var(--black);
  margin: 0;
  letter-spacing: -1.88px;
  @media (max-width: 991px) {
    letter-spacing: -1.2px;
  }
  @media (max-width: 449px) {
    letter-spacing: -1.02px;
  }
}

.footer-cta-button {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0;
  @media (max-width: 768px) {
    margin: 32px 0 48px;
  }
  @media (max-width: 449px) {
    margin: 32px 0 40px;
  }
}

/* Inner radius = outer radius - padding, so the corners stay concentric */
.footer-desktop-image {
  display: flex;
  @media (max-width: 991px) {
    display: none;
  }
}

.footer-mobile-image {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 14px;

  @media (max-width: 991px) {
    display: flex;
    border-radius: 6px;
  }
  @media (max-width: 449px) {
    border-radius: 4px;
  }
}

.footer-blur {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 87px;
  pointer-events: none;
  @media (max-width: 768px) {
    display: none;
  }
}

/* Blur layer */
.footer-blur::before {
  content: "";
  position: absolute;
  inset: 0;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.6) 40%,
    black 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.6) 40%,
    black 100%
  );
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

/* footer bottom section */
.footer-bottom-section {
  background: var(--warm-beige);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  color: #fff;
  margin-top: -22px;
  position: relative;
  z-index: 1;
  @media (max-width: 449px) {
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
  }
}

.footer-section-wrapper {
  padding: 80px 0 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  @media (max-width: 1279px) {
    padding: 40px 0 0;
    gap: 32px;
  }
  @media (max-width: 449px) {
    padding: 48px 0 0;
  }
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  @media (max-width: 767px) {
    gap: 24px;
    flex-wrap: wrap;
  }
}

.footer-social {
  display: flex;
  gap: 24px;
  @media (max-width: 1024px) {
    gap: 20px;
  }
}

.footer-social a {
  display: flex;
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  @media (max-width: 1024px) {
    width: 16px;
    height: 16px;
  }
}

.footer-social a svg path {
  fill: var(--black);
  transition: fill 0.3s ease-in-out;
}

.footer-social a:hover svg path {
  fill: var(--grey);
}

/* Links */
.footer-links {
  display: flex;
  width: 100%;
  justify-content: space-between;
  @media (max-width: 449px) {
    display: block;
    padding: 0;
  }
}

.footer-title {
  text-transform: uppercase;
  font: var(--tag);
  color: var(--grey);
  margin: 0;
  text-align: left;
}

.footer-icon svg path {
  stroke: var(--grey);
}

.footer-list-ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font: var(--body-b3);
  @media (max-width: 449px) {
    padding: 16px 0 0;
  }
}
.footer-list-ul li {
  font: var(--body-b3);
}

.footer-list-ul a {
  color: var(--black);
  font: var(--body-b3);
  text-decoration: none;
}

.footer-list-ul a:hover,
.footer-list-ul a:focus {
  color: var(--grey);
}

/* Bottom: the legal links moved up into their own column, so the copyright
   line is on its own and sits centred. */
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid #00000033;
  @media (max-width: 1279px) {
    padding: 20px 0 24px;
  }
  @media (max-width: 449px) {
    border-top: none;
    margin-top: 0;
  }
}

.footer-bottom-text {
  margin: 0;
  color: var(--charcoal);
  font: var(--body-b4);
  text-align: center;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 48px 80px;
  @media (max-width: 1380px) {
    padding: 48px;
  }
  @media (max-width: 1179px) {
    padding: 36px;
  }
  @media (max-width: 449px) {
    gap: 0;
    padding: 0 0 20px;
    border-bottom: 1px solid #00000033;
  }
}

.footer-column--combined {
  display: flex;
  flex-direction: column;
  gap: 48px;
  @media (max-width: 1176px) {
    display: contents;
  }
}

.footer-sub-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  @media (max-width: 1176px) {
    grid-column: span 1;
  }
  @media (max-width: 449px) {
    gap: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #00000033;
  }
}

.footer-logo {
  display: flex;
}

.logo {
  @media (max-width: 1024px) {
    width: 119px;
    height: 20px;
  }
}

/* Accordion header */
.footer-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  padding: 0;
  cursor: auto;
  box-shadow: none;
  @media (max-width: 449px) {
    cursor: pointer;
    padding: 20px 0 0;
  }
}

.footer-accordion-header:hover,
.footer-accordion-header:focus {
  background: none;
  border: none;
}

/* Icon */
.footer-icon {
  display: none;
  @media (max-width: 449px) {
    display: flex;
    transition: transform 0.3s ease;
  }
}

/* Mobile accordion behavior */
@media (max-width: 449px) {
  .footer-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
  }

  .footer-column.active .footer-list,
  .footer-sub-column.active .footer-list {
    max-height: 600px;
  }

  .vertical-line {
    transition: transform 0.3s ease-in-out;
    transform-origin: center center;
  }

  .footer-column.active .footer-icon .vertical-line,
  .footer-sub-column.active .footer-icon .vertical-line {
    transform: rotate(90deg);
  }
}

.footer-middle {
  display: flex;
  width: 100%;
  border-top: 1px solid #00000033;
  @media (max-width: 991px) {
    flex-direction: column;
  }
}

.footer-contact-section {
  padding: 48px 132px 48px 0;
  border-right: 1px solid #00000033;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  gap: 80px;
  max-width: 600px;
  width: 100%;
  @media (max-width: 1279px) {
    padding: 32px 32px 32px 0;
    max-width: 450px;
    gap: 32px;
  }
  @media (max-width: 1024px) {
    max-width: 350px;
  }
  @media (max-width: 991px) {
    max-width: 100%;
    border-right: none;
    flex-direction: row;
    align-items: end;
    padding-right: 0;
    border-bottom: 1px solid #00000033;
  }
  @media (max-width: 600px) {
    border-top: none;
    border-bottom: 1px solid #00000033;
    padding: 24px 0;
    gap: 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Headline + blurb + CTA, stacked above the trust badges. */
.footer-contact-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-contact-title {
  font: var(--heading-h6);
  color: var(--black);
  margin: 0;
}

.footer-contact-text {
  font: var(--body-b3);
  color: var(--charcoal);
  margin: 0;
}

.footer-contact-copy .mobile-button {
  margin-top: 22px;
  @media (max-width: 600px) {
    margin-top: 0px;
  }
}

.security-badges-section {
  display: flex;
  gap: 32px;
  @media (max-width: 1279px) {
    gap: 12px;
  }
}

.security-badges-section a {
  display: flex;
}

.mobile-button {
  @media (max-width: 1279px) {
    display: flex;
  }
}

.security-badges-section svg {
  @media (max-width: 1279px) {
    width: 54px;
    height: 54px;
  }
}
