/* ============================================================
   CAAT Footer — Component
   AEM client library: caat/components/footer/clientlibs/css
   Depends on: tokens.css, button.css, icon-button.css, social-links.css

   The site footer: a newsletter signup + back-to-top band, four
   labelled link-navigation columns, and a brand / legal / language /
   social bottom row. Composes Social/Share Links. Spacing comes from
   the spacing scale.
   ============================================================ */

.caat-footer {
  background: var(--caat-beige);
  color: var(--caat-color-text);
  padding: var(--caat-space-8) 0 var(--caat-space-5);
}

/* ── Top band: newsletter + back-to-top ───────────────────────── */
.caat-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--caat-space-5);
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--caat-space-6);
  margin-bottom: var(--caat-space-6);
  border-bottom: 1px solid var(--caat-color-border);
}
.caat-footer__newsletter { flex: 1 1 20rem; max-width: 32rem; }
.caat-footer__newsletter-title {
  font-weight: 800;
  color: var(--caat-color-text-heading);
  margin: 0 0 var(--caat-space-1);
}
.caat-footer__newsletter-text {
  font-size: var(--caat-font-size-xs);
  color: var(--caat-color-text-muted);
  margin: 0 0 var(--caat-space-3);
}
.caat-footer__newsletter-form {
  display: flex;
  gap: var(--caat-space-2);
  flex-wrap: wrap;
}
.caat-footer__newsletter-form .form-control { max-width: 18rem; }

.caat-footer__backtotop {
  display: inline-flex;
  align-items: center;
  gap: var(--caat-space-1);
  font-weight: 600;
  color: var(--caat-color-text-link);
  text-decoration: none;
  white-space: nowrap;
}
.caat-footer__backtotop:hover { text-decoration: underline; text-underline-offset: .25rem; }
.caat-footer__backtotop:focus-visible {
  outline: 0;
  box-shadow: var(--caat-color-focus-ring);
  border-radius: var(--caat-radius-sm);
}
.caat-footer__backtotop .bi { font-size: 1.1rem; }

/* ── Link columns (each a labelled nav landmark) ──────────────── */
.caat-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--caat-space-6);
}
.caat-footer__heading {
  font-size: var(--caat-font-size-2xs);
  text-transform: uppercase;
  letter-spacing: var(--caat-letter-spacing-label);
  font-weight: 800;
  color: var(--caat-color-text-heading);
  margin: 0 0 var(--caat-space-4);
}
.caat-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--caat-space-3);
}
.caat-footer__list a {
  font-weight: 500;
  color: var(--caat-color-text);
  text-decoration: none;
}
.caat-footer__list a:hover,
.caat-footer__list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: .25rem;
  color: var(--caat-color-text-heading);
}
.caat-footer__list a:focus-visible,
.caat-footer__legal a:focus-visible,
.caat-footer__lang a:focus-visible {
  outline: 0;
  box-shadow: var(--caat-color-focus-ring);
  border-radius: 2px;
}

/* ── Bottom row: logo · legal · language + social ─────────────── */
.caat-footer__bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--caat-space-5);
  align-items: center;
  margin-top: var(--caat-space-7);
  padding-top: var(--caat-space-5);
  border-top: 1px solid var(--caat-color-border);
}
.caat-footer__logo img { height: 3.5rem; width: auto; }
.caat-footer__legal {
  display: flex;
  gap: var(--caat-space-5);
  flex-wrap: wrap;
  justify-content: center;
}
.caat-footer__legal a {
  font-weight: 500;
  font-size: var(--caat-font-size-xs);
  color: var(--caat-color-text);
  text-decoration: none;
}
.caat-footer__legal a:hover,
.caat-footer__legal a:focus-visible { text-decoration: underline; text-underline-offset: .25rem; }

.caat-footer__meta {
  display: flex;
  align-items: center;
  gap: var(--caat-space-5);
  justify-content: flex-end;
}
.caat-footer__lang {
  display: inline-flex;
  align-items: center;
  gap: var(--caat-space-2);
  font-size: var(--caat-font-size-xs);
}
.caat-footer__lang a { color: var(--caat-color-text-link); text-decoration: none; font-weight: 600; }
.caat-footer__lang a:hover,
.caat-footer__lang a:focus-visible { text-decoration: underline; }
.caat-footer__lang [aria-current="true"] {
  color: var(--caat-color-text-muted);
  font-weight: 400;
  pointer-events: none;
}

.caat-footer__copyright {
  margin: var(--caat-space-5) 0 0;
  color: var(--caat-color-text-muted);
  font-size: var(--caat-font-size-xs);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .caat-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caat-footer__bottom { grid-template-columns: 1fr; text-align: left; }
  .caat-footer__legal, .caat-footer__meta { justify-content: flex-start; }
}
@media (max-width: 575.98px) {
  .caat-footer__grid { grid-template-columns: 1fr; }
}
