.footer {
  overflow: hidden;
}

@media (min-width: 1200px) {
  .footer {
    margin-top: 1.375rem;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .footer {
    margin-top: 2.75rem;
  }
}

@media (max-width: 899px) {
  .footer {
    margin-top: 1.25rem;
  }
}

@media (max-width: 899px) {
  .footer__container {
    padding: unset;
  }
}

.footer-contacts__wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (max-width: 899px) {
  .footer-contacts__wrapper {
    align-items: center;
  }
}

@media (max-width: 1150px) {
  .footer-contacts {
    gap: 2rem !important;
    width: 100%;
    flex-wrap: wrap;
  }
}



.footer__wrapper {
  position: relative;
  z-index: 1;
  background-color: var(--color-bg-secondary);
  padding: 20px;
}

@media (min-width: 1200px) {
  .footer__wrapper {
    padding: 1.375rem 2rem 1rem;
  }
}

.footer__wrapper > * + * {
  margin-top: 2rem;
}

.footer__header {
  position: relative;
  z-index: 1;
}

.footer__main {
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer__bottom {
  border-top: 1px solid var(--color-accent);
  padding-top: 2rem;
}

@media (max-width: 900px) {
  .footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 1400px) {
  .footer-socials--icons,
  .footer-socials--logos {
    height: 50px;
  }
}

.footer__bg {
  position: absolute;
  margin: 0;
  top: -50px;
  right: -75px;
  z-index: 0;
  pointer-events: none;
}

.footer-contacts__link-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-contacts__link-wrapper svg {
  flex-shrink: 0;
}

@media (max-width: 899px) {
  .footer__bg {
    width: 100%;
  }
}

/*
 * The crest watermark is a faint shape in the light theme, but its white
 * parts light up on a dark page and sit right behind the column headings,
 * so the dark theme turns it down to a trace.
 */
.footer__bg {
  --footer-watermark-opacity: 1;
}

html[data-theme="dark"] .footer__bg {
  --footer-watermark-opacity: 0.3;
}

.footer__bg img,
.footer__bg svg {
  width: 85%;
  height: auto;
  opacity: var(--footer-watermark-opacity);
}

@media (min-width: 900px) {
  .footer__logo {
    max-width: 20.3125rem;
  }
}

@media (max-width: 899px) {
  .footer__logo {
    max-width: 13.3125rem;
  }
}

.footer__logo img {
  width: 100%;
  height: auto;
}

/* Logo twins, see site-footer.php: blue wordmark on light, white on dark. */
.footer__logo .logo-link__img--dark,
html[data-theme="dark"] .footer__logo .logo-link__img--light {
  display: none;
}

html[data-theme="dark"] .footer__logo .logo-link__img--dark {
  display: block;
}

.footer-navigation {
  font-weight: 400;
  line-height: 115.384%;
}

@media (min-width: 900px) {
  .footer-navigation {
    display: grid;
    gap: 2em;
    grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
    font-size: 0.75rem;
  }
}

@media (min-width: 900px) and (min-width: 1710px) {
  .footer-navigation {
    gap: 0.769em;
    font-size: 0.8125rem;
  }
}

@media (max-width: 899px) {
  .footer-navigation {
    font-size: 0.875rem;
  }
}

@media (max-width: 899px) {
  .footer-navigation > * + * {
    border-top: 1px solid var(--color-border-strong);
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

.footer-navigation__title {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: normal;
  line-height: 116%;
  font-weight: 400;
  border: unset;
  padding: unset;
  background-color: transparent;
  text-align: left;
  font-weight: 500;
  color: var(--color-link);
}

@media (min-width: 1200px) {
  .footer-navigation__title {
    font-size: 1.375rem;
  }
}

@media (min-width: 1200px) and (min-width: 1540px) {
  .footer-navigation__title {
    font-size: 1.5rem;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .footer-navigation__title {
    font-size: 1.375rem;
  }
}

@media (max-width: 899px) {
  .footer-navigation__title {
    font-size: 1.25rem;
  }
}

@media (min-width: 900px) {
  .footer-navigation__title {
    cursor: default;
  }
}

@media (max-width: 899px) {
  .footer-navigation__title {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
  }
}

.footer-navigation__title > * + * {
  margin-left: 2.5rem;
}

@media (min-width: 900px) {
  .footer-navigation__arrow {
    display: none;
  }
}

.footer-navigation__arrow svg {
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition:
    transform 0.3s ease,
    -webkit-transform 0.3s ease;
}

.footer-navigation__arrow svg._active {
  -webkit-transform: rotate(180deg);
  transform: rotate(180deg);
}

@media (min-width: 900px) {
  .footer-navigation__inner:not(._last) {
    margin-top: 1.75rem;
  }
}

@media (max-width: 899px) {
  .footer-navigation__inner:not(._last) {
    -webkit-transition: margin 0.6s ease;
    transition: margin 0.6s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
  }
}

@media (max-width: 899px) {
  .footer-navigation__item._active .footer-navigation__inner {
    margin-top: 1.375rem;
  }
}

@media (max-width: 1084px) {
  .footer-navigation__item--last {
    grid-column: 1/-1;
  }

  .extras-list {
    justify-content: center;
  }

  .extras-list__item {
    flex: 0 1 250px !important;
  }
}

.footer-list > * + * {
  margin-top: 0.75rem;
}

.footer-list__item {
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
  color: var(--color-text-primary);
  width: 100%;
}

/*
 * The footer links are small text with 12px between them, too thin a target
 * for a finger. Padding widens what can be tapped and the equal negative
 * margin gives the space back, so nothing moves; 6px each way meets the
 * neighbour's area without overlapping it.
 */
.footer-list__item:not(._btn-colored) {
  display: inline-block;
  padding-block: 6px;
  margin-block: -6px;
}

html:not(.v-mobile) .footer-list__item:hover {
  color: var(--color-link);
}

.footer-list__item:focus-visible {
  color: var(--color-link);
}

@media (min-width: 900px) {
  .footer-contacts {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4rem;
    width: 100%;
  }
}

@media (max-width: 899px) {
  .footer-contacts > * + * {
    margin-top: 1.5rem;
  }
}

.footer-contacts__item {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 140%;
  width: 100%;
}

@media (min-width: 900px) {
  .footer-contacts__item {
    max-width: 320px;
  }
}

.footer-contacts__item > * + * {
  margin-left: 0.65rem;
}

.footer-contacts__label {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 1.25rem;
  height: 1.25rem;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-accent);
}

.footer-contacts__label svg,
.footer-contacts__label img {
  width: 18px;
  height: 18px;
}

.footer-contacts__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contacts__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.footer-contacts__desc {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.footer-contacts__link {
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
  color: var(--color-text-primary);
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  padding: 1px 0;
  min-height: 22px;
}

html:not(.v-mobile) .footer-contacts__link:hover {
  color: var(--color-link);
}

.footer-contacts__link:focus-visible {
  color: var(--color-link);
}

.footer-contacts__link span {
  display: block;
}

.footer-socials {
  display: flex;
}

.footer-socials > * + * {
  margin-left: 1rem;
}

.footer-socials li {
  -ms-flex-negative: 0;
  flex-shrink: 0;
}

.footer-socials__link {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 2rem;
  height: 2rem;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.footer-socials__link svg,
.footer-socials__link img {
  width: 100%;
  height: auto;
}

.footer-socials__link svg path {
  /* The icons come from an ACF field with fill="black" baked in; CSS outranks the attribute. */
  fill: var(--color-text-primary);
  -webkit-transition: fill 0.3s ease;
  transition: fill 0.3s ease;
}

html:not(.v-mobile) .footer-socials__link:hover svg path {
  fill: var(--color-accent);
}

.footer-socials__link:focus-visible svg path {
  fill: var(--color-accent);
}

/*
 * Touch screens. The phone numbers and addresses were 22px-tall targets 6px
 * apart; each row is now 32px with no gap, a few pixels more per row. The
 * section headings and the social icons keep their look and get a 44px
 * target: the padding that grows it is taken back by a negative margin, so
 * nothing moves.
 */
@media (pointer: coarse) {
  .footer-contacts__content {
    gap: 0;
  }

  .footer-contacts__link {
    min-height: 32px;
  }

  /* The section headings open their lists; a 23px button in a 55px row. The
     margin takes the padding back, so the rows keep their spacing. */
  .footer-navigation__title {
    padding: 10px 0;
    margin: -10px 0;
  }

  .footer-socials__link {
    width: 44px;
    height: 44px;
    padding: 6px;
    margin: -6px;
  }
}

.footer-socials__wrapper {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 1rem;
}

.footer-socials__item--logo {
  width: 45px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.footer-socials__item--logo:hover {
  transform: scale(1.15);
}

.footer-socials__item--logo a {
  width: 45px;
  height: 45px;
}

.footer-socials__item--logo {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.footer-socials__item--logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .footer {
    margin-top: 0;
  }
}

.footer-socials--logos {
  display: flex;
  gap: 1rem;
  margin: 0;
}

.footer-socials--logos > * {
  margin: 0 !important;
}

details[open] p {
  margin: 1.2rem 0;
}

/*
 * Reading progress bar. It is always full width and scroll.js scales it
 * along X: a transform is done by the compositor, where animating width
 * relaid out the page on every scroll step.
 */
#scrollIndicator {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background-color: var(--color-blue-100);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

@media (max-width: 480px) {
  #scrollIndicator {
    height: 3px;
    background-color: var(--color-blue-100);
  }
}

@media (min-width: 481px) and (max-width: 1024px) {
  #scrollIndicator {
    height: 4px;
    background-color: var(--color-blue-100);
  }
}

@media (min-width: 1025px) and (max-width: 1920px) {
  #scrollIndicator {
    height: 5px;
  }
}

@media (min-width: 1921px) {
  #scrollIndicator {
    height: 6px;
  }
}



@media (min-width: 900px) {
  .footer-navigation__item--contacts .footer-navigation__title {
    display: none !important;
  }
  .footer-contacts__main-wrapper {
    display: grid;
    gap: 2em;
    grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
    width: 100%;
  }
}

@media (max-width: 899px) {
  .footer-navigation__item--contacts .footer-navigation__title {
    display: flex !important;
  }
  .footer-contacts__main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
}

