/* Shared footer overrides across all pages */
.site-footer {
  width: 100%;
  max-width: 100%;
  margin: 56px 0 0;
  padding: 32px 20px 20px;
  background-color: #5494cf;
  color: #f8f3e7;
  overflow-x: clip;
}

.site-footer *,
.footer-top > *,
.footer-bottom > * {
  min-width: 0;
}

.footer-top {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}

.footer-brand-block h3 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 0.95;
}

.footer-brand-block p,
.footer-contact p,
.footer-bottom p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.footer-brand-block p,
.footer-contact,
.footer-contact a,
.footer-bottom p {
  overflow-wrap: anywhere;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  align-content: start;
}

.footer-nav a,
.footer-contact a {
  color: #f8f3e7;
  text-decoration: none;
}

.footer-nav a {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-nav a:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.footer-contact {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-bottom {
  width: min(100%, 1120px);
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(248, 243, 231, 0.28);
  display: flex;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

body.theme-dark .site-footer {
  background-color: #243140;
}

body.theme-dark .footer-nav a,
body.theme-dark .footer-contact a,
body.theme-dark .footer-brand-block h3,
body.theme-dark .footer-brand-block p,
body.theme-dark .footer-bottom p {
  color: #e7edf5;
}

@media (max-width: 900px) {
  .site-footer {
    padding: 28px 16px 18px;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px 20px;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-footer {
    margin-top: 40px;
    padding: 24px 14px 18px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer-brand-block h3 {
    font-size: clamp(26px, 9vw, 38px);
  }

  .footer-brand-block p,
  .footer-contact p,
  .footer-bottom p,
  .footer-nav a {
    font-size: 15px;
    line-height: 1.5;
  }

  .footer-bottom {
    margin-top: 18px;
    padding-top: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
}