/* ============================================================
   鸿博微电子 - 企业官网全局样式
   设计理念：简约大气 · 科技感 · 专业可信赖
   ============================================================ */

/* -------- CSS 变量 / 设计令牌 -------- */
:root {
  /* 主色调 - 科技深蓝 */
  --color-primary: #0a1929;
  --color-primary-light: #1a3a5c;
  --color-accent: #2563eb;
  --color-accent-light: #3b82f6;
  --color-accent-dark: #1d4ed8;

  /* 中性色 */
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #0a1929;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;

  /* 文字色 */
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-white: #f1f5f9;
  --color-text-muted: #94a3b8;

  /* 功能色 */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* 间距 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 7rem;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(10, 25, 41, 0.15);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  /* 过渡 */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* 容器宽度 */
  --container-max: 1200px;
}

/* -------- 重置 -------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul, ol {
  list-style: none;
}

/* -------- 容器 -------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm {
  max-width: 800px;
}

/* -------- 排版 -------- */
.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header .eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }

/* -------- 按钮 -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-dark {
  background: var(--color-primary);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.navbar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-menu a {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  position: relative;
}

.navbar-menu a:hover {
  color: var(--color-accent);
}

.navbar-menu a.active {
  color: var(--color-accent);
}

.navbar-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}
.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   Hero 区域
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a1929 0%, #0d2847 50%, #0a1929 100%);
  color: #fff;
  overflow: hidden;
  padding-top: 72px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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: 50px 50px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .hero-subtitle {
  font-size: 1.3rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-md);
}

.hero .hero-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-xl);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat .stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: #60a5fa;
  line-height: 1;
}

.hero-stat .stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.3rem;
}

/* ============================================================
   优势卡片
   ============================================================ */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.advantage-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.advantage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-light);
}

.advantage-card:hover::before {
  transform: scaleX(1);
}

.advantage-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.advantage-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.advantage-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ============================================================
   产品卡片
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent-light);
}

.product-card-header {
  padding: var(--space-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(10, 25, 41, 0.03));
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.product-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-accent);
  margin-top: 4px;
}

.product-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.product-feature {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}

.product-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px dashed var(--color-border);
}

.product-spec {
  display: flex;
  flex-direction: column;
}

.product-spec .spec-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.product-spec .spec-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ============================================================
   应用领域
   ============================================================ */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
@media (max-width: 1024px) {
  .applications-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .applications-grid { grid-template-columns: 1fr; }
}

.app-card {
  text-align: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.app-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.app-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  color: var(--color-accent);
}

.app-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.app-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ============================================================
   时间线 (关于我们)
   ============================================================ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.timeline-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.timeline-item h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.timeline-item p {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* ============================================================
   企业文化
   ============================================================ */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.culture-card {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.culture-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 0 0 3px 3px;
}

.culture-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.culture-card p {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ============================================================
   荣誉资质
   ============================================================ */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.honor-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.honor-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.honor-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.honor-item span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ============================================================
   新闻卡片
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.news-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: var(--space-md) var(--space-lg) 0;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
}

.news-card-body {
  padding: var(--space-sm) var(--space-lg) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.5;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.news-card .read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: auto;
}

.news-card .read-more:hover {
  color: var(--color-accent-dark);
}

/* ============================================================
   联系页面
   ============================================================ */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}

.contact-info-item .ci-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.contact-info-item .ci-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.contact-info-item .ci-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}

.contact-departments {
  margin-top: var(--space-lg);
}

.contact-departments h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.dept-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dept-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.dept-item .dept-name {
  font-weight: 600;
  color: var(--color-primary);
}

.dept-item .dept-contact {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* 联系表单 */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.form-group label .required {
  color: var(--color-danger);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-feedback {
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  display: none;
}

.form-feedback.show {
  display: block;
}

.form-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 地图区域 */
.map-section {
  margin-top: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.map-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-sm);
  color: var(--color-text-muted);
}

.map-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.4;
}

/* ============================================================
   CTA 区域
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d2847 100%);
  color: #fff;
  text-align: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-lg);
}

/* ============================================================
   页面头部 (内页 Banner)
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d2847 100%);
  color: #fff;
  padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.page-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(248, 250, 252, 0));
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.page-banner p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-md);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: #fff;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .navbar-logo {
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: #60a5fa;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #60a5fa;
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
  color: #60a5fa;
}

/* ============================================================
   动画
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* 滚动显示动画 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   后台管理面板样式
   ============================================================ */
.admin-layout {
  min-height: 100vh;
  background: var(--color-bg-alt);
}

.admin-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-header .admin-actions {
  display: flex;
  gap: var(--space-sm);
}

.admin-header .btn {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

.admin-body {
  display: flex;
  max-width: var(--container-max);
  margin: 0 auto;
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  position: sticky;
  top: 90px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition);
}

.admin-sidebar a:hover {
  background: var(--color-bg-alt);
}

.admin-sidebar a.active {
  background: var(--color-accent);
  color: #fff;
}

.admin-content {
  flex: 1;
  min-width: 0;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.admin-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.admin-field {
  margin-bottom: var(--space-md);
}

.admin-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  outline: none;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.admin-list-item {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.admin-list-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.admin-list-item .item-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
}

.btn-icon-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-icon-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), #0d2847);
}

.admin-login-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}

.admin-login-box h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.admin-login-box .subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

.admin-login-box .form-feedback {
  margin-top: var(--space-md);
}

.admin-login-box .login-hint {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: var(--space-md);
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .navbar-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar-menu a {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
  }

  .navbar-menu a.active::after {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-lg);
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .page-banner h1 {
    font-size: 2rem;
  }

  .admin-body {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }

  .admin-sidebar nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }

  .admin-field-row {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   富内容（图片 / 表格 / 附件）- 后台编辑器 & 前台详情
   ============================================================ */

/* ---- 后台：富内容编辑器 ---- */
.btn-sm {
  padding: 4px 12px !important;
  font-size: 0.8rem !important;
}
.rich-media-box {
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(248, 250, 252, 0.6);
}
/* 富内容区内的按钮：覆盖 .btn-outline 的白色文字以保证对比度 */
.rich-media-box .btn,
.rich-table-editor .btn,
.rich-table-ops .btn {
  color: var(--color-primary, #2563eb);
  border: 1px solid var(--color-primary, #2563eb);
  background: #fff;
}
.rich-media-box .btn:hover,
.rich-table-editor .btn:hover,
.rich-table-ops .btn:hover {
  color: #fff;
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
}
.rich-media-box .btn-primary,
.rich-table-editor .btn-primary,
.rich-table-ops .btn-primary {
  color: #fff;
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
}
.rich-media-box .btn-primary:hover,
.rich-table-editor .btn-primary:hover,
.rich-table-ops .btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.rich-empty {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.4rem;
}
.rich-image-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem;
}
.rich-image-thumb {
  width: 88px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rich-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rich-image-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rich-attach-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}
.rich-attach-name {
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rich-attach-size {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}
.rich-attach-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.rich-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.rich-table-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem;
}
.rich-table-scroll {
  overflow-x: auto;
}
.rich-table-editor {
  border-collapse: collapse;
  width: 100%;
}
.rich-table-editor td {
  border: 1px solid var(--color-border);
  padding: 2px;
}
.rich-table-editor td.rich-th {
  background: rgba(59, 130, 246, 0.08);
}
.rich-table-editor input {
  width: 100%;
  min-width: 90px;
  border: none;
  padding: 6px 8px;
  font-size: 0.85rem;
  background: transparent;
  box-sizing: border-box;
}
.rich-table-editor input:focus {
  outline: 2px solid var(--color-accent);
  border-radius: 4px;
}
.rich-table-ops {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
/* 新增条目高亮动画 */
.admin-list-item.highlight-new {
  animation: highlightPulse 2.4s ease;
}
@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.65); border-color: var(--color-accent); }
  35% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.15); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ---- 后台：表格粘贴导入弹窗 ---- */
.paste-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.paste-modal {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: slideIn 0.25s ease;
}
.paste-modal h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--color-heading);
}
.paste-modal-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.6;
}
.paste-modal textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  tab-size: 16;
}
.paste-modal textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.paste-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
.paste-modal .btn-outline {
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  background: #fff;
}
.paste-modal .btn-outline:hover {
  color: #fff;
  background: var(--color-primary);
}

/* ---- 前台：详情弹窗富内容 ---- */
.detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.detail-images img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.detail-images img:hover {
  transform: scale(1.02);
}
.detail-image-caption {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 0.4rem;
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
  border-radius: 8px;
  overflow: hidden;
}
.detail-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-align: left;
}
.detail-table th,
.detail-table td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 1rem;
  color: #475569;
}
.detail-table tr:nth-child(even) td {
  background: #f8fafc;
}
.detail-attachments {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.detail-attachments h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.detail-attachment-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.88rem;
}
.detail-attachment-item:last-child {
  border-bottom: none;
}
.detail-attachment-item .att-name {
  flex: 1;
  color: #334155;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-attachment-item .att-size {
  color: #94a3b8;
  font-size: 0.78rem;
}
.detail-attachment-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 14px;
  border-radius: 6px;
  background: var(--color-accent, #3b82f6);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.detail-attachment-item a:hover {
  opacity: 0.9;
}
/* 图片放大查看 */
.image-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}
.image-viewer-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
