/**
 * sinopak/footer block styles — mirror of prototype .footer / .footer-grid /
 * .footer-brand / .social / .footer-bottom (+ polish pass padding).
 *
 * Breakpoints: 1180 / 760 (prototype @media breaks, no new ones).
 * Shell width is the prototype --shell (self-contained here so the block
 * does not depend on global-file changes).
 */
@layer spk-block {
  .spk-x-footer {
    padding: clamp(46px, 4.6vw, 66px) 0 24px;
    color: #fff;
    background: linear-gradient(112deg, #063b59 0%, #063052 46%, #061f4d 100%);
    font-family: var(--wp--preset--font-family--primary, "Helvetica Neue", Arial, sans-serif);
  }

  .spk-x-footer__shell {
    width: min(100% - clamp(64px, 12vw, 260px), 1250px);
    margin: 0 auto;
  }

  .spk-x-footer__grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.12fr) minmax(150px, 0.86fr) minmax(148px, 0.78fr) minmax(172px, 0.9fr) minmax(225px, 0.96fr);
    gap: clamp(26px, 3vw, 48px);
    align-items: start;
  }

  /* ── Brand column ── */
  .spk-x-footer__brand img {
    display: block;
    width: 176px;
    height: auto;
    aspect-ratio: 544 / 107;
    object-fit: contain;
    margin-bottom: 22px;
  }
  .spk-x-footer__brand strong,
  .spk-x-footer__grid nav strong,
  .spk-x-footer__social p {
    display: block;
    color: rgba(255, 255, 255, 0.96);
    font-weight: 900;
    text-transform: uppercase;
  }
  .spk-x-footer__brand strong {
    margin-bottom: 18px;
    font-size: clamp(15px, 0.95vw, 18px);
    letter-spacing: 0.13em;
  }
  .spk-x-footer__brand p {
    max-width: 300px;
    margin: 0;
    line-height: 1.5;
  }
  .spk-x-footer__brand p:first-of-type {
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(14px, 0.9vw, 16px);
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  .spk-x-footer__brand p:last-of-type {
    color: rgba(220, 232, 240, 0.7);
    font-size: clamp(13px, 0.82vw, 15px);
    font-weight: 650;
  }

  /* ── Nav columns ── */
  .spk-x-footer__grid nav strong,
  .spk-x-footer__social p {
    margin-bottom: 15px;
    font-size: clamp(12px, 0.78vw, 14px);
    letter-spacing: 0.14em;
  }
  .spk-x-footer__grid nav a {
    display: block;
    padding: 6px 0;
    color: rgba(222, 233, 241, 0.76);
    font-size: clamp(12px, 0.82vw, 15px);
    font-weight: 720;
    letter-spacing: -0.012em;
    line-height: 1.38;
    transition: color 0.18s ease, transform 0.18s ease;
  }
  /* 社交按钮排除在外(它们有各自的品牌 hover 色 + translateY 位移),
     否则这条更高特异度的 nav 规则会把品牌色压成白色。 */
  .spk-x-footer__grid nav a:not(.spk-x-footer__social-link):hover,
  .spk-x-footer__grid nav a:not(.spk-x-footer__social-link):focus-visible {
    color: #fff;
    transform: translateX(3px);
  }
  .spk-x-footer__grid nav:nth-of-type(3) {
    transform: translateX(-8px);
  }

  /* ── Social ── */
  .spk-x-footer__social {
    margin-top: 24px;
  }
  .spk-x-footer__social p {
    margin: 0 0 10px;
  }
  .spk-x-footer__social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
  }
  .spk-x-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: rgba(220, 232, 240, 0.76);
    line-height: 1;
    transform-origin: 50% 50%;
    transition: color 0.18s ease, transform 0.18s ease;
  }
  .spk-x-footer__social-link:hover,
  .spk-x-footer__social-link:focus-visible {
    transform: translateY(-1px);
  }
  .spk-x-footer__social-link svg {
    display: block;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    fill: currentColor;
  }
  .spk-x-footer__social-link--facebook:hover,
  .spk-x-footer__social-link--facebook:focus-visible {
    color: #1877f2;
  }
  .spk-x-footer__social-link--linkedin:hover,
  .spk-x-footer__social-link--linkedin:focus-visible {
    color: #0a66c2;
  }
  .spk-x-footer__social-link--youtube:hover,
  .spk-x-footer__social-link--youtube:focus-visible {
    color: #ff0000;
  }

  /* ── Bottom bar ── */
  .spk-x-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: clamp(34px, 4vw, 52px);
    border-top: 1px solid rgba(185, 211, 226, 0.2);
    padding-top: 18px;
    padding-right: 76px;
    color: rgba(220, 232, 240, 0.58);
    font-size: 12px;
    line-height: 1.45;
  }
  .spk-x-footer__policy {
    display: flex;
    gap: 18px;
  }
  .spk-x-footer__policy a {
    color: rgba(220, 232, 240, 0.62);
    transition: color 0.18s ease;
  }
  .spk-x-footer__policy a:hover,
  .spk-x-footer__policy a:focus-visible {
    color: #fff;
  }
}

@layer spk-responsive {
  @media (max-width: 1180px) {
    .spk-x-footer__grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 760px) {
    .spk-x-footer__shell {
      width: min(100% - 34px, 1500px);
    }
    .spk-x-footer__grid {
      grid-template-columns: 1fr;
    }
    .spk-x-footer__grid nav:nth-of-type(3),
    .spk-x-footer__grid nav:last-child {
      transform: none;
    }
    .spk-x-footer__bottom {
      flex-direction: column;
      padding-right: 58px;
    }
  }
}
