/* ==========================================
   士加心科技 - 主样式文件
   设计规范: 深蓝#1a2f6e + 橙黄#f5a623
   ========================================== */

:root {
  --primary: #1a2f6e;
  --primary-light: #2d4a9e;
  --primary-dark: #0f1d47;
  --accent: #f5a623;
  --accent-hover: #e8901a;
  --success: #10b981;
  --success-dark: #059669;
  --purple: #8b5cf6;
  --text-dark: #1a1a2e;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  color: var(--text-dark);
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ====== Topbar ====== */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar span { display: flex; align-items: center; gap: 6px; }
.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 16px;
}
.topbar-right a {
  color: rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}
.topbar-right a:hover { color: var(--accent); }

/* ====== Navbar ====== */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.logo-name { display: block; font-weight: 700; font-size: 17px; color: var(--primary); }
.logo-sub { display: block; font-size: 10px; color: var(--text-light); letter-spacing: 1px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-menu li { position: relative; }
.nav-menu a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-dark);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 5px;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--primary);
  background: rgba(26,47,110,.06);
}
.btn-nav {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600;
}
.btn-nav:hover { background: var(--accent-hover) !important; transform: translateY(-1px); }

/* 优惠商城特殊样式 */
.mall-link {
  color: #ef4444 !important;
  font-weight: 600;
  position: relative;
}
.mall-link:hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}
.mall-link i {
  animation: cartBounce 2s infinite;
}
@keyframes cartBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Dropdown */
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}
.dropdown-menu a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  border-radius: 8px;
  font-size: 14px;
}
.dropdown-menu a i { width: 20px; text-align: center; color: var(--primary); }
.dropdown-menu a:hover { background: var(--bg-light) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; margin-left: auto; }
.hamburger span { width: 24px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: all var(--transition); }

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,47,110,.3); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-warning { background: var(--accent); color: #fff; }
.btn-warning:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,166,35,.4); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-dark); transform: translateY(-2px); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #7c3aed; transform: translateY(-2px); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239,68,68,.4); }
.btn-full { width: 100%; }

/* ====== Hero ====== */
.hero {
  min-height: calc(100vh - 110px);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.c1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.c2 { width: 400px; height: 400px; bottom: -150px; left: -100px; background: rgba(245,166,35,.06); }
.c3 { width: 200px; height: 200px; top: 50%; right: 30%; }

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(245,166,35,.2);
  border: 1px solid rgba(245,166,35,.4);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  margin-bottom: 20px;
}
.hero-text h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
}
.highlight {
  background: linear-gradient(135deg, var(--accent), #ffcd6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p { color: rgba(255,255,255,.75); font-size: 16px; margin-bottom: 32px; line-height: 1.8; }
.hero-btns { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 16px 24px;
  width: fit-content;
}
.stat { text-align: center; }
.stat .num { display: block; font-size: 24px; font-weight: 700; color: var(--accent); }
.stat span:last-child { font-size: 12px; color: rgba(255,255,255,.6); }
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,.2); }

/* Phone Mockup */
.hero-visual { display: flex; justify-content: center; }
.phone-mockup {
  width: 260px;
  background: #fff;
  border-radius: 36px;
  padding: 20px 14px;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
  border: 8px solid rgba(255,255,255,.15);
}
.phone-screen { background: #f8fafc; border-radius: 24px; overflow: hidden; }
.app-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}
.app-banner {
  background: linear-gradient(135deg, var(--accent), #ffcd6b);
  color: var(--primary-dark);
  text-align: center;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
}
.app-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--border);
  margin: 1px;
}
.app-item {
  background: #fff;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-gray);
}
.app-item i { font-size: 20px; color: var(--primary); }
.app-notice {
  background: #fff8e6;
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-gray);
  margin: 8px;
  border-radius: 6px;
}

/* ====== Stats Bar ====== */
.stats-bar {
  background: var(--accent);
  padding: 20px 0;
}
.stats-inner {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}
.stats-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 15px;
}
.stats-item i { font-size: 20px; }

/* ====== Section Headers ====== */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header.light h2, .section-header.light p { color: #fff; }
.section-tag {
  display: inline-block;
  background: rgba(26,47,110,.08);
  color: var(--primary);
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid rgba(26,47,110,.15);
}
.section-header.light .section-tag {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.3);
}
.section-header h2 { font-size: clamp(24px,4vw,36px); color: var(--text-dark); margin-bottom: 12px; }
.section-header p { color: var(--text-gray); font-size: 16px; max-width: 600px; margin: 0 auto; }

/* ====== Services ====== */
.services { padding: 100px 0; background: var(--bg-light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  border: 1px solid var(--border);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card.featured { border: 2px solid var(--accent); }
.featured-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  z-index: 1;
}
.card-top {
  padding: 28px 24px 20px;
  position: relative;
  overflow: hidden;
}
.card-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #fff;
}
.card-num {
  position: absolute;
  bottom: -8px; right: 16px;
  font-size: 48px;
  font-weight: 700;
  color: rgba(255,255,255,.15);
  line-height: 1;
}
.card-category {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.card-body { padding: 20px 20px 24px; }
.card-body h3 { font-size: 18px; margin-bottom: 10px; }
.service-desc { color: var(--text-gray); font-size: 14px; margin-bottom: 12px; line-height: 1.7; }
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  display: inline-block;
  background: var(--bg-light);
  color: var(--text-gray);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.tag-hot {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.tag-free {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.feature-list { margin-bottom: 20px; }
.feature-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-gray);
  padding: 4px 0;
}
.feature-list li i { color: var(--success); font-size: 12px; }
.card-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.price-from { font-size: 12px; color: var(--text-light); }
.price { font-size: 22px; font-weight: 700; color: var(--primary); }
.price em { font-size: 14px; font-style: normal; font-weight: 400; color: var(--text-gray); }

/* ====== Why Us ====== */
.why-us {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.why-item {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.why-item:hover { background: rgba(255,255,255,.12); transform: translateY(-4px); }
.why-icon {
  width: 64px; height: 64px;
  background: rgba(245,166,35,.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  color: var(--accent);
}
.why-item h4 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.why-item p { color: rgba(255,255,255,.6); font-size: 14px; }

/* ====== Quick Track ====== */
.quick-track { padding: 60px 0; background: var(--bg-light); }
.track-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 40px;
  border: 1px solid var(--border);
}
.track-left h2 { font-size: 22px; color: var(--primary); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.track-left p { color: var(--text-gray); font-size: 14px; }
.track-right { flex: 1; }
.track-form {
  display: flex;
  gap: 10px;
}
.track-form select, .track-form input {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.track-form select { min-width: 140px; }
.track-form input { flex: 1; }
.track-form select:focus, .track-form input:focus { border-color: var(--primary); }
.quick-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dark);
}

/* ====== Testimonials ====== */
.testimonials { padding: 100px 0; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.stars { color: var(--accent); font-size: 18px; margin-bottom: 12px; }
.testimonial-card p { color: var(--text-gray); font-size: 14px; line-height: 1.8; margin-bottom: 20px; font-style: italic; }
.reviewer { display: flex; align-items: center; gap: 12px; }
.reviewer-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.reviewer span { display: block; font-weight: 600; font-size: 14px; }
.reviewer em { color: var(--text-light); font-size: 12px; font-style: normal; }

/* ====== Contact Section ====== */
.contact-section { padding: 100px 0; background: var(--bg-light); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info h2 { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.contact-info > p { color: var(--text-gray); margin-bottom: 32px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
}
.contact-item > i {
  width: 44px; height: 44px;
  background: rgba(26,47,110,.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 18px;
  flex-shrink: 0;
}
.contact-item span { display: block; font-size: 12px; color: var(--text-light); }
.contact-item strong { font-size: 15px; }

.contact-form-box {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.contact-form-box h3 { font-size: 20px; color: var(--primary); margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: #fff;
  outline: none;
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form textarea { resize: vertical; }

/* ====== Footer ====== */
.footer { background: var(--primary-dark); color: rgba(255,255,255,.7); }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 60px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-name { color: #fff; }
.footer-brand p { font-size: 13px; line-height: 1.8; }
.footer-links h4, .footer-contact h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-links a {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-contact p {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; margin-bottom: 8px;
}
.qr-placeholder {
  width: 80px; height: 80px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; font-size: 11px;
  margin-top: 12px;
}
.qr-placeholder i { font-size: 24px; color: #1db954; }
.footer-friendship-bar {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 0;
}
.footer-friendship-bar .container {
  display: flex;
  align-items: center;
  /* 禁止换行，强制横排 */
  flex-wrap: nowrap !important;
  overflow: hidden;
}
.friend-label {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.friend-links-wrap {
  display: flex;
  align-items: center;
  /* 固定宽度，禁止换行 */
  flex-wrap: nowrap !important;
  overflow: hidden;
}
/* 每个友链固定宽度80px，间距16px */
.friend-links-wrap a {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
  white-space: nowrap;
  width: 80px;
  text-align: center;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.06);
}
.friend-links-wrap a:hover { 
  color: var(--accent); 
  background: rgba(255,255,255,.12); 
}

/* 计算可用宽度：1200 - 48(padding) - 100(label) ≈ 1052px */
/* 每项 80+16=96px → 1052/96 ≈ 可放10-11个友链 */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.4);
}

/* ====== Animations ====== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeInUp .6s ease forwards; }

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-stats { margin: 0 auto; }
  .hero-btns { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-friendship-bar .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .nav-menu {
    position: fixed; top: 70px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 16px; gap: 4px;
    transform: translateY(-100%); opacity: 0;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .stats-inner { gap: 20px; }
  .track-box { flex-direction: column; align-items: stretch; }
  .track-form { flex-direction: column; }
  .track-form select { width: 100%; }
}
