/* Footer layout is loaded after mobile-navigation.css to keep the compact footer authoritative. */
body .site-footer {
  padding: 42px max(36px, calc((100vw - 1208px) / 2)) 20px !important;
}

body .site-footer .footer-main {
  grid-template-columns: 1.2fr 1.05fr 1fr 1fr !important;
  gap: 32px !important;
}

body .site-footer .footer-bottom {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 18px !important;
  margin-top: 30px !important;
  padding-top: 18px !important;
}

body .site-footer .footer-bottom > span:first-child {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}

body .site-footer .footer-creator {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  color: #bdcfc5;
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

body .site-footer .footer-bottom-spacer { grid-column: 1; grid-row: 1; }

@media (max-width: 760px) {
  body .site-footer {
    padding: 28px 18px 20px !important;
  }

  body .site-footer .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-areas: "brand brand" "contact company" "legal legal";
    gap: 20px 16px !important;
  }

  body .site-footer .footer-main > div {
    order: 0 !important;
    min-width: 0;
    text-align: center;
  }

  body .site-footer .footer-main .footer-brand { grid-area: brand !important; }
  body .site-footer .footer-main .footer-contact { grid-area: contact !important; }
  body .site-footer .footer-main .footer-company { grid-area: company !important; }
  body .site-footer .footer-legal {
    grid-area: legal !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 16px;
    border-top: 1px solid #ffffff20;
    padding-top: 18px;
  }

  body .site-footer .footer-legal h3 { grid-column: 1 / -1; margin-bottom: 6px !important; }
  body .site-footer .footer-main .footer-legal a {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: auto !important;
    min-height: 40px !important;
    padding: 5px 4px !important;
    margin: 0 !important;
    line-height: 1.4;
  }

  body .site-footer h3 { margin-bottom: 8px !important; font-size: 11px !important; letter-spacing: .06em; }
  body .site-footer p { margin: 0 !important; line-height: 1.55 !important; }
  body .site-footer a { font-size: 13px !important; }
  body .site-footer p { font-size: 13px !important; }
  body .site-footer .footer-main .footer-logo {
    display: inline-flex !important;
    justify-content: center;
    width: auto !important;
    min-height: 44px;
    margin: 0 auto !important;
    padding: 0 !important;
    font-size: 18px !important;
  }
  body .site-footer .footer-logo img { width: 36px; height: 34px; object-fit: contain; }
  body .site-footer .footer-brand p { margin-top: 8px !important; font-size: 13px !important; }
  body .site-footer .footer-main .footer-contact a {
    display: flex !important;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 4px 0 !important;
    margin: 0 !important;
  }
  body .site-footer .footer-contact p { margin-top: 4px !important; }
  body .site-footer .footer-company p + p { margin-top: 12px !important; }

  body .site-footer .footer-bottom {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 8px !important;
    margin-top: 16px !important;
    padding-top: 14px !important;
    text-align: center;
  }

  body .site-footer .footer-bottom > span:first-child { grid-column: 1; grid-row: 1; }
  body .site-footer .footer-creator { grid-column: 1; grid-row: 2; justify-self: center; text-align: center; }
  body .site-footer .footer-bottom-spacer { display: none; }
}

@media (max-width: 340px) {
  body .site-footer { padding-inline: 14px !important; }
  body .site-footer .footer-main { gap: 18px 10px !important; }
  body .site-footer .footer-legal { column-gap: 10px; }
  body .site-footer .footer-legal a,
  body .site-footer .footer-contact a { font-size: 13px !important; }
}
