.footer {
  background-color: #ffffff;
  color: var(--primary);
  padding: 3rem 0 1.5rem;
  width: 100%;
  max-width: none;
  margin: 40px 0 0;
  border-top: 1px solid #eef1fa;
  border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
  font-family: "Onest", "Segoe UI", sans-serif;
  box-shadow: 0 -10px 24px rgba(34, 85, 245, 0.08);
}

/* Backward compatibility for pages that still use main-footer markup */
.main-footer {
  background-color: #ffffff;
  color: var(--primary);
  padding: 2.5rem 0 1.25rem;
  margin-top: 40px;
  border-top: 1px solid #eef1fa;
  box-shadow: 0 -10px 24px rgba(34, 85, 245, 0.08);
}

.main-footer .footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eef1fa;
}

.main-footer .footer-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.main-footer .footer-section p,
.main-footer .footer-section a,
.main-footer .footer-links a {
  color: var(--primary);
  text-decoration: none;
}

.main-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.main-footer .footer-links a:hover,
.main-footer .footer-section a:hover {
  color: var(--secondary);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  margin-bottom: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eef1fa;
}

.footer-top > .footer-brand,
.footer-top > .footer-contacts,
.footer-top > .footer-links,
.footer-top > .footer-map {
  min-width: 0;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  border-left: 1px solid #e3e8f7;
}

.footer-top > .footer-brand {
  padding-left: 0;
  border-left: none;
}

.footer-top > .footer-map {
  padding-right: 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--motion-duration-fast) var(--motion-ease-standard);
}

.footer-logo:hover {
  color: var(--secondary);
}

.footer-tax-info {
  font-size: 0.85rem;
  color: var(--gray);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: #f2f5ff;
  border-radius: 50%;
  color: var(--secondary);
  transition: var(--transition);
  text-decoration: none !important;
}

.footer-social a:hover {
  background-color: var(--secondary);
  color: white;
  transform: translateY(-0.125rem);
}

.footer-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background-color: var(--secondary);
}

.footer-contacts address {
  margin: 0;
  padding: 0;
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contacts a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--motion-duration-fast) var(--motion-ease-standard);
  display: flex;
  align-items: center;
  gap: 0.5rem;

}

.footer-contacts a:hover {
  color: var(--secondary);
}

.footer-contacts i {
  width: 1.25rem;
  text-align: center;
  color: var(--secondary);
}

.footer-links nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: var(--transition);
  position: relative;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-links a.active {
  color: var(--secondary);
  font-weight: 700;
}

.footer .map-wrapper,
.main-footer .map-wrapper {
  position: relative;
  aspect-ratio: 16/9;
  height: auto;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  background: var(--light);

}

.footer .map-wrapper iframe,
.main-footer .map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.footer-bottom {
  text-align: center;
  padding: 0.5rem 4.5rem 0.75rem 0.5rem;
  margin-top: 1rem;
}

.legal-info,
.copyright {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.4;
}

.copyright a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--motion-duration-fast) var(--motion-ease-standard);
}

.copyright a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.75rem;
  }

.footer-top > .footer-brand,
.footer-top > .footer-contacts,
.footer-top > .footer-links,
.footer-top > .footer-map {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.footer-top > .footer-brand {
  padding-left: 0;
}

.footer-top > .footer-links {
  border-left: none;
  padding-left: 0;
}

.footer-top > .footer-contacts {
  border-left: 1px solid #e3e8f7;
}

.footer-top > .footer-map {
  grid-column: 1 / -1;
  border-left: none;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid #e3e8f7;
  padding-top: 1.75rem;
}

.footer .map-wrapper,
.main-footer .map-wrapper {
  max-width: 560px;
  margin: 0 auto;
}
}

@media (max-width: 768px) {
  .footer {
    padding: 3.5rem 0 2rem;
  }

.footer-top {
  grid-template-columns: 1fr;
  row-gap: 1.5rem;
}

.footer-top > .footer-brand,
.footer-top > .footer-contacts,
.footer-top > .footer-links,
.footer-top > .footer-map {
  border-left: none;
  padding-left: 0;
  padding-right: 0;
  border-top: none;
  padding-top: 0;
}

.footer-top > .footer-contacts,
.footer-top > .footer-links,
.footer-top > .footer-map {
  border-top: 1px solid #e3e8f7;
  padding-top: 1.5rem;
}

.footer-top > .footer-brand {
  border-top: none;
  padding-top: 0;
}

.footer .map-wrapper,
.main-footer .map-wrapper {
  grid-column: span 1;
  height: 230px;

}

.footer-bottom {
  text-align: center;
  padding: 0.5rem 0;
  margin-top: 1rem;
}

.footer-title {
  margin-bottom: 0.85rem;
}
}

@media (forced-colors: active) {
  .footer {
    border-top: 2px solid ButtonText;
  }

.footer-title::after {
  background-color: ButtonText;
}

.footer-social a {
  forced-color-adjust: none;
  background-color: ButtonFace;
  color: ButtonText;
}
}
