/* ============================================================
   components.css — 全站共享组件：导航栏 / 下拉菜单 / 页脚 / 章节标题 / Toast
   规则以全站 19 页完全一致的版本为基准
   ============================================================ */

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.logo-img {
  height: 34px;
  width: auto;
  display: block;
}

.logo-img-light {
  height: 36px;
}

.nav-links {
  display: flex;
  /* 撑满导航栏高度，使下拉 .dropdown 的 top:100% 正好对齐导航栏底边 */
  align-self: stretch;
  align-items: stretch;
  gap: 32px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center; /* 撑满高度后文字仍垂直居中，下拉箭头也随之居中 */
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active { color: var(--primary); }

.nav-item.has-dropdown::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== 下拉菜单 ===== */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.nav-item.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background 0.2s;
}

.dropdown-item:hover { background: var(--bg-gray); }

.dropdown-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-gray);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dropdown-text p {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== 移动端菜单按钮 ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

/* ===== 章节标题体系 ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid rgba(0, 78, 224, 0.15);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 页脚 ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
}

.footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover { color: white; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.footer-contact-item svg { flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== 页面 Hero（列表/详情页统一范式：深色底 + 网格纹理 + 面包屑 + 左对齐标题） ===== */
.page-hero {
  padding: 160px 0 88px;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
  color: white;
}

/* 网格纹理（首页等特殊 hero 不加 --grid 修饰类） */
.page-hero--grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

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

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.page-hero-breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.page-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}

.page-hero-breadcrumb a:hover { color: white; }

.page-hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: white;
}

.page-hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 28px;
}

/* hero 内 CTA 按钮组（深色上下文） */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 78, 224, 0.35);
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.page-hero .btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-hero .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-hero .btn-outline {
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}

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

/* ===== 滚动渐入（reveal，由 site-chrome.js 驱动） ===== */
.reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ===== 移动端导航折叠（site-chrome 注入的导航配套） =====
   注意：这是全站移动端导航的唯一样式来源，
   各页面内联 <style> 中不得再重复定义 .nav-links / .nav-item / .dropdown / .mobile-menu-btn。 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; /* 与 .navbar-inner 高度保持一致 */
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch; /* 覆盖基础样式的 center，菜单项整行铺满 */
    gap: 0;
    padding: 8px 16px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.mobile-open { display: flex; }

  .nav-item {
    /* 移动端下拉面板是 static 流内元素，必须纵向排列，否则会和文字并排 */
    flex-direction: column;
    align-items: stretch;
    padding: 14px 8px;
    border-radius: 8px;
    font-size: 16px;
  }

  /* 移动端：下拉箭头改为行尾绝对定位，避免被 .dropdown 挤到下一行 */
  .nav-item.has-dropdown { padding-right: 40px; }

  .nav-item.has-dropdown::after {
    position: absolute;
    right: 16px;
    top: 27px;
    margin-left: 0;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
  }

  .nav-item.has-dropdown:has(.dropdown.mobile-expand)::after {
    transform: translateY(-50%) rotate(180deg);
  }

  /* 注意：必须同时覆盖 :hover 版本，否则移动端粘滞 hover 会用
     桌面规则 .nav-item.has-dropdown:hover .dropdown 的 translateX(-50%)
     把下拉内容整体左移并裁切。 */
  .nav-item.has-dropdown .dropdown,
  .nav-item.has-dropdown:hover .dropdown {
    position: static;
    left: auto;
    top: auto;
    opacity: 1;
    visibility: visible;
    max-height: 0; /* 默认收起，通过 mobile-expand 展开 */
    overflow: hidden;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 8px;
    min-width: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-item.has-dropdown .dropdown.mobile-expand,
  .nav-item.has-dropdown:hover .dropdown.mobile-expand {
    max-height: 600px;
    padding: 8px 0 8px 8px;
  }

  .mobile-menu-btn { display: block; }
}

/* ===== 行业详情页 Hero 视觉面板（7 页共用） ===== */
.industry-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.industry-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(96, 165, 250, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.industry-features {
  list-style: none;
  margin-bottom: 32px;
}

.industry-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  padding: 8px 0;
}

.industry-features li svg {
  flex-shrink: 0;
  color: #22c55e;
}

.industry-hero-visual { position: relative; }

.hero-visual-bg {
  width: 100%;
  height: 400px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 50%, #2c5282 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-visual-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-visual-icon {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .industry-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual-bg { height: 240px; }
}

/* ===== 成功案例封面（插画由 assets/js/case-covers.js 生成，纯 SVG 无图片） ===== */
.case-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cv-bg1, #EFF2F5), var(--cv-bg2, #DDE6EC));
}

.case-cover-art {
  display: block;
  width: 100%;
  height: 100%;
}

.case-cover svg text {
  font-family: "Outfit", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.2px;
}

.case-cover.is-coming { filter: saturate(0.35); }

/* ===== 案例卡片（封面 + 信息区，与 cases.html / index.html 同一范式） ===== */
.case-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

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

.case-info {
  padding: 20px 24px 24px;
}

.case-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.case-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 78, 224, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
}

.case-tag.ai {
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.1);
}

.case-tag.coming {
  color: var(--text-light);
  background: var(--bg-gray);
}

.case-info h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.case-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}