.footer .modern-footer-bottom.tebar-footer-with-agency {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 28px;
  border-top: 1px solid #ddd8d5;
  padding-top: 22px;
}

.footer .tebar-footer-with-agency .footer_text {
  border-top: 0;
  padding: 0;
}

.footer .tebar-footer-contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.footer .tebar-footer-contact-block .modern-footer-contact {
  display: block;
  margin: 0;
}

.footer .tebar-footer-contact-block .tebar-footer-phone {
  font-size: 12px;
  line-height: 1.6;
}

.footer .tebar-footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  /* Keep the fixed back-to-top button clear of the footer logo. */
  padding-right: 48px;
}

.footer .tebar-footer-right > a {
  font-size: 11px;
}

.footer .tebar-footer-right .tebar-footer-agency {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 38px;
  min-height: 28px;
}

.footer .tebar-footer-agency img {
  display: block;
  width: 38px;
  height: auto;
  filter: grayscale(1);
  transition: filter .2s ease;
}

.footer .tebar-footer-agency:hover img,
.footer .tebar-footer-agency:focus-visible img {
  filter: grayscale(0);
}

.footer .tebar-footer-agency:focus-visible {
  outline: 2px solid var(--tebar-red, #ed1c24);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .footer .tebar-footer-contact-block {
    align-items: flex-start;
    margin-top: 20px;
  }

  .footer .modern-footer-bottom.tebar-footer-with-agency {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
  }

  .footer .tebar-footer-right {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
}
