.o500footer,
.o500footer * {
  box-sizing: border-box;
}

.o500footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  background: #ffffff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  color: #101828;
  overflow: visible;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.o500footer a {
  color: inherit;
  text-decoration: none;
}

.o500footer__line {
  height: 2px;
  margin-bottom: 18px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(35, 148, 216, 0.55),
    rgba(189, 239, 255, 0.95),
    rgba(35, 148, 216, 0.55),
    transparent
  );
}

.o500footer__wrap {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 22px;
  display: grid;
  grid-template-columns:
    minmax(240px, 280px)
    minmax(150px, 170px)
    minmax(150px, 170px)
    minmax(260px, 300px)
    minmax(230px, 250px);
  justify-content: center;
  align-items: start;
  gap: 38px;
  overflow: visible;
}

.o500footer__brand,
.o500footer__nav,
.o500footer__contacts {
  min-width: 0;
}

.o500footer__brand {
  overflow: visible;
}

.o500footer__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.o500footer__logo {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), transparent 36%),
    linear-gradient(135deg, #2394d8, #8be2ff);
  box-shadow: 0 10px 24px rgba(35, 148, 216, 0.16);
  color: #ffffff;
}

.o500footer__logo svg {
  width: 28px;
  height: 28px;
  display: block;
}

.o500footer__name {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #050505;
}

.o500footer__name span {
  color: #2394d8;
}

.o500footer__text {
  margin: 12px 0 0;
  max-width: 320px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}

/* Соцсети: белые круги, фирменные цветные иконки, подпись при наведении */
.o500footer__socials {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
  overflow: visible;
}

.o500footer__social {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.10);
  text-decoration: none;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.o500footer__social svg {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: block;
}

.o500footer__social svg,
.o500footer__social svg * {
  fill: currentColor !important;
}

/* фирменные цвета иконок */
.o500footer__social--wa {
  color: #25D366 !important;
}

.o500footer__social--tg {
  color: #229ED9 !important;
}

.o500footer__social--vk {
  color: #0077FF !important;
}

.o500footer__social--ok {
  color: #F58220 !important;
}

.o500footer__social:hover,
.o500footer__social:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(35, 148, 216, 0.18);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.15);
  outline: none;
}

/* подпись */
.o500footer__social::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 10px;
  background: #101828;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility .18s ease;
  z-index: 20;
}

/* треугольник под подписью */
.o500footer__social::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%) translateY(6px) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #101828;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility .18s ease;
  z-index: 19;
}

.o500footer__social:hover::after,
.o500footer__social:hover::before,
.o500footer__social:focus-visible::after,
.o500footer__social:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.o500footer__social:hover::after,
.o500footer__social:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

.o500footer__social:hover::before,
.o500footer__social:focus-visible::before {
  transform: translateX(-50%) translateY(0) rotate(45deg);
}

.o500footer__title {
  margin: 0 0 8px;
  color: #344054;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.o500footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.o500footer__item {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.o500footer__item a,
.o500footer__contact {
  color: #344054;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.o500footer__item a:hover,
.o500footer__item a:focus,
.o500footer__contact:hover,
.o500footer__contact:focus,
.o500footer__legal a:hover,
.o500footer__legal a:focus {
  color: #126ca6;
  outline: none;
}

.o500footer__contacts {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.o500footer__contact--phone {
  color: #101828;
  font-size: 16px;
  font-weight: 650;
}

.o500footer__button {
  width: fit-content;
  margin-top: 8px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #44bfff, #2394d8 58%, #126ca6);
  box-shadow: 0 10px 24px rgba(35, 148, 216, 0.18);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  transition: transform .2s ease, box-shadow .2s ease;
}

.o500footer__button:hover,
.o500footer__button:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(35, 148, 216, 0.24);
  outline: none;
}

.o500footer__bottom {
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  background: #ffffff;
}

.o500footer__bottom-wrap {
  width: min(1280px, calc(100% - 48px));
  min-height: 48px;
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.o500footer__copy,
.o500footer__legal {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.o500footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Планшет */
@media (max-width: 1180px) {
  .o500footer__wrap {
    width: min(100% - 32px, 860px);
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }

  .o500footer__brand,
  .o500footer__contacts {
    grid-column: 1 / -1;
  }
}

/* Мобильная версия */
@media (max-width: 720px) {
  .o500footer {
    margin-top: 30px;
  }

  .o500footer__line {
    margin-bottom: 14px;
  }

  .o500footer__wrap {
    width: min(100% - 20px, 560px);
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .o500footer__brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2px 0 8px;
  }

  .o500footer__logo-link {
    justify-content: center;
    gap: 9px;
  }

  .o500footer__logo {
    width: 38px;
    height: 34px;
    border-radius: 12px;
  }

  .o500footer__logo svg {
    width: 25px;
    height: 25px;
  }

  .o500footer__name {
    font-size: 21px;
  }

  .o500footer__text {
    margin: 10px auto 0;
    max-width: 310px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .o500footer__socials {
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
  }

  .o500footer__social {
    width: 36px;
    height: 36px;
  }

  .o500footer__social svg {
    width: 22px;
    height: 22px;
  }

  .o500footer__social::after {
    font-size: 11px;
    padding: 5px 8px;
  }

  .o500footer__nav,
  .o500footer__contacts {
    grid-column: auto;
    padding: 12px 10px;
    border: 1px solid rgba(17, 24, 39, 0.07);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.045);
  }

  .o500footer__contacts {
    text-align: center;
    gap: 6px;
  }

  .o500footer__title {
    margin: 0 0 7px;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
  }

  .o500footer__list {
    gap: 5px;
  }

  .o500footer__item a,
  .o500footer__contact {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
  }

  .o500footer__contact--phone {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 650;
  }

  .o500footer__button {
    width: 100%;
    max-width: 150px;
    min-height: 34px;
    margin: 8px auto 0;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .o500footer__bottom-wrap {
    width: min(100% - 20px, 560px);
    min-height: auto;
    padding: 14px 0 18px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  .o500footer__legal {
    justify-content: center;
  }
}

/* Очень маленькие экраны */
@media (max-width: 390px) {
  .o500footer__wrap,
  .o500footer__bottom-wrap {
    width: min(100% - 16px, 380px);
  }

  .o500footer__wrap {
    grid-template-columns: 1fr;
  }

  .o500footer__nav,
  .o500footer__contacts {
    padding: 12px 13px;
  }

  .o500footer__contact--phone {
    font-size: 14px;
  }

  .o500footer__button {
    max-width: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .o500footer__button,
  .o500footer__social {
    transition: none;
  }
}