.xp-footer {
  position: relative;
  margin-top: 78px;
  background: #0b1d4a;
  color: #d9e6ff;
  border-top: 1px solid #27457f;
}

.xp-footer::before {
  content: none;
}

.xp-footer-wrap {
  width: min(1280px, 100% - 36px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
  padding: 56px 0 24px;
}

.xp-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 0 0 26px;
  border-bottom: 1px solid rgba(151, 179, 236, 0.3);
}

.xp-news-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 2.2vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.xp-news-copy p {
  margin: 10px 0 0;
  max-width: 620px;
  color: #c8d8fb;
  font-size: 15px;
  line-height: 1.55;
}

.xp-news-form {
  min-width: min(460px, 100%);
  display: grid;
  gap: 10px;
}

.xp-news-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.xp-news-form input {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  border: 1px solid #3b5f9c;
  background: #0c224f;
  color: #edf4ff;
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition: border-color 160ms ease;
}

.xp-news-form input::placeholder {
  color: #95aad9;
}

.xp-news-form input:focus {
  border-color: #89b1f8;
}

.xp-news-form button {
  height: 50px;
  border-radius: 12px;
  border: 1px solid #78a5f7;
  background: #1f6df6;
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
  transition: background 160ms ease;
}

.xp-news-form button:hover {
  background: #1658ca;
}

.xp-news-message {
  margin: 0;
  min-height: 20px;
  color: #9ec3ff;
  font-size: 13px;
}

.xp-news-message.is-error {
  color: #ffb2b2;
}

.xp-news-message.is-success {
  color: #89f0c4;
}

.xp-footer-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.xp-footer-col {
  padding: 0;
}

.xp-footer-head {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 0;
  cursor: default;
  font: inherit;
}

.xp-footer-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.xp-chevron {
  display: none;
  width: 14px;
  height: 14px;
  transition: transform 220ms ease;
}

.xp-footer-body {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.xp-footer-body a {
  color: #c9d8f7;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 140ms ease;
  width: fit-content;
}

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

.xp-footer-note {
  margin: 0;
  color: #a8bcdf;
  font-size: 14px;
  line-height: 1.55;
  max-width: 360px;
}

.xp-socials {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.xp-socials a {
  padding: 0;
  color: #d8e7ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #7ea0db;
  text-underline-offset: 4px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

.xp-socials a:hover {
  color: #fff;
  text-decoration-color: #d6e4ff;
}

.xp-footer-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(145, 173, 233, 0.26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #aebfde;
  font-size: 13px;
}

.xp-top-btn {
  border: 0;
  background: transparent;
  color: #deebff;
  min-height: 30px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, text-decoration-color 160ms ease;
  text-decoration: underline;
  text-decoration-color: #7ea0db;
  text-underline-offset: 4px;
}

.xp-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.xp-top-btn:hover {
  background: transparent;
  text-decoration-color: #d6e4ff;
}

@media (max-width: 1120px) {
  .xp-newsletter {
    flex-direction: column;
    align-items: flex-start;
  }

  .xp-news-form {
    min-width: 100%;
    width: 100%;
  }

  .xp-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .xp-footer-wrap {
    width: min(1280px, 100% - 20px);
    padding-top: 44px;
  }

  .xp-newsletter {
    padding-bottom: 18px;
  }

  .xp-news-form-row {
    grid-template-columns: 1fr;
  }

  .xp-footer-grid {
    grid-template-columns: 1fr;
  }

  .xp-footer-col {
    padding: 0;
    border-top: 1px solid rgba(149, 177, 237, 0.22);
  }

  .xp-footer-head {
    cursor: pointer;
    padding: 16px 18px;
  }

  .xp-chevron {
    display: inline-block;
  }

  .xp-footer-body {
    margin-top: 0;
    max-height: 520px;
    opacity: 1;
    overflow: hidden;
    padding: 0 18px 16px;
    transition: max-height 260ms ease, opacity 220ms ease, padding 220ms ease;
  }

  .xp-footer-col.is-collapsed .xp-footer-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  .xp-footer-col.is-collapsed .xp-chevron {
    transform: rotate(-90deg);
  }
}
