/* Static-site footer contacts: resilient rows for long addresses and narrow screens. */
.footer__col--contacts {
  gap: 0;
}

.footer__col--contacts .footer__title {
  margin-bottom: var(--space-3);
}

.footer__col--contacts .footer__office-list {
  margin-top: 0;
}

.footer__office-list {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-3);
  row-gap: 14px;
  align-items: start;
}

.footer__office {
  display: grid;
  min-width: 0;
  padding: 0;
  grid-template-rows: auto;
  align-content: start;
  gap: 14px;
}

html.desktop-autoscale-active .desktop-section-canvas .footer__office {
  padding: 0;
}

.footer__office-address,
.footer__office-detail,
.footer__contact {
  min-width: 0;
  align-items: start;
}

.footer__office-address > span,
.footer__office-detail > span,
.footer__contact > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer__office-address img,
.footer__office-detail img,
.footer__contact img {
  align-self: start;
  flex: none;
}

.footer__office-detail a {
  white-space: nowrap;
}

.footer__office-detail > span {
  display: grid;
  gap: 4px;
}

.footer__office-detail a + a {
  margin-top: 0;
}

.footer__contact-list {
  gap: 14px;
}

@media (min-width: 1181px) {
  .footer__top,
  .desktop-autoscale-active .desktop-section-canvas .footer__top {
    grid-template-columns:
      minmax(240px, 1.1fr)
      minmax(150px, .7fr)
      minmax(190px, .85fr)
      minmax(420px, 1.6fr);
    gap: var(--space-3);
  }
}

@supports (grid-template-rows: subgrid) {
  .footer__office-list {
    grid-template-rows: repeat(3, auto);
  }

  .footer__office {
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
    gap: 0;
  }

  .footer__office:nth-child(1) {
    grid-column: 1;
  }

  .footer__office:nth-child(2) {
    grid-column: 2;
  }
}

@media (max-width: 1180px) and (min-width: 641px) {
  .footer__top,
  .desktop-autoscale-active .desktop-section-canvas .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__col--contacts {
    grid-column: 1 / -1;
  }

  .footer__office-list {
    column-gap: var(--space-5);
  }
}

@media (max-width: 640px) {
  .footer__col--contacts {
    grid-column: auto;
  }

  .footer__office-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: var(--space-4);
  }

  .footer__office,
  .footer__office:nth-child(1),
  .footer__office:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
    grid-template-rows: auto;
    gap: 14px;
  }
}
