/* ===========================================
   徙木物联官网 - 方案A：工业质感
   深海蓝 + 琥珀色点缀
   =========================================== */

:root {
  /* ---- 深海蓝主色系 ---- */
  --primary-deep:   #1E3A5F;   /* 主色底：导航栏、页脚、大区块 */
  --primary-mid:    #2D5F8A;   /* 中间色：按钮背景、卡片边框强调 */
  --primary-light:  #3B82F6;   /* 强调蓝：可点击元素、链接、图标 */
  --primary-subtle: #E8F0FE;   /* 极浅蓝：悬停背景、次要区块 */

  /* ---- 暖色点缀（仅 CTA） ---- */
  --accent:         #D97706;   /* CTA 按钮、高亮标记 */
  --accent-hover:   #B45309;   /* CTA 悬停 */
  --accent-subtle:  #FFFBEB;   /* CTA 微背景 */

  /* ---- 中性色 ---- */
  --bg-light:       #F3F4F6;
  --bg-white:       #FFFFFF;
  --border:         #D1D5DB;
  --border-light:   #E5E7EB;
  --text-primary:   #111827;
  --text-secondary: #6B7280;
  --text-muted:     #9CA3AF;
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:      0 8px 24px rgba(0,0,0,0.08);

  /* 覆盖 Bootstrap 默认色值 */
  --bs-primary:     var(--primary-mid);
  --bs-primary-rgb: 45, 95, 138;
}

/* ===== 全局基础 ===== */
body {
  font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system,
    BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

/* ===== 导航栏 ===== */
.navbar {
  background: var(--primary-deep) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  padding: 0.5rem 1rem;
  transition: box-shadow 0.3s ease;
}

.navbar-brand {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  max-height: 36px;
  border-radius: 18px;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  color: rgba(255,255,255,0.85) !important;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.12);
}

/* 导航选中态：底部指示线 */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.navbar-toggler {
  border-color: rgba(255,255,255,0.2);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar-toggler:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.35);
}

.navbar-collapse {
  background: var(--primary-deep);
  border-radius: 8px;
  margin-top: 0.25rem;
  padding: 0.5rem;
}

@media (min-width: 992px) {
  .navbar-collapse {
    background: transparent;
    margin-top: 0;
    padding: 0;
    box-shadow: none;
  }
}

/* ===== Hero 区域 ===== */
.hero-section {
  background: linear-gradient(135deg,
    var(--primary-deep) 0%,
    var(--primary-mid) 100%);
  min-height: 450px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section > .container { position: relative; z-index: 1; }

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  max-width: 500px;
}

/* ===== 按钮系统 ===== */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  border: 1.5px solid transparent;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* 一级 CTA — 琥珀色 */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(217,119,6,0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217,119,6,0.3);
  color: #fff;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(217,119,6,0.2);
}

/* 二级按钮 — 蓝色实底 */
.btn-secondary {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(30,58,95,0.2);
  color: #fff;
}

/* 三级按钮 — 蓝色轮廓 */
.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--primary-light);
  color: var(--primary-light);
}
.btn-outline-primary:hover {
  background: var(--primary-subtle);
  transform: translateY(-1px);
  color: var(--primary-deep);
  border-color: var(--primary-light);
}

/* 浅色环境下的轮廓按钮 */
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}

/* 浅色实底按钮（Hero 区使用） */
.btn-light {
  background: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.2);
  color: var(--primary-deep);
}
.btn-light:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* 按钮尺寸 */
.btn-lg {
  padding: 0.875rem 2.25rem;
  font-size: 1.1rem;
  border-radius: 10px;
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  border-radius: 6px;
}

/* 按钮中的图标 */
.btn i, .btn .bi {
  font-size: 0.9em;
}

/* ===== 卡片系统 ===== */
.card {
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--border-light);
  background-color: var(--bg-white);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.card.shadow-sm:hover {
  box-shadow: var(--shadow-lg);
}

.card-img-top {
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.card-img-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.border-0 {
  border: 1px solid var(--border-light) !important;
}

/* ===== 区块背景 ===== */
section.bg-light {
  background-color: var(--bg-light) !important;
}

/* CTA / Hero 背景色 — 符合新的配色 */
.bg-primary {
  background: linear-gradient(135deg,
    var(--primary-deep) 0%,
    var(--primary-mid) 100%);
}

.bg-primary > .container {
  position: relative;
  z-index: 1;
}

/* ===== 页脚 ===== */
footer {
  background: #0F1923 !important;  /* 比导航栏更深，形成层次 */
}

footer a {
  transition: color 0.3s ease;
  color: rgba(255,255,255,0.6);
}

footer a:hover {
  color: #fff !important;
}

/* ===== 标题与文字 ===== */
/* 特色渐变标题（保留，但改为深蓝→亮蓝） */
.text-gradient {
  background: linear-gradient(135deg,
    var(--primary-deep) 0%,
    var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 图标盒子 */
.icon-box {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-subtle);
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* ===== 特性列表（产品页 check 图标）===== */
.list-unstyled .bi-check-circle-fill {
  color: var(--primary-light) !important;  /* 覆盖 Bootstrap 的 text-success */
}

/* ===== 动画 ===== */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-mid), var(--primary-deep));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-deep);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 400px;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .card-img-top {
    height: 150px;
  }
  .card-img-placeholder {
    height: 150px;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.1rem;
  }
  .navbar-brand img {
    height: 30px;
  }
  .navbar {
    padding: 0.5rem 0.75rem;
  }
  .navbar-toggler {
    padding: 0.2rem 0.4rem;
  }
  .navbar-toggler-icon {
    width: 1.2rem;
    height: 1.2rem;
  }
}
