/* ====== 明点跨境官网 v2.0 ====== */
:root {
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-bg: #eff6ff;
  --blue-dark: #1e40af;
  --green: #059669;
  --green-bg: #ecfdf5;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --rose: #e11d48;
  --rose-bg: #fff1f2;
  --text: #1e293b;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-blue: #eff6ff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; height: auto; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ====== NAVIGATION ====== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center; height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 38px; height: 38px; background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.logo-text { font-size: 18px; font-weight: 700; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--text-light); font-weight: 500; position: relative;
  padding: 4px 0; transition: var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--blue); transform: scaleX(0); transition: transform 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .btn-nav { padding: 8px 20px; background: var(--blue); color: #fff !important; border-radius: 8px; font-weight: 600 !important;
  transition: var(--transition);
}
.nav-links .btn-nav::after { display: none; }
.nav-links .btn-nav:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

.nav-links .btn-nav-outline { padding: 8px 20px; background: transparent; color: var(--blue) !important; border: 1.5px solid var(--blue); border-radius: 8px; font-weight: 600 !important;
  transition: var(--transition);
}
.nav-links .btn-nav-outline::after { display: none; }
.nav-links .btn-nav-outline:hover { background: var(--blue); color: #fff !important; transform: translateY(-1px); }

/* Mobile menu */
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; padding: 4px; color: var(--text); }

/* ====== HERO CAROUSEL ====== */
.hero-carousel {
  position: relative; padding-top: 68px; overflow: hidden;
}
.hero-slide {
  display: none; min-height: 520px; padding: 100px 24px 80px;
  align-items: center; justify-content: center; position: relative;
}
.hero-slide.active { display: flex; animation: fadeInUp 0.6s ease-out; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.hero-slide-1 { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #ede9fe 100%); }
.hero-slide-2 { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #fef3c7 100%); }
.hero-slide-3 { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fce7f3 100%); }

.hero-content { max-width: 680px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 0.5px;
}
.hero-slide-1 .hero-badge { background: rgba(37,99,235,0.1); color: var(--blue); }
.hero-slide-2 .hero-badge { background: rgba(5,150,105,0.1); color: var(--green); }
.hero-slide-3 .hero-badge { background: rgba(217,119,6,0.1); color: var(--amber); }

.hero-title { font-size: 44px; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.hero-title .highlight { position: relative; display: inline-block; }
.hero-title .highlight::after {
  content: ''; position: absolute; bottom: 2px; left: 0; right: 0;
  height: 8px; border-radius: 4px; opacity: 0.3; z-index: -1;
}
.hero-slide-1 .highlight { color: var(--blue); }
.hero-slide-1 .highlight::after { background: var(--blue); }
.hero-slide-2 .highlight { color: var(--green); }
.hero-slide-2 .highlight::after { background: var(--green); }
.hero-slide-3 .highlight { color: var(--amber); }
.hero-slide-3 .highlight::after { background: var(--amber); }

.hero-subtitle { font-size: 16px; color: var(--text-light); line-height: 1.8; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Carousel dots */
.carousel-dots {
  display: flex; justify-content: center; gap: 10px; padding: 20px 0 40px;
}
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--border);
  border: none; cursor: pointer; transition: var(--transition); padding: 0;
}
.carousel-dot.active { width: 28px; border-radius: 5px; background: var(--blue); }
.carousel-dot:hover { background: var(--text-lighter); }

/* ====== SECTION COMMON ====== */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-blue-bg { background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%); color: #fff; }
.section-title {
  font-size: 30px; font-weight: 800; text-align: center; margin-bottom: 6px;
}
.section-title.light { color: #fff; }
.section-desc {
  text-align: center; color: var(--text-light); margin-bottom: 44px; font-size: 15px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.section-blue-bg .section-desc { color: rgba(255,255,255,0.85); }

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px; font-size: 15px; font-weight: 600;
  transition: var(--transition); cursor: pointer; border: 2px solid transparent; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(37,99,235,0.3); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-bg); transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--blue) !important; border-color: #fff; }
.btn-white:hover { background: #f1f5f9; transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ====== SERVICE CARDS ====== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  padding: 32px 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: var(--blue); box-shadow: 0 8px 30px rgba(37,99,235,0.1); transform: translateY(-4px);
}
.service-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px; }
.service-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 12px; }
.service-link { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* ====== STATS ====== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-item { text-align: center; padding: 24px; }
.stat-num { font-size: 42px; font-weight: 800; margin-bottom: 6px; background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-item p { font-size: 15px; opacity: 0.9; }

/* ====== PARTNERS ====== */
.partner-scroll { overflow: hidden; position: relative; margin-top: 32px; }
.partner-track { display: flex; gap: 16px; animation: scrollLeft 25s linear infinite; width: max-content; }
.partner-track:hover { animation-play-state: paused; }
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.partner-item {
  padding: 12px 28px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow); transition: var(--transition);
}
.partner-item:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }

/* ====== FEATURES ROW ====== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  text-align: center; padding: 32px 24px;
  border: 1px solid var(--border); border-radius: var(--radius); transition: var(--transition);
}
.feature-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.feature-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.feature-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* ====== CTA ====== */
.cta-section { text-align: center; }
.cta-section h2 { font-size: 28px; font-weight: 700; }
.cta-section p { color: var(--text-light); margin-top: 8px; font-size: 15px; margin-bottom: 24px; }

/* ====== FLOATING BAR ====== */
.floating-bar {
  position: fixed; right: 20px; bottom: 100px; z-index: 999; display: flex; flex-direction: column; gap: 8px;
}
.floating-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: var(--transition); position: relative; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  color: #fff; text-decoration: none;
}
.floating-btn:hover { transform: scale(1.1); }
.floating-btn .tooltip {
  position: absolute; right: 56px; background: #1e293b; color: #fff; font-size: 12px;
  padding: 5px 10px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.floating-btn:hover .tooltip { opacity: 1; }
.floating-btn-kf { background: var(--blue); }
.floating-btn-kf2 { background: #2563eb; }
.floating-btn-login { background: var(--green); }
.floating-btn-qr { background: var(--purple); }
.floating-btn-top { background: var(--text); display: none; }
.floating-btn-qr:hover + .qr-popup, .qr-popup:hover { opacity: 1; visibility: visible; }
.qr-popup {
  position: absolute; right: 56px; bottom: 0; background: #fff; border-radius: 10px;
  padding: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  opacity: 0; visibility: hidden; transition: var(--transition);
}
.qr-popup img { width: 120px; height: 120px; display: block; }
.qr-popup p { font-size: 11px; color: var(--text-light); text-align: center; margin-top: 6px; }

/* ====== PAGE HERO ====== */
.page-hero {
  padding: 100px 24px 50px; text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #ede9fe 100%);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 400px; height: 400px;
  border-radius: 50%; background: rgba(37,99,235,0.04); pointer-events: none;
}
.page-hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; position: relative; }
.page-hero p { color: var(--text-light); font-size: 15px; position: relative; }
.breadcrumb { font-size: 13px; color: var(--text-lighter); margin-bottom: 8px; position: relative; }
.breadcrumb a { color: var(--text-lighter); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 4px; }

/* ====== CMS CONTENT ====== */
.cms-content { max-width: 960px; margin: 0 auto; font-size: 15px; line-height: 2; color: #374151; }
.cms-content h2 { margin-top: 32px; margin-bottom: 14px; font-size: 22px; font-weight: 700; }
.cms-content h3 { margin-top: 24px; margin-bottom: 10px; font-size: 17px; font-weight: 600; }
.cms-content p { margin-bottom: 14px; }
.cms-content ul, .cms-content ol { margin-bottom: 14px; padding-left: 20px; }
.cms-content li { margin-bottom: 4px; }
.cms-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cms-content th { background: #f1f5f9; font-weight: 600; }
.cms-content th, .cms-content td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; font-size: 14px; }

/* ====== PRODUCT DETAIL TEMPLATE ====== */
.product-detail { max-width: 1000px; margin: 0 auto; padding: 60px 24px; }
.product-overview { margin-bottom: 40px; }
.product-overview h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.product-overview p { font-size: 15px; line-height: 2; color: var(--text-light); }

.product-features-section { margin-bottom: 40px; }
.product-features-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.features-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.feature-tab {
  padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg); cursor: pointer; transition: var(--transition);
}
.feature-tab.active { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); }
.feature-tab:hover { border-color: var(--blue); }
.features-list { list-style: none; }
.features-list li {
  padding: 12px 16px; border-left: 3px solid var(--blue); background: var(--bg-alt);
  margin-bottom: 8px; border-radius: 0 8px 8px 0; font-size: 14px;
}
.features-list li strong { color: var(--text); }

.product-cta-box {
  text-align: center; padding: 40px 24px; background: var(--blue-bg);
  border-radius: var(--radius); margin-top: 32px;
}
.product-cta-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.product-cta-box p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.product-cta-section {
  text-align: center; padding: 40px 24px;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  border-radius: var(--radius); margin-top: 32px; color: #fff;
}
/* WeCom QR CTA for non-OSDWAN products */
.wecom-cta-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #e0f2fe 100%);
  border-radius: 16px;
  padding: 40px;
  margin: 40px 0 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.wecom-cta-section h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.wecom-cta-section p { font-size: 14px; color: var(--text-light); margin-bottom: 20px; }
.wecom-cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.wecom-cta-item {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 20px 24px; min-width: 200px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.wecom-cta-item .qrcode { width: 120px; height: 120px; background: #f1f5f9; border-radius: 8px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #94a3b8; }
.wecom-cta-item .label { font-size: 13px; font-weight: 600; color: var(--text); }
.wecom-cta-item .sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.wecom-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.product-cta-section h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.product-cta-section p { font-size: 14px; color: rgba(255,255,255,0.85); margin-bottom: 20px; }
.product-cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.product-cta-section .btn-primary { background: #fff; color: var(--blue); border-color: #fff; }
.product-cta-section .btn-primary:hover { background: #f0f0f0; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.product-cta-section .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.product-cta-section .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ====== DROPDOWN MENU ====== */
.nav-dropdown { position: relative; }
.nav-dd-toggle { display: flex; align-items: center; gap: 2px; cursor: pointer; }
.nav-dd-toggle .dd-arrow { font-size: 10px; transition: transform 0.2s; }
.nav-dropdown:hover .dd-arrow { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; min-width: 160px; box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  opacity: 0; visibility: hidden; transition: all 0.2s; margin-top: 8px;
}
.nav-dropdown:hover .nav-dd-menu { opacity: 1; visibility: visible; margin-top: 0; }
.nav-dd-menu a {
  display: block !important; padding: 9px 14px !important; font-size: 13px !important;
  border-radius: 6px; white-space: nowrap; color: var(--text-light) !important;
}
.nav-dd-menu a::after { display: none !important; }
.nav-dd-menu a:hover { background: var(--blue-bg); color: var(--blue) !important; }

/* Customer showcase - scrolling logos */
.customer-track { display: flex; gap: 12px; animation: scrollLeft 30s linear infinite; width: max-content; }
.customer-track:hover { animation-play-state: paused; }
.customer-item {
  padding: 10px 22px; background: #fff; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow); transition: var(--transition);
}
.customer-item:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }

/* ====== SCROLL ANIMATIONS ====== */
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: all 0.6s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ====== FOOTER ====== */
.footer { background: #0f172a; color: #fff; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; gap: 32px; }
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; }
.footer a { display: block; color: #64748b; font-size: 13px; margin-bottom: 8px; transition: var(--transition); }
.footer a:hover { color: #fff; padding-left: 4px; }
.footer p { color: #64748b; font-size: 13px; line-height: 1.8; }
.footer-logo { font-size: 20px; font-weight: 800; margin-bottom: 12px; display: block; }
.footer-logo span { background: linear-gradient(135deg, var(--blue), #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 20px 0; margin-top: 40px; text-align: center; color: #475569; font-size: 13px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 968px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero-title { font-size: 28px; }
  .hero-slide { padding: 80px 20px 40px; min-height: auto; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); flex-direction: column;
    padding: 16px 24px; gap: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-links a::after { display: none; }
  .nav-links .btn-nav { text-align: center; margin-top: 4px; }
  .nav-links .btn-nav-outline { text-align: center; margin-top: 4px; }
  .menu-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .product-detail { padding: 32px 20px; }
  .floating-bar { right: 12px; bottom: 80px; }
  .floating-btn { width: 42px; height: 42px; font-size: 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
