/* ============================================================
 * hc-embed.css  —  官网 Header / Footer 嵌入样式
 * ============================================================ */

/* --- CSS 变量 --- */
:root {
  --primary-blue: #192d78;
  --accent-gold: #c8410e;
  --accent-gold-hover: #a3330a;
  --dark-text: #333333;
  --light-text: #ffffff;
  --background-light: #f4f6fa;
  --body-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --title-font:
    "Playfair Display", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* --- 通用容器 --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   Header / 头部导航
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
}
.main-nav {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 10px 0;
  border-bottom: 1px solid rgba(25, 45, 120, 0.08);
  position: sticky;
  top: 0;
  z-index: 10000;
  box-shadow: 0 2px 12px rgba(25, 45, 120, 0.05);
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.main-nav.is-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom-color: rgba(25, 45, 120, 0.14);
  box-shadow: 0 8px 28px rgba(15, 28, 77, 0.09);
}
.main-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin-right: 0;
}
.logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  vertical-align: middle;
}
.logo h1,
.logo .site-title-text {
  font-size: 19px;
  font-weight: 500;
  color: var(--primary-blue);
  margin: 0;
  line-height: 1;
}

/* PC 端抽屉容器：作为弹性容器水平排列，主导航居中对称 */
.nav-drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}
.nav-links {
  margin: 0 auto;
  padding: 0 16px;
}
.nav-links ul {
  display: flex;
  gap: 30px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--dark-text);
  position: relative;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--primary-blue);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links .current-menu-item > a::after,
.nav-links .current-menu-ancestor > a::after,
.nav-links .current_page_item > a::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a,
.nav-links .current_page_item > a,
.nav-links a[aria-current="page"] {
  color: var(--primary-blue);
  font-weight: 500;
}

.nav-contact {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-search-link + .nav-contact {
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(25, 45, 120, 0.12);
}
.nav-search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--primary-blue);
  font-size: 13.5px;
  font-weight: 400;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.nav-search-link:hover {
  background-color: rgba(25, 45, 120, 0.06);
  color: var(--accent-gold);
}
.nav-search-link:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(25, 45, 120, 0.3);
}
.nav-search-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}
.nav-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.nav-contact-link:hover {
  background-color: rgba(25, 45, 120, 0.06);
  color: var(--accent-gold);
}
.nav-contact-icon {
  display: flex;
  align-items: center;
}
.nav-contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* 汉堡菜单按钮 (48x48px 触控标准，桌面端隐藏) */
.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 10002;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:active {
  background-color: rgba(0, 0, 0, 0.05);
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--primary-blue);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 移动端全屏半透明遮罩 */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 769px) {
  .nav-backdrop {
    display: none;
  }
}

/* 平板与中等宽度屏幕：缩小导航项间距并防止折行 */
@media (max-width: 1120px) {
  .nav-links ul {
    gap: 20px;
  }
  .nav-links a {
    white-space: nowrap;
    font-size: 14px;
  }
}

@media (min-width: 769px) and (max-width: 980px) {
  .nav-search-text {
    display: none;
  }
  .nav-links {
    padding: 0 10px;
  }
  .nav-links ul {
    gap: 14px;
  }
}

@media (min-width: 769px) and (max-width: 920px) {
  .logo img {
    height: 34px;
  }
  .nav-contact-text {
    display: none;
  }
  .nav-links ul {
    gap: 12px;
  }
  .nav-links a {
    font-size: 13.5px;
  }
}

/* 移动端响应式 (≤ 768px) */
@media (max-width: 768px) {
  .main-nav {
    height: 60px;
    padding: 0;
    background-color: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .main-nav .container {
    height: 60px;
    min-height: 60px;
    padding: 0 16px;
  }
  .logo img {
    height: 34px;
  }
  .nav-toggle {
    display: flex;
  }

  /* 抽屉式侧边栏 */
  .nav-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 70px 24px 30px;
    box-sizing: border-box;
    visibility: hidden;
    transition:
      right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.3s;
    overflow-y: auto;
  }
  .nav-drawer.is-open {
    right: 0;
    visibility: visible;
  }
  .nav-links {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .nav-links ul {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 100%;
  }
  .nav-links li {
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-links a {
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0;
    min-height: 48px;
    width: 100%;
  }
  .nav-links a::after {
    display: none;
  }
  .nav-contact,
  .nav-search-link + .nav-contact {
    margin-top: 24px;
    margin-left: 0;
    padding-top: 20px;
    padding-left: 0;
    border-top: 2px solid #f5f5f5;
    border-left: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav-search-link {
    justify-content: flex-start;
    font-size: 16px;
    padding: 10px 0;
    min-height: 48px;
    width: 100%;
  }
  .nav-contact-link {
    font-size: 16px;
    color: var(--primary-blue);
    font-weight: 500;
    padding: 10px 0;
    min-height: 48px;
    width: 100%;
  }
}

/* ============================================================
   Footer / 页脚样式 (精确匹配 footer.php 语义结构)
   ============================================================ */

.main-footer {
  background-color: var(--primary-blue, #192d78);
  color: #ffffff;
  padding: 48px 0 24px 0;
  font-size: 13px;
}
.main-footer .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 4 列网格布局 */
.footer-grid-optimized {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.8fr 2fr;
  gap: 40px;
  align-items: start;
}

/* 列标题 */
.footer-links h4,
.footer-contact-area h4,
.footer-qr-title,
.footer-partners-area h4 {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}
.footer-links h4::after,
.footer-contact-area h4::after,
.footer-qr-title::after,
.footer-partners-area h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background-color: var(--accent-gold, #c8410e);
}

/* 1. 二维码区域 */
.footer-qr-wrapper {
  display: flex;
  align-items: center;
}
.footer-qr-code img {
  border-radius: 6px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block;
}

/* 2. 快速导航 */
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  color: #d0d5dd;
  transition:
    color 0.25s ease,
    padding-left 0.25s ease;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

/* 3. 合作伙伴列表 */
.footer-partners-area {
  min-width: 0;
}
.footer-partner-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-partner-list li {
  margin: 0;
  padding: 0;
}
.footer-partner-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: #d0d5dd;
  transition: all 0.25s ease;
}
.footer-partner-link:hover {
  color: #ffffff;
  padding-left: 4px;
}
.footer-partner-link .partner-domain {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}
.footer-partner-link .partner-arrow {
  width: 12px;
  height: 12px;
  stroke: var(--accent-gold, #c8410e);
  opacity: 0.8;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.footer-partner-link:hover .partner-domain {
  color: #ff9b73;
}
.footer-partner-link:hover .partner-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}
.footer-partner-link .partner-desc {
  font-size: 12.5px;
  color: #98a2b3;
  line-height: 1.5;
  transition: color 0.25s ease;
}
.footer-partner-link:hover .partner-desc {
  color: #e0e5ed;
}

/* 4. 联系方式列表 */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #d0d5dd;
  line-height: 1.6;
}
.footer-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 2px;
}
.footer-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-gold, #c8410e);
}
.footer-contact-list a {
  color: #ffffff;
  font-weight: 500;
  transition: color 0.25s ease;
}
.footer-contact-list a:hover {
  color: #ff9b73;
}

/* 底部版权与法律声明条 */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
}

/* 法律声明菜单 */
.footer-corporate-nav .footer-corporate-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.footer-corporate-menu-list a {
  color: #d0d5dd;
  transition: color 0.25s ease;
}
.footer-corporate-menu-list a:hover {
  color: #ffffff;
}

/* TCSP 牌照声明 */
.footer-tcsp-license {
  margin: 0;
  color: #d0d5dd;
}
.footer-tcsp-license a {
  color: #ffffff;
  font-weight: 500;
  text-decoration: underline;
}
.footer-tcsp-hint {
  color: #98a2b3;
  font-size: 12px;
}

.copyright-text {
  margin: 0;
  color: #98a2b3;
}

/* 响应式适配 */
@media (max-width: 992px) {
  .footer-grid-optimized {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}
@media (max-width: 600px) {
  .footer-grid-optimized {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .main-footer {
    padding: 40px 0 20px 0;
  }
  .footer-corporate-menu-list {
    gap: 12px;
  }
}
