﻿/* ================================================
   嘉燊科技官网 - 全局样式表
   风格：正规商务简约 | 蓝白主调
   ================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --primary: #1B5EA7;      /* 商务蓝 */
  --primary-dark: #144285;
  --primary-light: #EBF3FD;
  --accent: #2A7DD4;
  --text-dark: #1A2332;
  --text-body: #4A5568;
  --text-light: #718096;
  --bg: #F7F9FC;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --shadow: 0 2px 12px rgba(27,94,167,0.08);
  --shadow-lg: 0 8px 32px rgba(27,94,167,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --container: 1200px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

/* ── H5 Mobile Compatibility ── */
img, video { max-width: 100%; touch-action: manipulation; -webkit-user-drag: none; user-select: none; }
input, select, textarea { font-size: 16px; -webkit-appearance: none; border-radius: 0; }
a { -webkit-tap-highlight-color: transparent; }

/* iOS Safe Area */
:root {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { color: var(--text-dark); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
p { line-height: 1.8; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

/* ── Layout Helpers ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { display: inline-block; position: relative; }
.section-title h2::after {
  content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 3px; background: var(--primary); border-radius: 2px;
}
.section-title p { color: var(--text-light); margin-top: 16px; font-size: 1rem; }
.section-bg { background: var(--bg); }

/* ── Top Bar ── */
.topbar {
  background: var(--primary); color: rgba(255,255,255,0.85);
  font-size: 0.82rem; padding: 6px 0;
  white-space: nowrap; overflow: hidden;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; max-width: var(--container); margin: 0 auto; padding: 0 24px; gap: 16px; }
.topbar a { color: rgba(255,255,255,0.85); white-space: nowrap; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 20px; flex-shrink: 0; }
.topbar-slogan { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }

/* ── Header ── */
.header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--container); margin: 0 auto; padding: 0 24px; height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 40px; height: 40px; background: var(--primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text .name { color: var(--primary); font-size: 1.15rem; font-weight: 700; }
.logo-text .sub { color: var(--text-light); font-size: 0.72rem; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 16px; border-radius: var(--radius); color: var(--text-body);
  font-size: 0.9rem; font-weight: 500; transition: var(--transition);
}
.nav a:hover, .nav a.active { background: var(--primary-light); color: var(--primary); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text-dark); margin: 5px 0; border-radius: 1px; }

/* ── Hero / Banner ── */
.hero {
  position: relative; height: 480px; overflow: hidden; background: var(--primary-dark);
}
.hero-slider { height: 100%; position: relative; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; display: flex; align-items: center; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; background: linear-gradient(135deg, rgba(27,94,167,0.82) 0%, rgba(20,66,133,0.6) 100%);
  display: flex; align-items: center;
}
.hero-content { position: relative; z-index: 2; color: #fff; max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }
.hero-content h1 { color: #fff; font-size: 2.6rem; margin-bottom: 16px; }
.hero-content p { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 520px; margin-bottom: 28px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; border: none; transition: var(--transition); }
.hero-dot.active { background: #fff; width: 28px; border-radius: 5px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 28px; border-radius: var(--radius); font-size: 0.92rem;
  font-weight: 600; cursor: pointer; border: none; transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(27,94,167,0.3); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-outline-blue { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-blue:hover { background: var(--primary); color: #fff; }

/* ── Features / Stats ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.stat-item { background: var(--white); padding: 32px 24px; text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: 0.85rem; margin-top: 4px; }

/* ── Services Grid ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition);
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-img { height: 200px; overflow: hidden; }
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.service-card:hover .service-img img { transform: scale(1.05); }
.service-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.service-tag {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; font-weight: 600;
  margin-bottom: 10px; width: fit-content;
}
.service-body h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-body p { color: var(--text-body); font-size: 0.88rem; flex: 1; margin-bottom: 16px; }
.service-price { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.service-price small { font-size: 0.78rem; color: var(--text-light); font-weight: 400; }
.service-features { list-style: none; margin-bottom: 20px; }
.service-features li {
  padding: 5px 0; font-size: 0.85rem; color: var(--text-body);
  display: flex; align-items: flex-start; gap: 8px;
}
.service-features li::before { content: '✓'; color: var(--primary); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-img { border-radius: var(--radius-lg); overflow: hidden; height: 380px; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-body); margin-bottom: 16px; font-size: 0.95rem; }
.about-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.about-tag {
  background: var(--primary-light); color: var(--primary); padding: 5px 14px;
  border-radius: 20px; font-size: 0.82rem; font-weight: 600;
}
.scope-list { list-style: none; }
.scope-list li { padding: 8px 0; font-size: 0.9rem; display: flex; gap: 10px; border-bottom: 1px solid var(--border); }
.scope-list li:last-child { border-bottom: none; }
.scope-list li::before { content: '●'; color: var(--primary); flex-shrink: 0; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info { padding: 32px; background: var(--primary); border-radius: var(--radius-lg); color: #fff; }
.contact-info h3 { color: #fff; margin-bottom: 24px; font-size: 1.2rem; }
.contact-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-icon {
  width: 40px; height: 40px; background: rgba(255,255,255,0.15); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.contact-item-text .label { font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-bottom: 2px; }
.contact-item-text .value { font-size: 0.95rem; color: #fff; }
.contact-form { padding: 32px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.contact-form h3 { margin-bottom: 20px; font-size: 1.15rem; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-dark); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.9rem; font-family: inherit; color: var(--text-dark);
  transition: var(--transition); background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); background: var(--white);
  box-shadow: 0 0 0 3px rgba(27,94,167,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-success { display: none; background: #E8F5E9; color: #2E7D32; padding: 14px 16px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 16px; }
.form-error-msg { display: none; color: #C62828; font-size: 0.82rem; margin-top: 4px; }

/* ── Privacy / Terms ── */
.content-page { padding: 60px 0; }
.content-page h1 { text-align: center; margin-bottom: 40px; }
.content-block { max-width: 800px; margin: 0 auto; }
.content-block h2 { font-size: 1.2rem; color: var(--primary); margin: 32px 0 12px; }
.content-block p { margin-bottom: 14px; font-size: 0.92rem; color: var(--text-body); }
.content-block ul { margin: 0 0 14px 20px; }
.content-block ul li { margin-bottom: 6px; font-size: 0.92rem; color: var(--text-body); }
.content-block .update-time { text-align: center; color: var(--text-light); font-size: 0.82rem; margin-bottom: 32px; }

/* ── Footer ── */
.footer { background: var(--text-dark); color: rgba(255,255,255,0.7); }
.footer-main { padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; }
.footer-logo-name { font-size: 1.05rem; font-weight: 700; color: #fff; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 14px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0;
  text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: rgba(255,255,255,0.85); }

/* ── Partners ── */
.partners { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.partner-item { padding: 12px 24px; background: var(--white); border-radius: var(--radius); font-size: 0.9rem; color: var(--text-light); font-weight: 500; box-shadow: var(--shadow); }

/* ── Page Header (inner pages) ── */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 48px 0; text-align: center; color: #fff; }
.page-header h1 { color: #fff; font-size: 2rem; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: #fff; }

/* ── Service Detail Page ── */
.service-detail { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.detail-gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.detail-main-img { border-radius: var(--radius); overflow: hidden; height: 340px; }
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-thumbs { display: flex; gap: 8px; }
.detail-thumb { width: 70px; height: 70px; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: 0.6; border: 2px solid transparent; }
.detail-thumb.active { opacity: 1; border-color: var(--primary); }
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: 1.7rem; margin-bottom: 12px; }
.detail-price { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 16px; }
.detail-price small { font-size: 0.85rem; color: var(--text-light); font-weight: 400; }
.detail-desc { color: var(--text-body); font-size: 0.92rem; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.detail-features h4 { font-size: 0.95rem; margin-bottom: 10px; }
.detail-features ul { list-style: none; }
.detail-features li { padding: 7px 0; font-size: 0.88rem; display: flex; gap: 8px; }
.detail-features li::before { content: '✓'; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.detail-sidebar { background: var(--bg); border-radius: var(--radius-lg); padding: 28px; position: sticky; top: 90px; }
.sidebar-title { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
.sidebar-contact-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; align-items: center; }

/* ── Products Page ── */
.products-filter { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--white); color: var(--text-body); font-size: 0.88rem; cursor: pointer; transition: var(--transition); }
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── CTA Banner ── */
.cta-banner { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); padding: 64px 0; text-align: center; color: #fff; }
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.82); font-size: 1rem; margin-bottom: 28px; }

/* ── Mobile Responsive ── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-img { height: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: 48px 0; }
  .hero { height: 320px; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero-content p { font-size: 0.95rem; max-width: 100%; }
  .nav { display: none; }
  .menu-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item { padding: 22px 12px; border-bottom: 1px solid var(--border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
  .stat-num { font-size: 1.7rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-info { padding: 24px; }
  .contact-form { padding: 24px; }
  .hero-btns { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-btns .btn { width: 100%; justify-content: center; padding: 10px 20px; font-size: 0.88rem; }
  .container { padding: 0 16px; }
  .header-inner { padding: 0 16px; height: 60px; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .topbar-slogan { display: none; }
  .topbar-links { gap: 14px; font-size: 0.78rem; }
  .logo-text .name { font-size: 1rem; }
  .logo-text .sub { font-size: 0.68rem; }
  .section-title { margin-bottom: 32px; }
  .page-header { padding: 32px 0; }
  .page-header h1 { font-size: 1.5rem; }
  .content-page { padding: 40px 0; }
  .service-detail { grid-template-columns: 1fr; gap: 24px; }
  .detail-main-img { height: 240px; }
  .detail-sidebar { position: static; padding: 20px; }
  .cta-banner { padding: 40px 0; }
  .cta-banner h2 { font-size: 1.4rem; }
  .about-img { height: 220px; }
  .contact-info h3 { font-size: 1.1rem; }
}

/* ── Mobile Menu Overlay ── */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200;
}
.mobile-nav {
  position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
  background: var(--white); z-index: 201; padding: 24px; overflow-y: auto;
  transition: right 0.3s ease;
}
.mobile-nav.open { right: 0; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.mobile-nav-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); }
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { margin-bottom: 4px; }
.mobile-nav-links a {
  display: block; padding: 12px 16px; color: var(--text-body); font-size: 0.95rem;
  border-radius: var(--radius); transition: var(--transition);
}
.mobile-nav-links a:hover, .mobile-nav-links a.active { background: var(--primary-light); color: var(--primary); }
