.footer {
  position: relative;
  overflow: hidden;
  padding: 34px 0 14px;
  background: linear-gradient(135deg, #123a30 0%, #10342b 56%, #0d2d25 100%);
  color: #cedbd4;
}

.footer::before,
.footer::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.footer::before {
  right: -165px;
  top: -290px;
  width: 590px;
  height: 590px;
  border: 1px solid rgba(211, 173, 93, .2);
  background: rgba(148, 171, 83, .05);
}

.footer::after {
  left: 42%;
  bottom: -380px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, .045);
}

.footer-main,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .7fr) minmax(0, 1.45fr);
  gap: 20px 28px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.footer-intro,
.footer-links,
.footer-aside,
.footer-qr,
.footer-contact {
  min-width: 0;
  max-width: 100%;
}

.footer-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
}

.footer-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.footer h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 22px;
  line-height: 1.35;
}

.footer-intro p {
  max-width: 34em;
  margin: 0;
  color: #c6d4cc;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.footer-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-values a {
  display: block;
  padding: 6px 11px;
  border: 1px solid rgba(211, 173, 93, .32);
  color: #d9c388;
  font-size: 12px;
  letter-spacing: .04em;
  transition: color .2s, border-color .2s, background-color .2s;
}

.footer-values a:hover,
.footer-values a:focus-visible {
  border-color: rgba(211, 173, 93, .7);
  background: rgba(211, 173, 93, .1);
  color: #fff1c8;
}

.footer-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.footer-link-grid a {
  position: relative;
  padding-left: 12px;
  color: #dbe5df;
  font-size: 13px;
  line-height: 1.4;
  transition: color .2s;
}

.footer-link-grid a::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.footer-link-grid a:hover {
  color: var(--gold);
}

.footer-contact dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.footer-contact dl > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

.footer-contact dt {
  color: #b5c882;
  white-space: nowrap;
}

.footer-contact dd {
  min-width: 0;
  margin: 0;
  color: #e5ece8;
  overflow-wrap: break-word;
  word-break: normal;
}

.footer-contact dd a {
  white-space: normal;
  overflow-wrap: anywhere;
}

.footer a {
  color: inherit;
}

/* WeChat card: title / QR / caption — matches reference */
.footer-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: auto;
  max-width: 100%;
  padding: 20px 22px 18px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  background: rgba(8, 36, 29, .55);
  box-sizing: border-box;
}

.footer-qr-image {
  order: 2;
  width: 118px;
  height: 118px;
  margin: 0;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.footer-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.footer-qr strong {
  order: 1;
  display: block;
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .04em;
}

.footer-qr span {
  order: 3;
  display: block;
  margin: 0;
  color: rgba(220, 230, 224, .78);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px 16px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  color: #aebeb6;
  font-size: 12px;
  max-width: 100%;
}

.footer-bottom > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}

.footer-bottom nav > * {
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, .13);
}

.footer-bottom nav > :first-child {
  border-left: 0;
}

.footer-bottom nav > :last-child {
  padding-right: 0;
}

.footer a:hover {
  color: var(--gold);
}

/* Keep contact as a single tidy column — avoids phone/address mid-wrap */
@media (min-width: 1281px) {
  .footer-aside {
    align-items: start;
    gap: 16px 22px;
  }

  .footer-contact dl {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (max-width: 1200px) {
  .footer {
    padding: 36px 0 16px;
  }

  .footer-main {
    gap: 16px 18px;
  }

  .footer h2 {
    margin: 0 0 8px;
    font-size: 18px;
  }

  .footer-intro p {
    max-width: 28em;
    font-size: 13px;
    line-height: 1.65;
  }

  .footer-bottom {
    margin-top: 20px;
  }
}

/* Tablet / mid desktop: intro | links; contact+wechat full-width band */
@media (max-width: 1280px) {
  .footer {
    padding: 28px 0 14px;
  }

  .footer::before,
  .footer::after {
    display: none;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr);
    gap: 14px 20px;
  }

  .footer-intro {
    grid-column: 1;
  }

  .footer-links {
    grid-column: 2;
  }

  .footer-aside {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 24px;
    align-items: center;
    margin-top: 2px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .footer-kicker {
    margin-bottom: 4px;
    letter-spacing: .08em;
  }

  .footer h2 {
    margin: 0 0 6px;
    font-size: 17px;
  }

  .footer-intro p {
    max-width: none;
    font-size: 13px;
    line-height: 1.55;
  }

  .footer-values {
    gap: 6px;
    margin-top: 10px;
  }

  .footer-values a {
    padding: 4px 8px;
    font-size: 11px;
  }

  .footer-link-grid {
    gap: 6px 10px;
  }

  .footer-link-grid a {
    font-size: 12px;
  }

  .footer-contact dl {
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }

  .footer-contact dl > div {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 14px;
  }

  .footer-qr {
    padding: 18px 20px 16px;
    gap: 10px;
  }

  .footer-qr-image {
    width: 110px;
    height: 110px;
    padding: 7px;
  }

  .footer-qr strong {
    font-size: 16px;
  }

  .footer-qr span {
    font-size: 12px;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 14px;
    padding-top: 10px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 14px 0 10px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .footer-intro,
  .footer-links,
  .footer-aside {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border-bottom: 0;
  }

  .footer-intro {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .footer-links {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .footer-kicker {
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: .1em;
  }

  .footer h2 {
    margin: 0 0 6px;
    font-size: 16px;
  }

  .footer-intro p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
  }

  .footer-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 8px;
  }

  .footer-values a {
    display: block;
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0;
  }

  .footer-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 5px;
  }

  .footer-link-grid a {
    font-size: 13px;
    line-height: 1.3;
  }

  /* Contact + WeChat side by side — fill the row, no empty right band */
  .footer-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    align-items: center;
  }

  .footer-contact {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .footer-contact h2 {
    margin: 0 0 6px;
    font-size: 15px;
  }

  .footer-contact dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    margin: 0;
  }

  .footer-contact dl > div {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 14px;
    align-items: baseline;
    font-size: 12px;
    line-height: 1.4;
  }

  .footer-contact dt {
    white-space: nowrap;
  }

  .footer-contact dd {
    min-width: 0;
    margin: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .footer-contact dd a {
    white-space: normal;
  }

  /* Compact vertical WeChat card beside contact */
  .footer-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: fit-content;
    max-width: 7.5rem;
    box-sizing: border-box;
    margin: 0;
    gap: 6px;
    padding: 10px 12px 9px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    background: rgba(7, 32, 26, .62);
  }

  .footer-qr-image {
    order: 2;
    width: 84px;
    height: 84px;
    margin: 0;
    padding: 5px;
    border-radius: 10px;
  }

  .footer-qr strong {
    order: 1;
    align-self: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .03em;
  }

  .footer-qr span {
    order: 3;
    align-self: center;
    max-width: 6.5em;
    color: rgba(220, 230, 224, .78);
    font-size: 11px;
    line-height: 1.3;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 11px;
    line-height: 1.4;
  }

  .footer-bottom nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 0;
    margin-top: 0;
  }

  .footer-bottom nav > * {
    padding: 0 8px;
  }

  .footer-bottom nav > :first-child {
    padding-left: 0;
  }
}

@media (max-width: 360px) {
  .footer {
    padding: 12px 0 8px;
  }

  .footer-main {
    gap: 10px;
  }

  .footer-intro,
  .footer-links {
    padding-bottom: 10px;
  }

  .footer h2 {
    font-size: 15px;
  }

  .footer-contact h2 {
    font-size: 14px;
  }

  .footer-values a {
    padding: 5px 2px;
    font-size: 10px;
  }

  .footer-aside {
    gap: 8px;
  }

  .footer-contact dl > div {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px 12px;
    font-size: 11px;
  }

  .footer-qr {
    max-width: 6.5rem;
    padding: 8px 9px 7px;
    gap: 5px;
    border-radius: 12px;
  }

  .footer-qr-image {
    width: 72px;
    height: 72px;
    padding: 4px;
  }

  .footer-qr strong {
    font-size: 12px;
  }

  .footer-qr span {
    font-size: 10px;
    max-width: 5.8em;
  }

  .footer-bottom nav > * {
    padding: 0 6px;
  }
}
