/* ==========================================================================
   base.css — 重置、公共变量、页头、页脚（全站复用）
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #004c87;
  --color-primary-dark: #078585;
  --color-primary-darker: #056b6b;
  --color-primary-darkest: #045555;
  --color-nav-bg: #0c7bb2;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-white: #ffffff;
  --color-bg-light: #f5f5f5;
  --color-border: #e0e0e0;
  --font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --container-width: 90%;
  --header-height: 118px;
  --nav-height: 48px;
  --transition: 0.3s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  opacity: 0.85;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* ---------- 页头 ---------- */
.site-header {
  position: relative;
  z-index: 1000;
  background: var(--color-white);
}

.header-top {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.header-brand:hover {
  opacity: 1;
}

.header-brand-logo {
  height: 100px;
  width: auto;
  flex-shrink: 0;
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 280px;
  max-width: 420px;
}

.brand-line {
  display: block;
  width: 100%;
  text-align: justify;
  text-align-last: justify;
  color: var(--color-primary);
  line-height: 1.45;
}

.brand-cn {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-en {
  font-size: 20px;
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: 26px;
  font-weight: 600;
  white-space: nowrap;
}

.header-phone .iconfont {
  font-size: 28px;
  line-height: 1;
}

.header-search {
  display: flex;
  align-items: stretch;
}

.header-search input {
  width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--color-primary);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}

.header-search input:focus {
  border-color: var(--color-primary-dark);
}

.header-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  background: var(--color-primary);
  border-radius: 0 4px 4px 0;
  transition: background var(--transition);
}

.header-search button:hover {
  background: var(--color-primary-dark);
}

.header-search button .iconfont {
  font-size: 20px;
  color: var(--color-white);
  line-height: 1;
}

/* 主导航 */
.main-nav {
  background: var(--color-nav-bg);
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  flex: 1;
  justify-content: center;
}

.nav-list > li {
  position: relative;
  flex: 1;
  text-align: center;
}

.nav-list > li > a {
  display: block;
  padding: 16px 10px;
  color: var(--color-white);
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition);
  letter-spacing: 0.5px;
}

.nav-list > li > a:hover,
.nav-list > li.active > a,
.nav-list > li:hover > a {
  background: rgba(0, 0, 0, 0.15);
}

/* 二级下拉菜单（与一级栏目同宽） */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  transform: translateY(8px);
  background: var(--color-white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
  padding: 8px 0;
  box-sizing: border-box;
}

.nav-list > li.has-dropdown:hover > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li a {
  display: block;
  padding: 10px 12px;
  color: var(--color-text);
  font-size: 16px;
  white-space: nowrap;
  text-align: center;
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown li a:hover {
  background: var(--color-bg-light);
  color: var(--color-primary);
  opacity: 1;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav-lang a {
  padding: 6px 10px;
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
}

.nav-lang a.active,
.nav-lang a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 50px;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--color-white);
}

.footer-main {
  padding: 20px 0 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-info {
  flex: 1;
}

.footer-contact p {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 2;
  margin-bottom: 4px;
}

.footer-contact strong {
  color: var(--color-text);
}

.footer-qr {
  display: flex;
  gap: 30px;
  flex-shrink: 0;
}

.footer-qr-item {
  text-align: center;
}

.footer-qr-item img {
  width: 120px;
  height: 120px;
  margin: 0 auto 8px;
}

.footer-qr-item span {
  font-size: 12px;
  color: var(--color-text-light);
}

.footer-bar {
  background: var(--color-nav-bg);
  padding: 12px 0;
  text-align: center;
}

.footer-bar p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.footer-bar a {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 8px;
}

.footer-bar a:hover {
  color: var(--color-white);
  opacity: 1;
}

/* 区块标题（公共） */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--color-primary);
}

.section-header p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* 按钮 */
.btn-outline {
  display: inline-block;
  padding: 8px 28px;
  border: 1px solid var(--color-primary);
  border-radius: 20px;
  color: var(--color-primary);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  opacity: 1;
}
