/* ===== common.css - 全局通用样式 ===== */

/* 浅色主题变量 */
:root {
  --primary-blue: #4f7eb3;
  --primary-dark: #3a6291;
  --primary-text: #2c4b74;
  --secondary-text: #1e2a44;
  --light-bg: #eaf0fa;
  --soft-bg: #f0f4fb;
  --border-light: #d7e1ed;
  --gray-text: #4a5f7a;
  --muted-text: #3b5a7a;
}

/* 基础重置与字体 */
body {
  font-family: sans-serif;
  background: #f9fafc;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* ===== 通用组件 ===== */

/* 横幅渐变背景 */
.banner-gradient-light {
  background: linear-gradient(145deg, #eef2f7 0%, #dce5f0 100%);
}

/* 卡片阴影 - 浅色 */
.card-shadow-light {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  background: #ffffff;
}
.card-shadow-light:hover {
  box-shadow: 0 16px 40px rgba(0, 20, 50, 0.08);
  transform: translateY(-3px);
}

/* 图标背景 */
.icon-bg-light {
  background: #eaf0fa;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

/* 标题样式 */
.section-title-light {
  letter-spacing: 0.02em;
  border-left: 5px solid #4f7eb3;
  padding-left: 1rem;
  color: #1e2a44;
}

/* 按钮样式 */
.btn-outline-light {
  border: 1px solid #b8c9e0;
  color: #2c3e50;
  background: white;
}
.btn-outline-light:hover {
  background: #eaf0fa;
  border-color: #7f9fc7;
}

.btn-primary-light {
  background: #4f7eb3;
  color: white;
}
.btn-primary-light:hover {
  background: #3a6291;
}

/* ===== Footer ===== */
.footer-light {
  background: #eef2f7;
  color: #2c3e50;
}
.footer-light a {
  color: #3b5a7a;
}
.footer-light a:hover {
  color: #1a2a44;
}

/* ===== 弹窗 ===== */
#privacyPopup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  max-width: 540px;
  width: 92%;
  padding: 2rem 1.5rem;
  border-radius: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  z-index: 999;
  max-height: 90vh;
  overflow-y: auto;
}
#privacyPopup .close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
#privacyPopup.active {
  display: block;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(2px);
  z-index: 998;
}
.overlay.active {
  display: block;
}

/* ===== 浮动按钮 ===== */
.float-btn-light {
  position: fixed;
  bottom: 100px;
  right: 16px;
  width: 48px;
  height: 48px;
  z-index: 60;
  background: white;
  border-radius: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #d7e1ed;
}
.float-btn-light:hover {
  transform: scale(1.04);
  background: #f5f9ff;
}

/* ===== 移动端侧滑菜单 ===== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 80vw;
  height: 100vh;
  background: #ffffff;
  z-index: 10000;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 24px 20px 40px;
}
.mobile-menu-panel.open {
  right: 0;
}
.mobile-menu-panel .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
}
.mobile-menu-panel .close-btn:hover {
  color: #1e2a44;
}
.mobile-menu-panel .menu-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e2a44;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eaf0fa;
}
.mobile-menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-menu-panel nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: #2c3e50;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.mobile-menu-panel nav a:hover,
.mobile-menu-panel nav a:active {
  background: #eaf0fa;
  color: #1e2a44;
}
.mobile-menu-panel nav a.active {
  background: #eaf0fa;
  color: #1e2a44;
}
.mobile-menu-panel .sub-nav {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid #eaf0fa;
  margin-left: 10px;
}
.mobile-menu-panel .sub-nav a {
  font-size: 14px;
  font-weight: 400;
  padding: 6px 14px;
  color: #4a5f7a;
}
.mobile-menu-panel .sub-nav a:hover {
  background: #f0f4fb;
}
.mobile-menu-panel .menu-footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid #eaf0fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-menu-panel .menu-footer .consult-btn {
  display: block;
  text-align: center;
  background: #4f7eb3;
  color: white;
  padding: 12px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.mobile-menu-panel .menu-footer .consult-btn:hover {
  background: #3a6291;
}
.mobile-menu-panel .menu-footer .lang-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}
.mobile-menu-panel .menu-footer .lang-links a {
  color: #64748b;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
}
.mobile-menu-panel .menu-footer .lang-links a:hover {
  background: #eaf0fa;
  color: #1e2a44;
}
.mobile-menu-panel .menu-footer .lang-links a.active-lang {
  background: #eaf0fa;
  color: #1e2a44;
  font-weight: 600;
}

/* ===== PC端多语言下拉 ===== */
.lang-dropdown {
  position: relative;
  cursor: pointer;
}
.lang-dropdown .lang-current {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 14px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  background: transparent;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.lang-dropdown .lang-current:hover {
  background: #eaf0fa;
  border-color: #d7e1ed;
}
.lang-dropdown .lang-current .arrow {
  font-size: 10px;
  transition: transform 0.2s;
  color: #7f8fa0;
}
.lang-dropdown:hover .lang-current .arrow {
  transform: rotate(180deg);
}
.lang-dropdown .lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #eaf0fa;
  padding: 6px 0;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 100;
}
.lang-dropdown:hover .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-dropdown .lang-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  color: #2c3e50;
  text-decoration: none;
  transition: background 0.12s;
}
.lang-dropdown .lang-menu a:hover {
  background: #f0f4fb;
  color: #1e2a44;
}
.lang-dropdown .lang-menu a.active-lang {
  background: #eaf0fa;
  color: #1e2a44;
  font-weight: 600;
}

/* ===== 响应式 ===== */
/*@media (min-width: 1024px) {*/
/*  .mobile-menu-overlay,*/
/*  .mobile-menu-panel {*/
/*    display: none !important;*/
/*  }*/
/*}*/

/* ===== 桌面导航英文强制不换行 ===== */
@media (min-width: 1024px) {
  header nav > a,
  header nav > .group > a,
  header nav .lang-current,
  header nav a[href="#contact"] {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
@media (max-width: 640px) {
  #privacyPopup {
    padding: 1.5rem 1rem;
  }
}
