/* ========================================
   layout.css — 顶部工具栏 / 导航 / 移动端菜单 / 页脚 / 悬浮工具栏
   ======================================== */

/* ---------- 顶部工具栏 ---------- */
.topbar {
  background: var(--slate-900);
  color: var(--slate-300);
  font-size: 12px;
}

.topbar-inner {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-tagline {
  display: none;
}

@media (min-width: 640px) {
  .topbar-tagline {
    display: block;
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.topbar-phone:hover {
  color: #fff;
}

/* 语言切换器 */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-switch svg {
  color: var(--slate-400);
}

.lang-btn {
  padding: 2px 6px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  color: var(--slate-400);
  transition: color 0.2s;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.lang-sep {
  color: var(--slate-600);
  font-size: 12px;
}

/* ---------- 主导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--slate-200);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 滚动后导航增强阴影（由 main.js 切换 .scrolled） */
.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(11, 30, 51, 0.1), 0 1px 0 rgba(0, 102, 204, 0.05);
  border-bottom-color: transparent;
}

.navbar-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Logo 图标（CSS 注入云形渐变图标，全站导航统一，无需改 HTML） */
.logo::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%230066CC'/%3E%3Cstop offset='1' stop-color='%231A7FE5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M26 24H11a6 6 0 0 1-1.2-11.88A8 8 0 0 1 25 9.2 6.5 6.5 0 0 1 26 24z' fill='url(%23g)'/%3E%3Ccircle cx='13.5' cy='17' r='2.2' fill='%23fff' opacity='0.9'/%3E%3Ccircle cx='19' cy='15' r='1.4' fill='%23fff' opacity='0.7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.2;
}

.logo-sub {
  display: none;
  font-size: 10px;
  color: var(--slate-400);
  letter-spacing: 0.5px;
}

@media (min-width: 1024px) {
  .logo-sub {
    display: block;
  }
}

/* 桌面导航 */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 1280px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-700);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* 激活态：底部渐变科技线 */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--primary), #1A7FE5);
}

.nav-link svg {
  flex-shrink: 0;
}

/* 下拉菜单 */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 102, 204, 0.04);
  padding: 8px 0;
  min-width: 230px;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--slate-600);
  transition: all 0.15s;
}

.dropdown-link:hover {
  color: var(--primary);
  background: rgba(0, 102, 204, 0.04);
}
.dropdown-link.active {
  color: #fff;
  background: var(--primary);
  font-weight: 600;
  position: relative;
}
.dropdown-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: #fff;
  border-radius: 0 2px 2px 0;
  opacity: .85;
}

.dropdown-tag {
  font-size: 10px;
  color: var(--orange);
  background: #FFF7ED;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* 导航 CTA */
.nav-cta {
  display: none;
  align-items: center;
  gap: 14px;
}

@media (min-width: 1280px) {
  .nav-cta {
    display: flex;
  }
}

.nav-cta-btn {
  background: var(--gradient-cta);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  transition: box-shadow 0.25s, background 0.25s, transform 0.25s;
}

.nav-cta-btn:hover {
  box-shadow: var(--shadow-blue);
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-hover) 100%);
  transform: translateY(-1px);
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: flex;
  padding: 8px;
  border-radius: var(--radius-md);
  color: var(--slate-700);
}

.nav-toggle:hover {
  background: var(--slate-100);
}

@media (min-width: 1280px) {
  .nav-toggle {
    display: none;
  }
}

/* 汉堡 / 关闭图标切换 */
.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.open .icon-menu {
  display: none;
}

.nav-toggle.open .icon-close {
  display: block;
}

/* 移动端导航面板 */
.nav-mobile {
  display: none;
  border-top: 1px solid var(--slate-100);
  background: #fff;
  max-height: 70vh;
  overflow-y: auto;
}

.nav-mobile.open {
  display: block;
}

@media (min-width: 1280px) {
  .nav-mobile {
    display: none !important;
  }
}

.nav-mobile-inner {
  padding: 12px 16px;
}

.nav-mobile .lang-switch {
  padding: 8px 18px;
}

.nav-mobile .lang-btn {
  color: var(--slate-500);
}

.nav-mobile .lang-btn.active {
  color: var(--primary);
}

.m-nav-link {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-700);
  border-radius: var(--radius-md);
}

.m-nav-link:hover {
  background: var(--slate-50);
}

.m-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.m-nav-row .m-nav-link {
  flex: 1;
}

.m-sub-toggle {
  padding: 8px;
  color: var(--slate-500);
}

.m-sub-toggle svg {
  transition: transform 0.25s;
}

.m-sub-toggle.open svg {
  transform: rotate(180deg);
}

.m-submenu {
  display: none;
  padding: 0 0 8px 24px;
}

.m-submenu.open {
  display: block;
}

.m-sub-link {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--slate-500);
  border-radius: var(--radius-md);
}

.m-sub-link:hover {
  color: var(--primary);
  background: rgba(0, 102, 204, 0.04);
}
.m-sub-link.active {
  color: var(--primary);
  background: var(--primary-light, rgba(0, 102, 204, .08));
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: 15px;
}

.m-cta {
  display: block;
  text-align: center;
  margin-top: 12px;
  background: var(--gradient-cta);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: var(--radius-md);
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #F5F7FA;
  color: var(--text-sub);
}

.footer-cta {
  background: linear-gradient(90deg, var(--primary), var(--violet));
  position: relative;
  overflow: hidden;
}

/* 页脚 CTA 科技纹理：白点阵 + 光晕 */
.footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-dot-dark);
  background-size: 24px 24px;
  pointer-events: none;
}

.footer-cta::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(60px);
  pointer-events: none;
}

.footer-cta-inner {
  position: relative;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-cta-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-cta h3 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.footer-cta p {
  color: #DBEAFE;
  font-size: 14px;
  margin-top: 4px;
}

.footer-cta-actions {
  display: flex;
  gap: 12px;
}

.footer-cta-tel {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.footer-cta-tel:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 页脚主体 */
.footer-main {
  padding: 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  grid-column: span 2;
}

@media (min-width: 1024px) {
  .footer-brand {
    grid-column: span 1;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* 页脚 Logo 图标（与导航一致） */
.footer-logo::before {
  content: "";
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%230066CC'/%3E%3Cstop offset='1' stop-color='%231A7FE5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M26 24H11a6 6 0 0 1-1.2-11.88A8 8 0 0 1 25 9.2 6.5 6.5 0 0 1 26 24z' fill='url(%23g)'/%3E%3Ccircle cx='13.5' cy='17' r='2.2' fill='%23fff' opacity='0.9'/%3E%3Ccircle cx='19' cy='15' r='1.4' fill='%23fff' opacity='0.7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.footer-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-900);
}

.footer-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color 0.2s;
}

a.footer-contact-item:hover {
  color: var(--primary);
}

.footer-col h4 {
  color: var(--slate-900);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-sub);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--primary);
}

/* 页脚底部 */
.footer-bottom {
  border-top: 1px solid var(--slate-200);
}

.footer-bottom-inner {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--slate-500);
  text-align: center;
}

.footer-icp {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-icp:hover {
  color: var(--primary);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
  }
}

/* 友情链接 */
.friend-links {
  padding: 26px 0 10px;
  text-align: center;
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 20px;
}
.friend-links-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--slate-700);
  margin-right: 4px;
}
.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10px 36px;
}
.friend-links-list a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  font-weight: 400;
  color: var(--slate-700);
  text-decoration: none;
  transition: color 0.2s ease;
}
.friend-links-list a:hover {
  color: var(--primary);
}

/* ---------- 悬浮工具栏 ---------- */
.floating-toolbar {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s;
}

.float-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.35);
}

.float-btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 102, 204, 0.45), var(--shadow-lg);
}

.float-btn-white {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--slate-200);
}

.float-btn-white.float-phone {
  color: var(--primary);
}

.float-btn-white.float-phone:hover {
  border-color: var(--primary);
}

.float-btn-white.float-wechat {
  color: var(--emerald);
}

.float-btn-white.float-wechat:hover {
  border-color: var(--emerald);
}

.float-btn-white.float-top {
  color: var(--slate-500);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.float-btn-white.float-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.float-btn-white.float-top:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.float-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--slate-900);
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.float-btn:hover .float-tooltip {
  opacity: 1;
}
