.footer {
  background: linear-gradient(180deg, #2b2c2e 0%, #2b2d2f 60%, #1040ae 90%, #00458f 100%);
  color: rgba(255, 255, 255, 0.95);
  padding: 3rem 0 0;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

/* Без отступа между футером и фоновым видео на странице /ecology */
main.page-ecology + .footer {
  margin-top: 0;
}

.footer-decor {
  position: absolute;
  top: -174px;
  right: -219px;
  width: 420px;
  height: 320px;
  max-width: 45%;
  background-repeat: no-repeat;
  background-position: top right;
  background-size: contain;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
  transform: rotate(0.5turn);
}

.footer-content {
  display: grid;
  grid-template-columns: auto repeat(4, 1fr) auto;
  gap: 2.5rem 2.5rem;
  align-items: start;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.footer-logo-block {
  grid-column: 1;
}

.footer-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 0.92;
  color: inherit;
}

.footer .logo-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.footer .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.footer .logo-text {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  white-space: nowrap;
}

.footer-column {
  min-width: 0;
  margin-top: 25px;
}

.footer-column-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.footer-column-title a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-column-title a:hover {
  opacity: 0.85;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-standalone-links {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-standalone-links a {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.footer-contacts-block {
  grid-column: -1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  text-align: right;
  margin-top: 25px;
}

.footer-phone {
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.footer-phone:hover {
  opacity: 0.9;
  color: #fff;
}

.footer-email {
  font-size: 1.04rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-email:hover {
  color: #fff;
}

.footer-bottom {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  max-width: 100%;
}

@media (max-width: 1200px) {
  .footer-content {
    grid-template-columns: auto repeat(2, 1fr) auto;
    gap: 2rem 2.5rem;
  }

  .footer-logo-block {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .footer-contacts-block {
    grid-column: -1;
    grid-row: 1 / 3;
  }
}

@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-logo-block {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .footer-contacts-block {
    grid-column: 1 / -1;
    grid-row: auto;
    align-items: flex-start;
    text-align: left;
  }

  .footer-decor {
    width: 280px;
    height: 220px;
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 2.5rem 0 0;
  }

  .footer-decor {
    width: 200px;
    height: 160px;
    max-width: 60%;
    opacity: 0.5;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .footer-logo-block {
    grid-column: 1;
  }

  .footer-column {
    grid-column: 1 !important;
    margin-top: 0;
  }

  .footer-contacts-block {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .footer-bottom {
    padding: 1rem 0 1.25rem;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }
}
