/* ========================================
   江苏鼎双微电子有限公司 - 官网样式表
   风格：简约大气 · 科技感
   ======================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #0A4D8C;
  --primary-dark: #073B6E;
  --primary-light: #1565C0;
  --accent: #00BCD4;
  --accent-soft: #E0F7FA;
  --dark: #1A2332;
  --text: #2C3E50;
  --text-light: #5A6C7D;
  --muted: #8A9BAE;
  --bg: #FFFFFF;
  --bg-soft: #F5F8FC;
  --bg-gray: #EEF2F7;
  --border: #E1E8F0;
  --shadow-sm: 0 2px 8px rgba(10, 77, 140, 0.06);
  --shadow: 0 6px 24px rgba(10, 77, 140, 0.10);
  --shadow-lg: 0 16px 48px rgba(10, 77, 140, 0.14);
  --radius: 10px;
  --radius-lg: 18px;
  --max-width: 1200px;
  --header-h: 68px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- 通用容器 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
}

.section-sm {
  padding: 60px 0;
}

.bg-soft {
  background: var(--bg-soft);
}

.bg-gray {
  background: var(--bg-gray);
}

.bg-dark {
  background: var(--dark);
  color: #fff;
}

.text-center {
  text-align: center;
}

/* ---------- 标题区 ---------- */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding: 5px 16px;
  background: var(--accent-soft);
  border-radius: 30px;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 16px;
}

.section-head p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.8;
}

.section-head .divider {
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  margin: 18px auto 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--primary);
}

.btn-light:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1rem;
}

/* ---------- 导航栏 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--dark);
  text-decoration: none;
}

.logo-img {
  height: 46px !important;
  width: auto !important;
  max-width: 220px !important;
  min-width: 0 !important;
  display: block;
  flex-shrink: 1;
  object-fit: contain;
  vertical-align: middle;
}

.logo-text {
  display: none !important;
}

.logo-text small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu a {
  position: relative;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: var(--transition);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 22px;
}

.nav-menu a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-cta {
  margin-left: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- 页面通用 Hero ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 70px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 60%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(0, 188, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(21, 101, 192, 0.2) 0%, transparent 45%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-hero .breadcrumb {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.page-hero .breadcrumb a:hover {
  color: var(--accent);
}

.page-hero .breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

/* ---------- 网格卡片 ---------- */
.grid {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- 动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 18px;
}

.footer-brand .logo-img {
  height: 56px !important;
  max-width: 280px !important;
  background: transparent;
  padding: 0;
  margin-bottom: 4px;
  filter: brightness(1.15) contrast(1.05);
}

.footer-brand .logo-text small {
  color: rgba(255, 255, 255, 0.5);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 18px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.02rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col ul li {
  margin-bottom: 11px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
  line-height: 1.6;
}

.footer-contact li .icon {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  padding: 22px 0;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 968px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  /* 导航栏 logo 缩小，避免溢出 */
  .logo-img {
    height: 36px !important;
    max-width: 150px !important;
  }

  .navbar {
    padding: 0 4px;
  }

  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-menu.mobile-open a {
    width: 100%;
    padding: 12px 18px;
  }

  .section {
    padding: 60px 0;
  }

  .section-head h2 {
    font-size: 1.7rem;
  }

  .page-hero h1 {
    font-size: 2rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* 页脚 logo 在窄屏进一步缩小 */
  .footer-brand .logo-img {
    height: 44px !important;
    max-width: 200px !important;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .logo-img {
    height: 30px !important;
    max-width: 120px !important;
  }

  .footer-brand .logo-img {
    height: 40px !important;
    max-width: 180px !important;
  }

  .hero h1 {
    font-size: 1.8rem !important;
    letter-spacing: 0 !important;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 11px 22px;
    font-size: 0.9rem;
  }
}

/* ICP备案样式 */
.footer-bottom .beian { margin: 10px 0 0 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.7); }
.footer-bottom .beian-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-bottom .beian-link:hover { color: #fff; text-decoration: underline; }
.footer-bottom .beian-icon { width: 18px; height: 18px; vertical-align: middle; }
.footer-bottom .beian-sep { color: rgba(255,255,255,0.3); }
