/* ===========================================================
   晶昊能源官网 - 前台样式
   =========================================================== */

:root {
  --ink: #061225;
  --navy: #0e1f44;
  /* 主色取自 LOGO：深钴蓝 + 翠绿 */
  --primary: #173f9e;
  --primary-dark: #0e2a78;
  --primary-light: #2f5ad1;
  --accent: #6dc24a;
  --accent-dark: #4ea02a;
  --accent-light: #94d96e;
  --muted: #5c6b82;
  --line: #e6ebf3;
  --soft: #f5f8fd;
  --shadow-sm: 0 4px 16px rgba(11, 31, 58, .06);
  --shadow-md: 0 12px 32px rgba(11, 31, 58, .1);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, .16);
  --radius: 18px;
  --topbar-h: 38px;
  --navbar-h: 64px;
}

/* 页面主体宽度：默认 Bootstrap xxl 为 1320px，这里统一放大到 1380px */
@media (min-width: 1400px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl { max-width: 1380px; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #22303f;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--navbar-h);
}
@media (min-width: 992px) {
  body { padding-top: calc(var(--topbar-h) + var(--navbar-h)); }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-brand { background: linear-gradient(135deg, var(--primary-dark), var(--primary) 45%, var(--accent)) !important; }

.btn-brand {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; border: 0; padding: .75rem 1.75rem; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(23, 63, 158, .28);
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(23, 63, 158, .36); }
.btn-outline-brand { border: 1px solid rgba(255, 255, 255, .55); color: #fff; border-radius: 999px; padding: .75rem 1.75rem; }
.btn-outline-brand:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------------------------------------------------- 顶部 */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1030;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header .topbar { font-size: .875rem; color: rgba(255, 255, 255, .82); height: var(--topbar-h); }
.site-header .topbar a { color: rgba(255, 255, 255, .82); }
.site-header .topbar a:hover { color: #fff; }
.site-header.is-solid .topbar { background: var(--primary-dark); }
.site-header.is-transparent .topbar { background: rgba(11, 31, 58, .72); }
.site-header.is-transparent {
  background: transparent;
  box-shadow: none;
}
.site-header.is-solid {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.navbar-site { min-height: var(--navbar-h); padding-top: .35rem; padding-bottom: .35rem; transition: background .3s ease; }
.brand-logo { height: 42px; width: auto; object-fit: contain; }
.navbar-brand { gap: .6rem !important; }
.brand-text { line-height: 1.1; }
.brand-text > span:first-child { font-size: 1.05rem; }
.brand-en { font-size: .65rem; letter-spacing: .12em; opacity: .7; }
@media (max-width: 1199px) {
  .brand-en { display: none; }
}
@media (max-width: 991px) {
  .brand-text > span:first-child { font-size: 1rem; }
}
/* 默认（白底/实色头部）显示原色 Logo；首页顶部透明头部时显示白色 Logo */
.brand-logo-white { display: none; }
.site-header.is-transparent .brand-logo-color { display: none; }
.site-header.is-transparent .brand-logo-white { display: block; }
.navbar-site .navbar-brand { font-weight: 800; letter-spacing: .06em; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(23, 63, 158, .32); }

.site-header.is-transparent .navbar-site .nav-link,
.site-header.is-transparent .navbar-site .navbar-brand,
.site-header.is-transparent .navbar-site .navbar-toggler { color: #fff; }
.site-header.is-solid .navbar-site .nav-link,
.site-header.is-solid .navbar-site .navbar-brand { color: #1c2b3a; }
.navbar-site .nav-link {
  font-weight: 600;
  font-size: 14px;
  padding: .45rem .6rem !important;
  position: relative;
  white-space: nowrap;
}
.navbar-site .nav-link::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .15rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.navbar-site .nav-link:hover::after, .navbar-site .nav-link.active::after { transform: scaleX(1); }
.site-header.is-transparent .nav-link::after { background: linear-gradient(90deg, var(--accent-light), var(--accent)); }

.search-pill {
  border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .32);
  width: 200px;
}
.search-pill input { font-size: 13px; }
@media (min-width: 1400px) { .search-pill { width: 220px; } }
.search-pill input { color: #fff; }
.search-pill input::placeholder { color: rgba(255, 255, 255, .75); }
.search-pill button { color: #fff; }
.site-header.is-solid .search-pill { background: var(--soft); border-color: var(--line); }
.site-header.is-solid .search-pill input { color: #22303f; }
.site-header.is-solid .search-pill input::placeholder { color: var(--muted); }
.site-header.is-solid .search-pill button { color: var(--primary); }

.dropdown-menu { border: 0; border-radius: 14px; box-shadow: var(--shadow-md); padding: .5rem; }
.dropdown-item { border-radius: 10px; font-weight: 500; }
.dropdown-menu li { position: relative; }
.dropdown-menu .dropdown-menu { top: -6px; left: 100%; margin-left: .15rem; min-width: 180px; }

/* 桌面端：鼠标悬停展开下拉；父级链接点击直接进入列表页 */
@media (min-width: 992px) {
  .hover-dropdown > .dropdown-menu {
    display: block; margin-top: 0;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  /* 悬停时保证鼠标从链接移到菜单的“桥接区”不中断 */
  .hover-dropdown > .dropdown-menu::before {
    content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  }
  .hover-dropdown:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .dropdown-menu .dropdown-menu { display: none; }
  .dropdown-menu li:hover > .dropdown-menu { display: block; }
}
@media (max-width: 991px) {
  /* 移动端不展开下拉，点击父级直接进入列表页（分类可在列表页筛选） */
  .hover-dropdown > .dropdown-menu { display: none !important; }
  .dropdown-menu .dropdown-menu { position: static; box-shadow: none; padding-left: 1rem; border-left: 2px solid var(--line); border-radius: 0; }
}

/* ---------------------------------------------------- Hero */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden;
  background: radial-gradient(1200px 600px at 12% 18%, rgba(109, 194, 74, .35), transparent 60%),
              radial-gradient(900px 700px at 88% 10%, rgba(23, 63, 158, .55), transparent 60%),
              linear-gradient(160deg, #0a1f5c 0%, #0e2a78 45%, #0a1f4a 100%);
  color: #fff; padding-top: 4rem; padding-bottom: 6rem;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%);
}
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; }
/* 首页：透明头部叠加在 Hero 之上，Hero 自身预留头部高度 */
body.home-page { padding-top: 0; }
.hero { padding-top: calc(var(--navbar-h) + 2rem); }
@media (min-width: 992px) {
  .hero { padding-top: calc(var(--topbar-h) + var(--navbar-h) + 2.5rem); }
}

.hero-title { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 800; line-height: 1.18; letter-spacing: -.5px; }
.hero-sub { color: rgba(255, 255, 255, .78); max-width: 620px; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); font-size: .82rem; letter-spacing: .04em; }
.hero-float { position: absolute; right: 3%; top: 22%; width: min(420px, 40vw); filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .45)); }
@media (max-width: 991px) { .hero-float { display: none; } .hero { min-height: auto; padding-top: 5rem; } }

.hero-card {
  border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); padding: 1.25rem; height: 100%;
}
.hero-stat .num { font-size: 1.9rem; font-weight: 800; }

/* ---------------------------------------------------- 区块 */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 680px; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .65rem; }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 800; letter-spacing: -.3px; }
.section-desc { color: var(--muted); }
.title-underline { width: 54px; height: 4px; border-radius: 4px; margin: 1rem auto 0; background: linear-gradient(90deg, var(--primary), var(--accent)); }

.card-hover { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease; overflow: hidden; }
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* 产品卡 */
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.product-photo { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0e2a78, #173f9e 55%, #6dc24a); }
.product-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-photo .pattern { position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(circle at 20% 20%, #fff 1px, transparent 1px), radial-gradient(circle at 80% 70%, #fff 1px, transparent 1px);
  background-size: 22px 22px; }
.product-photo .battery { width: 54%; opacity: .95; }
.product-photo .model-tag { position: absolute; bottom: .85rem; left: .85rem; font-size: .78rem; font-weight: 700;
  background: rgba(0, 0, 0, .35); padding: .25rem .6rem; border-radius: 999px; backdrop-filter: blur(4px); }
.product-body { padding: 1.15rem 1.25rem 1.35rem; }
.product-body .spec { color: var(--muted); font-size: .875rem; }
.product-spec-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.product-spec-list span { font-size: .75rem; background: var(--soft); color: var(--muted); padding: .25rem .6rem; border-radius: 8px; }

/* 分类卡 */
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 210px; display: flex; align-items: flex-end;
  padding: 1.5rem; background: linear-gradient(150deg, #0e2a78, #1c46a8); box-shadow: var(--shadow-sm); transition: transform .3s ease; }
.cat-card:hover { transform: translateY(-6px); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 22%, rgba(109, 194, 74, .5), transparent 55%); }
.cat-card > * { position: relative; z-index: 2; }
.cat-icon { font-size: 2rem; opacity: .9; }

/* 新闻 */
.news-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; height: 100%; }
.news-date { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .82rem; }
.news-card h3 { font-size: 1.05rem; font-weight: 700; }
.news-thumb { height: 180px; background: linear-gradient(135deg, #0e2a78, #173f9e); position: relative; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .85); font-size: 2.2rem; }
.news-list-item { border-bottom: 1px dashed var(--line); }
.news-list-item:last-child { border-bottom: 0; }

/* 案例 */
.case-card { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 260px; display: flex; align-items: flex-end; }
.case-card .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-card .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 18, 37, .1), rgba(6, 18, 37, .92)); }
.case-card > div > * { position: relative; z-index: 2; }

/* 资质 */
.cert-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1.5rem; text-align: center; height: 100%; transition: transform .3s ease, box-shadow .3s ease; }
.cert-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.cert-medal { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.7rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent)); }

/* 数据条 */
.stats-band { background: linear-gradient(120deg, #0a1f5c, #0e2a78 60%, #1c46a8); color: #fff; }
.stat-item .num { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 800; line-height: 1; }

/* 时间轴 */
.timeline { position: relative; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--primary), var(--accent)); transform: translateX(-50%); }
.timeline-item { position: relative; width: 50%; padding: 0 2.5rem 2.5rem 0; }
.timeline-item:nth-child(even) { margin-left: 50%; padding: 0 0 2.5rem 2.5rem; text-align: left; }
.timeline-item:nth-child(odd) { text-align: right; }
.timeline-dot { position: absolute; right: -11px; top: .35rem; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary); box-shadow: 0 0 0 4px rgba(23, 63, 158, .12); }
.timeline-item:nth-child(even) .timeline-dot { right: auto; left: -11px; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109, 194, 74, .18); }
.timeline-year { font-weight: 800; font-size: 1.35rem; color: var(--primary); }
@media (max-width: 767px) {
  .timeline::before { left: 14px; }
  .timeline-item, .timeline-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 2rem 2.75rem; text-align: left; }
  .timeline-item:nth-child(odd) { text-align: left; }
  .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 3px; right: auto; }
}

/* 面包屑头 */
.page-head {
  position: relative; color: #fff; padding: 3.5rem 0 clamp(2.2rem, 5vw, 3.4rem);
  margin-top: 0;
  background: radial-gradient(900px 400px at 80% 0%, rgba(109, 194, 74, .35), transparent 60%),
              linear-gradient(120deg, #0a1f5c, #0e2a78 55%, #1c46a8);
}
.page-head::after {
  content: ""; position: absolute; inset: 0; opacity: .3;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.page-head > * { position: relative; z-index: 2; }
@media (min-width: 992px) { .page-head { padding-top: 4.5rem; } }
.breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .5); margin-bottom: .5rem; }
.breadcrumb-item, .breadcrumb-item a { color: rgba(255, 255, 255, .72); }
.breadcrumb-item.active { color: #fff; }

/* 侧边 */
.side-card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.side-title { font-weight: 700; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: #fff; }
.side-nav .list-group-item { border: 0; border-bottom: 1px dashed var(--line); padding: .8rem 1.25rem; }
.side-nav .list-group-item.active { background: linear-gradient(90deg, rgba(23, 63, 158, .1), transparent); color: var(--primary); font-weight: 700; }
.side-contact { background: linear-gradient(150deg, #0e2a78, #1c46a8); color: #fff; border-radius: var(--radius); padding: 1.5rem; }

/* 内容排版 */
.article-body { line-height: 1.95; color: #33445a; font-size: 1.02rem; }
.article-body img { border-radius: 14px; margin: 1rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.article-body table td, .article-body table th { border: 1px solid var(--line); padding: .7rem .9rem; }
.article-body ul li { margin-bottom: .35rem; }
.article-body h2, .article-body h3 { font-weight: 700; margin-top: 1.6rem; }

.spec-table td:first-child { width: 38%; color: var(--muted); background: var(--soft); font-weight: 600; }

.ratio-1x1 { aspect-ratio: 1/1; }

/* FAQ */
.accordion-button:not(.collapsed) { background: rgba(23, 63, 158, .06); color: var(--primary); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }

/* 表单 */
.form-control, .form-select { border-radius: 12px; border-color: #dde5f0; padding: .7rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(23, 63, 158, .12); }
.input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.has-icon .form-control { padding-left: 2.6rem; }

/* CTA */
.cta-band { position: relative; overflow: hidden; color: #fff; border-radius: 26px;
  background: linear-gradient(120deg, #1c46a8, #173f9e 55%, #6dc24a); padding: clamp(2rem, 4vw, 3.2rem); }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .1); }

/* 页脚 */
.footer { background: var(--ink); color: rgba(255, 255, 255, .68); }
.footer h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; letter-spacing: .04em; }
.footer a { color: rgba(255, 255, 255, .62); line-height: 2; transition: color .2s; }
.footer a:hover { color: var(--accent); }
/* 页脚为深色背景，使用白色版 Logo */
.brand-logo-sm { height: 40px; width: auto; object-fit: contain; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: rgba(255, 255, 255, .48); }
.social-link { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; }
.social-link:hover { background: var(--primary); color: #fff; }

/* 浮动工具 */
.float-tools { position: fixed; right: 1rem; bottom: 5.5rem; z-index: 1030; display: grid; gap: .6rem; }
/* 浮动按钮：统一为白色卡片风格（与“在线留言”一致），悬停反色为品牌渐变 */
.float-btn {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease, color .25s ease,
              border-color .25s ease, background .25s ease;
}
.float-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(23, 63, 158, .28);
}
.float-btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--line); }
.float-btn.ghost:hover { color: #fff; background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); }
#backTop { border: 1px solid var(--line); }
#backTop { position: fixed; right: 1rem; bottom: 1rem; z-index: 1030; }
@media (max-width: 575px) { .float-tools { bottom: 4.5rem; } }

.mobile-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(11, 31, 58, .08); }
.mobile-bar a { flex: 1; text-align: center; padding: .6rem 0; font-size: .78rem; color: var(--muted); }
.mobile-bar a i { display: block; font-size: 1.2rem; color: var(--primary); }
@media (min-width: 992px) { .mobile-bar { display: none; } }
body.has-mobile-bar { padding-bottom: 3.6rem; }
@media (min-width: 992px) { body.has-mobile-bar { padding-bottom: 0; } }

/* 动画 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.pagination .page-link { border-radius: 10px; border: 0; margin: 0 .15rem; color: var(--muted); }
.pagination .page-link:hover { background: var(--soft); color: var(--primary); }
.pagination .active .page-link { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

.tag-list span { display: inline-block; font-size: .78rem; color: var(--muted); background: var(--soft); border-radius: 8px; padding: .3rem .65rem; margin: .15rem .25rem .15rem 0; }

.tilt-img { transition: transform .6s ease; }
.tilt-img:hover { transform: scale(1.04); }

/* ---------------------------------------------------- Google 翻译组件适配 */
/* 隐藏 Google 顶部横幅与“由 Google 提供技术支持”字样，避免撑开布局 */
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.goog-logo-link,
.goog-te-gadget > span > a { display: none !important; }
body { top: 0 !important; }
/* 挂载点放到视口外只用于驱动整页翻译，外观完全由下方自定义 lang-switch 提供 */
#google_translate_element {
  position: absolute; left: -9999px; top: 0; width: 0; height: 0; overflow: hidden;
  opacity: 0; pointer-events: none;
}

/* 自定义语言下拉（现代化胶囊 + 旗帜） */
.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .85rem;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #22303f;
  font-size: 13px; font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}
.lang-toggle:hover { background: var(--soft); }
.lang-toggle .flag { font-size: 1.1rem; line-height: 1; }
.lang-toggle .code { white-space: nowrap; }
.lang-toggle .caret { opacity: .55; font-size: .78rem; }
.site-header.is-transparent .lang-toggle {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .45);
  color: #fff;
}
.site-header.is-transparent .lang-toggle .caret { color: #fff; }
.site-header.is-transparent .lang-toggle:hover { background: rgba(255, 255, 255, .26); }

.lang-menu {
  min-width: 240px; max-height: 360px; overflow-y: auto; padding: .4rem;
  border: 0; border-radius: 14px; box-shadow: var(--shadow-md);
  background: #fff;
}
.lang-menu .dropdown-header {
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: .5rem .8rem .25rem;
}
.lang-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .7rem; border-radius: 9px;
  color: #22303f; font-size: 13.5px; text-decoration: none;
  transition: background .15s, color .15s;
}
.lang-item:hover { background: rgba(23, 63, 158, .08); color: var(--primary); }
.lang-item .flag { font-size: 1.2rem; line-height: 1; width: 1.35rem; text-align: center; }
.lang-item .name { white-space: nowrap; }
.lang-item.active { background: rgba(23, 63, 158, .12); color: var(--primary); font-weight: 600; }
