/* ═══════════════════════════════════════════════
   瀚信科智能科技 - 官方网站样式
   ═══════════════════════════════════════════════ */

:root {
  --primary: #1a3a5c;
  --primary-light: #2e75b6;
  --accent: #e8a735;
  --bg-light: #f5f7fa;
  --bg-dark: #0d2137;
  --text: #333;
  --text-light: #666;
  --text-white: #fff;
  --border: #e0e5ea;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-width: 1200px;
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: #fff;
}

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ═══════════ HEADER ═══════════ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 68px;
}
.header-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 700; color: var(--primary);
}
.header-logo img { height: 84px; }
.header-nav { display: flex; gap: 4px; }
.header-nav a {
  display: block; padding: 8px 18px; font-size: 15px; color: var(--text);
  border-radius: 4px; transition: all 0.2s;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--primary-light); background: #f0f4f8;
}
.header-nav a.btn-login {
  background: var(--primary); color: #fff;
  margin-left: 8px;
}
.header-nav a.btn-login:hover { background: var(--primary-light); }

/* Dropdown menu */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: block; padding: 8px 18px; font-size: 15px; color: var(--text); border-radius: 4px; transition: all 0.2s; }
.nav-dropdown > a:hover, .nav-dropdown > a.active { color: var(--primary-light); background: #f0f4f8; }
.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff; min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-radius: 8px; padding: 8px 0;
  z-index: 1001;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu a {
  display: block; padding: 10px 20px; font-size: 14px;
  color: var(--text); transition: all 0.15s;
  border-radius: 0;
}
.nav-dropdown .dropdown-menu a:hover {
  color: var(--primary-light); background: #f0f4f8;
}

/* Mobile menu */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--primary); transition: 0.3s; }

/* ═══════════ HERO ═══════════ */
.hero {
  margin-top: 68px;
  background: linear-gradient(160deg, #0a1929 0%, #0d2b4a 30%, #143c60 60%, #0a2640 100%);
  color: var(--text-white);
  padding: 120px 0 100px;
  position: relative; overflow: hidden;
  min-height: 580px;
  display: flex; align-items: center;
}
.hero-video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  /* darken overlay to keep text readable */
  filter: brightness(0.5);
}
/* Animated geometric background shapes */
.hero::before {
  content: '';
  position: absolute; top: -30%; left: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(46,117,182,0.25) 0%, rgba(46,117,182,0.08) 40%, transparent 70%);
  border-radius: 45% 55% 50% 50%;
  animation: heroFloat1 12s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute; bottom: -40%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,167,53,0.15) 0%, rgba(232,167,53,0.05) 40%, transparent 70%);
  border-radius: 55% 45% 60% 40%;
  animation: heroFloat2 15s ease-in-out infinite;
}
/* Grid lines overlay */
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
/* Floating particles */
.hero-particles {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: particleFloat 8s ease-in-out infinite;
}
.hero-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 2s; width: 3px; height: 3px; }
.hero-particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 4s; width: 6px; height: 6px; }
.hero-particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 1s; }
.hero-particle:nth-child(5) { left: 85%; top: 25%; animation-delay: 5s; width: 3px; height: 3px; }
.hero-particle:nth-child(6) { left: 40%; top: 80%; animation-delay: 3s; width: 5px; height: 5px; }

@keyframes heroFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(3deg); }
  66% { transform: translate(-15px, 15px) rotate(-2deg); }
}
@keyframes heroFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-25px, -20px) rotate(-4deg); }
}
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.8); opacity: 0.7; }
}

.hero-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero-text h1 {
  font-size: 42px; font-weight: 700; line-height: 1.25; margin-bottom: 20px;
  letter-spacing: 1px; white-space: pre-line;
}
.hero-text h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #f0c060 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text .subtitle {
  font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 36px; line-height: 1.8;
  white-space: pre-line;
}
.hero-text .hero-stats { display: flex; gap: 40px; }
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 36px; font-weight: 700;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat .label { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 6px; letter-spacing: 1px; }
.hero-image { text-align: center; }
.hero-image img {
  max-height: 380px; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  animation: heroImageFloat 6s ease-in-out infinite;
}
@keyframes heroImageFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.btn { display: inline-block; padding: 12px 32px; border-radius: 6px; font-size: 15px; font-weight: 600; transition: all 0.3s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #d4952a; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(232,167,53,0.4); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.4); margin-left: 12px; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.btn-sm { padding: 8px 20px; font-size: 13px; }

/* ═══════════ SECTION TITLES ═══════════ */
.section { padding: 80px 0; }
.section-bg { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-light); max-width: 600px; margin: 0 auto; }
.section-header .divider { width: 60px; height: 3px; background: var(--accent); margin: 16px auto 0; }

/* ═══════════ PRODUCT HIGHLIGHT ═══════════ */
.product-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px;
}
.product-card img { border-radius: var(--radius); }
.product-info h3 { font-size: 24px; color: var(--primary); margin-bottom: 12px; }
.product-info .model { display: inline-block; background: var(--primary-light); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; margin-bottom: 16px; }
.product-info p { color: var(--text-light); margin-bottom: 20px; line-height: 1.7; }
.product-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.product-highlights span { font-size: 14px; color: var(--text); }
.product-highlights span::before { content: '\2713'; color: var(--primary-light); font-weight: 700; margin-right: 6px; }

/* ═══════════ ADVANTAGES ═══════════ */
.advantages-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.advantage-card {
  text-align: center; padding: 36px 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.3s;
}
.advantage-card:hover { transform: translateY(-6px); }
.advantage-card .icon { font-size: 40px; margin-bottom: 16px; }
.advantage-card h4 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.advantage-card p { font-size: 13px; color: var(--text-light); }

/* ═══════════ DEVICE MODULES ═══════════ */
/* ═══════════ MODULE SHOWCASE ═══════════ */
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.module-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: transform 0.3s;
}
.module-card:hover { transform: translateY(-4px); }
.module-card img { width: 100%; height: 180px; object-fit: cover; }
.module-card .info { padding: 16px; text-align: center; }
.module-card .info h4 { font-size: 15px; color: var(--primary); }

/* ═══════════ NEWS ═══════════ */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-4px); }
.news-card img { width: 200px; height: 140px; object-fit: cover; flex-shrink: 0; }
.news-card .news-info { padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.news-card .news-info h4 { font-size: 16px; color: var(--primary); margin-bottom: 8px; }
.news-card .news-info .date { font-size: 13px; color: var(--text-light); }
.news-card .news-info p { font-size: 14px; color: var(--text-light); margin-top: 8px; }

/* ═══════════ CONTACT ═══════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 22px; color: var(--primary); margin-bottom: 20px; }
.contact-info .info-item { display: flex; gap: 12px; margin-bottom: 16px; font-size: 15px; }
.contact-info .info-item .label { color: var(--text-light); min-width: 72px; }
.contact-form { background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form h3 { font-size: 20px; color: var(--primary); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-light); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-actions .btn { width: 100%; }

/* ═══════════ FOOTER ═══════════ */
.footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer p, .footer a { font-size: 14px; line-height: 2; color: rgba(255,255,255,0.7); }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-width); margin: 32px auto 0; padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 13px;
}

/* ═══════════ PRODUCT PAGE ═══════════ */
.page-banner {
  margin-top: 68px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white); padding: 48px 0; text-align: center;
}
.page-banner h1 { font-size: 32px; margin-bottom: 8px; }
.page-banner p { font-size: 15px; opacity: 0.85; }

.product-detail { padding: 60px 0; }
.product-detail .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-gallery img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.product-desc h2 { font-size: 26px; color: var(--primary); margin-bottom: 8px; }
.product-desc .model-tag { display: inline-block; background: var(--accent); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; margin-bottom: 16px; }
.product-desc p { color: var(--text-light); margin-bottom: 24px; font-size: 15px; line-height: 1.8; }

.specs-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 12px 16px; font-size: 14px; }
.specs-table td:first-child { font-weight: 600; color: var(--primary); background: var(--bg-light); width: 220px; }

.module-section { padding: 60px 0; }
.module-section .section-header { margin-bottom: 40px; }

/* ═══════════ ABOUT PAGE ═══════════ */
.about-intro { padding: 60px 0; }
.about-intro .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-text h2 { font-size: 28px; color: var(--primary); margin-bottom: 20px; }
.about-text p { font-size: 15px; color: var(--text-light); margin-bottom: 16px; line-height: 1.8; }
.about-text .vision-box { background: var(--bg-light); padding: 24px; border-radius: var(--radius); border-left: 4px solid var(--primary-light); margin-top: 24px; }
.about-text .vision-box h4 { color: var(--primary); margin-bottom: 8px; }
.about-image img { border-radius: var(--radius); width: 100%; }

/* ═══════════ NEWS LIST ═══════════ */
.news-list-page { padding: 60px 0; }
.news-list { display: grid; gap: 24px; }
.news-list-item { display: flex; gap: 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.3s; }
.news-list-item:hover { transform: translateY(-4px); }
.news-list-item img { width: 260px; height: 180px; object-fit: cover; flex-shrink: 0; }
.news-list-item .info { padding: 24px; }
.news-list-item .info .date { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.news-list-item .info h3 { font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.news-list-item .info p { font-size: 14px; color: var(--text-light); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 16px; border-radius: 4px; border: 1px solid var(--border); font-size: 14px; }
.pagination a { color: var(--primary-light); }
.pagination a:hover { background: var(--primary-light); color: #fff; border-color: var(--primary-light); }
.pagination span.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ═══════════ NEWS DETAIL ═══════════ */
.news-detail-page { padding: 60px 0; }
.news-detail-page .container { max-width: 800px; }
.news-detail-page h1 { font-size: 28px; color: var(--primary); margin-bottom: 12px; }
.news-detail-page .meta { font-size: 14px; color: var(--text-light); margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.news-detail-page .body { font-size: 15px; line-height: 1.9; }
.news-detail-page .body p { margin-bottom: 16px; }

/* ═══════════ ADMIN ═══════════ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 220px; background: var(--bg-dark); color: #fff;
  padding: 24px 0; position: fixed; top: 0; left: 0; bottom: 0;
}
.admin-sidebar h3 { padding: 0 20px 20px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.admin-sidebar nav a {
  display: block; padding: 12px 20px; font-size: 14px; color: rgba(255,255,255,0.7);
  transition: all 0.2s;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: #fff; background: rgba(255,255,255,0.1); }
.admin-sidebar nav a.logout { color: rgba(255,255,255,0.5); margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.admin-main { margin-left: 220px; flex: 1; padding: 32px; background: var(--bg-light); min-height: 100vh; }
.admin-main h2 { font-size: 22px; color: var(--primary); margin-bottom: 24px; }

.admin-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.admin-card h3 { font-size: 17px; color: var(--primary); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--bg-light); padding: 12px 16px; text-align: left; font-size: 14px; color: var(--text); }
.admin-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover { background: #fafbfc; }

.admin-form .form-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.admin-form .form-row label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
.admin-form .form-row input, .admin-form .form-row textarea, .admin-form .form-row select {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: inherit; width: 100%;
}
.admin-form .form-row input:focus, .admin-form .form-row textarea:focus { outline: none; border-color: var(--primary-light); }
.admin-form .form-row textarea { min-height: 150px; }

.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: var(--bg-light); }
.login-box { background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); width: 380px; }
.login-box h2 { text-align: center; color: var(--primary); margin-bottom: 24px; font-size: 22px; }
.login-box .error { background: #ffeaea; color: #c0392b; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }

.alert-success { background: #e8f5e9; color: #2e7d32; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.btn-danger { background: #c0392b; color: #fff; margin-left: 8px; }
.btn-danger:hover { background: #a93226; }
.btn-small { padding: 6px 14px; font-size: 12px; border-radius: 4px; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { display: none; }
  .product-card { grid-template-columns: 1fr; }
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .product-detail .container { grid-template-columns: 1fr; }
  .about-intro .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #fff; box-shadow: var(--shadow); padding: 12px; }
  .menu-toggle { display: flex; }
  .hero-text h1 { font-size: 28px; }
  .advantages-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card { flex-direction: column; }
  .news-card img { width: 100%; height: 180px; }
  .news-list-item { flex-direction: column; }
  .news-list-item img { width: 100%; height: 200px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .specs-table td:first-child { width: 120px; }
}
