﻿.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(14px);
  background: #213D63;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 32;
  flex-shrink: 0;
}

.site-header .brand img {
  height: 38px;
  width: auto;
  display: block;
}

/* ===== 核心：导航 + 下划线动画 ===== */
.site-header .nav {
  display: flex;
  align-items: center;
  gap: 26px;
  overflow: visible;
}

.site-header .nav a {
  position: relative;
  text-decoration: none;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  transition: color .25s ease;
}

/* 下划线（默认隐藏） */
.site-header .nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transform: translateX(-50%);
  transition: width .28s ease;
}

/* hover 和 active */
.site-header .nav a:hover,
.site-header .nav a.active {
  color: #ffffff;
}

/* 下划线展开动画 */
.site-header .nav a:hover::after,
.site-header .nav a.active::after {
  width: 100%;
}

/* CTA */
.header-cta {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .2s ease, transform .2s ease;
}

.header-cta:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

/* ===== 移动菜单 ===== */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 35;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle .bar {
  position: absolute;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .28s ease, opacity .2s ease, top .28s ease;
}

.menu-toggle .bar:nth-child(1) { top: 14px; }
.menu-toggle .bar:nth-child(2) { top: 21px; }
.menu-toggle .bar:nth-child(3) { top: 28px; }

.menu-toggle.active .bar:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ===== 移动端 ===== */
@media (max-width: 950px) {

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-header .nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: rgba(8, 19, 29, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    z-index: 34;
  }

  .site-header .nav.open {
    display: flex;
  }

  .site-header .nav a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
  }

  /* ❗移动端关闭下划线 */
  .site-header .nav a::after {
    display: none;
  }

  .site-header .nav a:hover,
  .site-header .nav a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(1240px, calc(100% - 24px));
  }
}

/* ===== Footer ===== */
.site-footer {
  width: 100%;
  font-size: 15px;
  background: #213D63;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 20px;
  padding: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.8fr 1fr;
  gap: 30px;
  padding: 64px 0 40px;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
}

.footer-col a:hover {
  color: #fff;
}

.footer-col p {
  margin: 0;
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  padding: 14px 10px;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  text-align: center;
}

.footer-bottom img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
}

@media (max-width: 950px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid .footer-col:nth-child(2),
  .footer-grid .footer-col:nth-child(3) {
    display: none;
  }
}