/* ==========================================================================
   页脚：左侧主办单位链接 / 右侧字标与官方账号，底部版权、备案与法律信息
   取色沿用主站：纸面底 + 金爵金（取自 logo 主色 #d3ac2e）+ 品牌红
   ========================================================================== */

.siff-footer {
  --sf-brand: #b61b11;
  --sf-gold: #d3ac2e;
  --sf-ink: #2c2c2a;
  --sf-ink-2: #5f5e5a;
  --sf-ink-3: #8b897f;
  --sf-paper: #f7f5f0;
  --sf-line: rgba(44, 44, 42, .12);

  position: relative;
  background: var(--sf-paper);
  color: var(--sf-ink);
  font-family: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

/* 顶部金线：从左端实金渐变到细线，作为页脚的“收边” */
.siff-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sf-gold) 0%, rgba(211, 172, 46, .35) 26%, rgba(44, 44, 42, .1) 62%, rgba(44, 44, 42, .1) 100%);
}

.siff-footer__inner {
  width: min(1600px, calc(100vw - 96px));
  margin: 0 auto;
}

.siff-footer a {
  color: inherit;
  text-decoration: none;
}

.siff-footer__grid {
  display: grid;
  /* 左右各占一半：主办单位链接排在左半，字标与官方账号靠右 */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  padding: 62px 0 46px;
}

/* ---------- 左：主办单位链接 ---------- */

/* 只留一组链接：竖排，顶端与右侧字标齐平，不再分栏 */
.siff-footer__nav {
  align-self: start;
}

.siff-footer__list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.siff-footer__list a {
  position: relative;
  display: inline-block;
  padding-bottom: 1px;
  color: var(--sf-ink-2);
  font-size: 14px;
  line-height: 1.5;
  transition: color .25s ease;
}

/* 悬停：下划线由左向右展开，与首页/概述页的动效语言一致 */
.siff-footer__list a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}

.siff-footer__list a:hover,
.siff-footer__list a:focus {
  color: var(--sf-brand);
}

.siff-footer__list a:hover::after,
.siff-footer__list a:focus::after {
  transform: scaleX(1);
}

.siff-footer__list a:focus-visible {
  outline: 2px solid var(--sf-brand);
  outline-offset: 3px;
}

/* ---------- 右：字标与官方账号 ---------- */

.siff-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  justify-self: end;
}

/* 页脚字标：logo-footer.png 是整块画板导出（1769×529，四周各留约 10.6% 透明边，
   实际内容 1393×153），所以按「可见宽度」建一个裁切框，图片放大后用负边距把透明边推出去，
   这样字标本体的顶边 / 右边才和页脚其他元素对得齐。改可见宽度只需改 --sf-logo-w。 */
.siff-footer__logo {
  --sf-logo-w: 340px;

  display: block;
  width: var(--sf-logo-w);
  height: calc(var(--sf-logo-w) * 153 / 1393);
  overflow: hidden;
}

.siff-footer__logo img {
  display: block;
  width: calc(var(--sf-logo-w) * 1769 / 1393);
  max-width: none;
  height: auto;
  margin: calc(var(--sf-logo-w) * -188 / 1393) 0 0 calc(var(--sf-logo-w) * -188 / 1393);
}

.siff-footer__rule {
  display: block;
  width: 40px;
  height: 2px;
  margin: 20px 0 14px;
  background: var(--sf-gold);
}

.siff-footer__brand-en {
  margin: 0;
  color: var(--sf-ink-3);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.siff-footer__social {
  display: flex;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.siff-footer__social a {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--sf-line);
  border-radius: 10px;
  background: #fff;
  place-items: center;
  transition: background .3s ease, border-color .3s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}

.siff-footer__social img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.siff-footer__social a:hover {
  border-color: var(--sf-ink);
  background: var(--sf-ink);
  transform: translateY(-2px);
}

.siff-footer__social a:hover img {
  filter: brightness(0) invert(1);
}

.siff-footer__social a:focus-visible {
  outline: 2px solid var(--sf-brand);
  outline-offset: 3px;
}

/* ---------- 底部：版权 / 备案 / 法律信息 ---------- */

.siff-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 32px;
  padding: 17px 0 22px;
  border-top: 1px solid var(--sf-line);
  color: var(--sf-ink-3);
  font-size: 12.5px;
  line-height: 1.7;
}

.siff-footer__copy {
  margin: 0;
}

.siff-footer__legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.siff-footer__legal a {
  transition: color .25s ease;
}

.siff-footer__legal a:hover,
.siff-footer__legal a:focus {
  color: var(--sf-ink);
}

.siff-footer__mps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.siff-footer__mps img {
  display: block;
  width: 14px;
  height: 14px;
}

/* ---------- 响应式 ---------- */

@media only screen and (max-width: 1200px) {
  .siff-footer__inner {
    width: calc(100vw - 48px);
  }

  .siff-footer__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 48px 0 36px;
  }

  /* 堆叠后栏目恢复整行宽度 */
  .siff-footer__nav {
    width: 100%;
  }

  .siff-footer__brand {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--sf-line);
    justify-self: stretch;
  }
}

@media only screen and (max-width: 900px) {
  .siff-footer__brand {
    flex-wrap: wrap;
    gap: 28px;
  }
}

@media only screen and (max-width: 640px) {
  .siff-footer__inner {
    width: calc(100vw - 32px);
  }

  .siff-footer__grid {
    padding: 40px 0 28px;
  }

  .siff-footer__list {
    gap: 9px;
  }

  .siff-footer__list a {
    font-size: 13.5px;
  }

  .siff-footer__brand {
    flex-direction: column;
    gap: 26px;
  }

  .siff-footer__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0 20px;
  }

  .siff-footer__legal {
    gap: 4px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .siff-footer__list a::after,
  .siff-footer__social a {
    transition: none !important;
  }
}
