#footer {
  margin-top: -2px;
  background: #FFFFFF;
  color: #1a1a1a;
  /* Tighter band below #cta.cta-build-future so menu columns sit closer to the CTA */
  padding: calc(16px + var(--space-xl, 32px)) calc(2 * var(--navbar-padding-x, clamp(1rem, 1.5rem + 2.5vw, 6rem))) var(--space-xl, 32px);
  font-family: var(--font-lusail, 'Lusail', sans-serif);
}

#footer .footer-inner {
  max-width: var(--container-max, 1400px);
  margin: 0 auto;
  padding: 0 var(--space-xl, 32px);
}

#footer a {
  color: #1a1a1a;
  text-decoration: none;
  font-family: var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0;
}

#footer a:hover {
  color: #00417B;
}

/* Column nav links (Quick Links, IR, etc.) — smaller than generic #footer a */
#footer .footer-col ul a {
  font-size: 14px;
  line-height: 20px;
}

#footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg, 24px);
  align-items: start;
  padding-bottom: var(--space-xl, 32px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.15);
}

#footer .footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 4px);
}

#footer .footer-title {
  font-family: var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: 0;
  color: #00417B;
  margin: 0 0 6px;
}

#footer .footer-title.footer-subhead {
  margin-top: var(--space-lg, 24px);
  margin-bottom: var(--space-xs, 4px);
}

#footer .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#footer .footer-col li {
  margin-bottom: 4px;
}

#footer .footer-col li:last-child {
  margin-bottom: 0;
}

#footer .footer-col-4 {
  min-height: 1px;
}

#footer .footer-newsletter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  width: 100%;
  padding: var(--space-lg, 24px) 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.15);
}

#footer .footer-logo {
  flex-shrink: 0;
}

#footer .footer-logo img {
  width: 200px;
  height: auto;
  display: block;
  object-fit: contain;
}

#footer .footer-newsletter {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px) auto;
  column-gap: var(--space-sm, 8px);
  row-gap: var(--space-sm, 8px);
  align-items: center;
}

#footer .footer-newsletter label {
  grid-column: 2 / -1;
  grid-row: 1;
  font-family: var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0;
  color: #00417B;
  margin: 0;
  text-align: start;
}

#footer .footer-newsletter .footer-newsletter-form-row {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px) auto;
  column-gap: var(--space-sm, 8px);
  width: 100%;
  align-items: center;
}

#footer .footer-newsletter input[type="email"] {
  grid-column: 2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 14px;
  font-family: 'Lusail Light', var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 300;
  font-size: 15px;
  line-height: 22px;
  border: 1px solid #00417B;
  background: #FFFFFF;
  color: #1a1a1a;
  border-radius: 2px;
  min-height: 44px;
  box-sizing: border-box;
  direction: ltr;
  text-align: start;
}

html[dir="rtl"] #footer .footer-newsletter input[type="email"] {
  direction: rtl;
  text-align: start;
}

#footer .footer-newsletter input[type="email"]::placeholder {
  color: #00417B;
  font-family: 'Lusail Light', var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 300;
}

html[dir="rtl"] #footer .footer-newsletter input[type="email"]::placeholder {
  text-align: right;
}

#footer .footer-newsletter button {
  grid-column: 3;
  flex-shrink: 0;
  padding: 10px 20px;
  min-height: 44px;
  font-family: var(--font-lusail, 'Lusail', sans-serif);
  font-weight: 500;
  font-size: 15px;
  background: #00417B;
  color: #FFFFFF;
  border: none;
  border-radius: 2px;
  cursor: pointer;
}

#footer .footer-newsletter button:hover {
  opacity: 0.92;
}

#footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm, 8px);
  padding-top: var(--space-md, 16px);
}

/* SharePoint embed cleanup — remove default WebPart chrome spacing */
.ms-webpart-chrome-title,
.ms-webpart-frame-title,
.ms-webpart-titleText,
.ms-webpart-titleText span {
  display: none !important;
}

.ms-webpart-chrome,
.ms-webpart-zone,
.ms-webpart-cell {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.ms-webpart-chrome > div {
  margin: 0 !important;
  padding: 0 !important;
}

#footer .footer-copy,
#footer .footer-copyright {
  font-size: 14px;
  line-height: 22px;
  color: #1a1a1a;
  margin: 0;
  min-width: 0;
}

#footer .footer-social {
  display: flex;
  gap: var(--space-md, 16px);
}

#footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #1a1a1a;
  font-size: 16px;
}

#footer .footer-social a img {
  filter: none !important;
}

#footer .footer-social a:hover {
  background: #FFFFFF;
}

#footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md, 16px);
}

#footer .footer-legal a {
  color: #1a1a1a;
  font-size: 14px;
}

@media (max-width: 1023px) {
  #footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  #footer {
    padding: calc(12px + var(--space-lg, 24px)) calc(2 * var(--navbar-padding-x-xs, clamp(0.75rem, 0.5rem + 2vw, 1.25rem))) var(--space-lg, 24px);
  }

  #footer .footer-inner {
    padding: 0;
  }

  #footer .footer-grid {
    grid-template-columns: 1fr;
  }

  #footer .footer-col {
    align-items: center;
    text-align: center;
  }

  #footer .footer-title {
    text-align: center;
  }

  #footer .footer-col li,
  #footer .footer-col a {
    text-align: center;
  }

  #footer .footer-newsletter-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md, 16px);
    padding: var(--space-md, 16px) 0;
  }

  #footer .footer-logo {
    align-self: center;
  }

  #footer .footer-logo img {
    margin-inline: auto;
  }

  #footer .footer-newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    direction: unset;
  }

  #footer .footer-newsletter label {
    grid-column: unset;
    grid-row: unset;
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter label {
    direction: unset;
  }

  #footer .footer-newsletter .footer-newsletter-form-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm, 8px);
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
    grid-column: unset;
    grid-row: unset;
  }

  #footer .footer-newsletter input[type="email"] {
    grid-column: unset;
    max-width: none;
    width: 100%;
    text-align: center;
  }

  #footer .footer-newsletter .footer-newsletter-form-row button {
    grid-column: unset;
    width: 100%;
  }

  #footer .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs, 4px);
  }

  /* DOM: copyright → legal → social; mobile: social → policies → copyright */
  #footer .footer-bottom .footer-social {
    order: 1;
  }

  #footer .footer-bottom .footer-legal {
    order: 2;
  }

  #footer .footer-bottom .footer-copyright,
  #footer .footer-bottom .footer-copy {
    order: 3;
  }

  #footer .footer-legal {
    justify-content: center;
  }

  /* RTL: same centered mobile layout; keep newsletter input centered on mobile */
  html[dir="rtl"] #footer .footer-col,
  html[dir="rtl"] #footer .footer-title,
  html[dir="rtl"] #footer .footer-col li,
  html[dir="rtl"] #footer .footer-col a {
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter-row {
    align-items: center;
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-logo {
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter {
    align-items: center;
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter label {
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter-form-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 420px;
    margin-inline: auto;
  }

  html[dir="rtl"] #footer .footer-newsletter input[type="email"] {
    text-align: center;
    direction: ltr;
  }

  html[dir="rtl"] #footer .footer-newsletter input[type="email"]::placeholder {
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-newsletter button {
    margin-inline: 0;
    width: 100%;
  }

  html[dir="rtl"] #footer .footer-bottom,
  html[dir="rtl"] #footer .footer-copyright {
    text-align: center;
  }

  html[dir="rtl"] #footer .footer-social {
    justify-content: center;
  }

  html[dir="rtl"] #footer .footer-legal {
    text-align: center;
    justify-content: center;
  }

  html[dir="rtl"] #footer .footer-legal a {
    margin-inline: 0;
  }
}
