.site-footer,
footer.site-footer,
footer[role="contentinfo"] {
  position: relative;
  background: #0f0f10;
  border-top: 0;
  padding: 24px 0 28px;
}

.footer-layout {
  position: relative;
  width: min(100% - 48px, 1780px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1.05fr;
  gap: 22px;
  align-items: stretch;
}

.footer-card {
  background: #a8a8a8;
  border-radius: 28px;
  padding: 38px 42px;
  color: #121212;
  min-height: 420px;
}

.footer-card-title {
  margin: 0 0 42px;
  color: #111111;
  font-size: clamp(34px, 3vw, 56px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-card-title-sm {
  margin-bottom: 34px;
  font-size: clamp(34px, 3vw, 56px);
  max-width: 11ch;
}

.footer-card-links,
.footer-card-social {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-links-nav ul,
.footer-social-nav ul {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-links-nav a,
.footer-social-nav a {
  color: #1a1a1a;
  font-size: clamp(26px, 2.1vw, 44px);
  line-height: 1.05;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-links-nav a:hover,
.footer-social-nav a:hover {
  color: #6c4cff;
  transform: translateX(4px);
}

.footer-copyright,
.footer-credit {
  margin: 0;
  color: rgba(18, 18, 18, 0.85);
  font-size: 17px;
  line-height: 1.4;
}

.footer-credit strong {
  color: #ffffff;
  font-weight: 700;
}

.footer-card-contact {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 26px;
  background: transparent;
  padding: 0;
  min-height: 420px;
}

.footer-contact-box,
.footer-subscribe-box {
  background: #a8a8a8;
  border-radius: 28px;
}

.footer-contact-box {
  padding: 30px 38px;
  min-height: 122px;
  display: flex;
  align-items: center;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #202020;
  text-decoration: none;
  font-size: clamp(22px, 1.5vw, 28px);
  line-height: 1.2;
}

.footer-contact-link:hover {
  color: #6c4cff;
}

.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6c4cff;
  font-size: 32px;
  line-height: 1;
  min-width: 30px;
}

.footer-subscribe-box {
  padding: 38px 42px;
  min-height: 272px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-subscribe-form {
  margin-top: auto;
}

.footer-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid rgba(18, 18, 18, 0.75);
  padding-bottom: 12px;
}

.footer-input-row input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #222222;
  padding: 0 0 4px;
  border-radius: 0;
  box-shadow: none;
  font-size: 18px;
}

.footer-input-row input::placeholder {
  color: rgba(34, 34, 34, 0.65);
}

.footer-input-row input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.footer-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #222222;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.footer-submit-btn:hover {
  color: #6c4cff;
}

.footer-theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 999px;
  background: #6c4cff;
  box-shadow: 0 14px 30px rgba(108, 76, 255, 0.32);
  color: #ffd86b;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.footer-theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(108, 76, 255, 0.42);
}

.footer-theme-toggle-icon {
  font-size: 34px;
  line-height: 1;
}

/* Light theme support */
html.is-light-theme .site-footer,
html[data-theme="light"] .site-footer {
  background: #f2f2f2;
}

html.is-light-theme .footer-card,
html.is-light-theme .footer-contact-box,
html.is-light-theme .footer-subscribe-box,
html[data-theme="light"] .footer-card,
html[data-theme="light"] .footer-contact-box,
html[data-theme="light"] .footer-subscribe-box {
  background: #d9d9d9;
}

html.is-light-theme .footer-theme-toggle,
html[data-theme="light"] .footer-theme-toggle {
  background: #6c4cff;
  color: #ffd86b;
}

@media (max-width: 1400px) {
  .footer-layout {
    width: min(100% - 28px, 1780px);
    grid-template-columns: 1fr;
  }

  .footer-card,
  .footer-card-contact {
    min-height: auto;
  }

  .footer-card-title,
  .footer-card-title-sm {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .site-footer,
  footer.site-footer,
  footer[role="contentinfo"] {
    padding: 14px 0 24px;
  }

  .footer-layout {
    gap: 16px;
  }

  .footer-card,
  .footer-contact-box,
  .footer-subscribe-box {
    border-radius: 22px;
  }

  .footer-card {
    padding: 26px 22px;
  }

  .footer-contact-box {
    padding: 22px 22px;
    min-height: 96px;
  }

  .footer-subscribe-box {
    padding: 28px 22px;
    min-height: 220px;
  }

  .footer-card-title,
  .footer-card-title-sm {
    margin-bottom: 26px;
    font-size: clamp(28px, 9vw, 46px);
  }

  .footer-links-nav ul,
  .footer-social-nav ul {
    gap: 18px;
  }

  .footer-links-nav a,
  .footer-social-nav a {
    font-size: clamp(22px, 7vw, 34px);
  }

  .footer-contact-link {
    font-size: 18px;
    gap: 12px;
    word-break: break-word;
  }

  .footer-contact-icon {
    font-size: 26px;
  }

  .footer-copyright,
  .footer-credit {
    font-size: 15px;
  }

  .footer-input-row input {
    font-size: 16px;
  }

  .footer-theme-toggle {
    width: 62px;
    height: 62px;
    right: 14px;
    bottom: 14px;
  }

  .footer-theme-toggle-icon {
    font-size: 28px;
  }
}