/* ============================================
   SalesforceCRM.cn - 全局样式
   品牌色：Salesforce 风格蓝色系
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0176d3;
  --primary-dark: #014486;
  --primary-light: #e6f0fa;
  --accent: #00a1e0;
  --accent-green: #2e844a;
  --accent-orange: #dd7a01;
  --text: #181818;
  --text-secondary: #5c5c5c;
  --text-muted: #939393;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #032d60;
  --border: #e0e4e8;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --transition: 0.25s ease;
  --max-width: 1280px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

ul, ol { list-style: none; }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); border: 2px solid transparent;
  text-align: center; justify-content: center; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-lg { padding: 14px 36px; font-size: 18px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.section-title {
  font-size: 36px; font-weight: 700; color: var(--text);
  margin-bottom: 12px; line-height: 1.3;
}
.section-subtitle { font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; }
.section-header { text-align: center; margin-bottom: 48px; }

.section-footer { text-align: center; margin-top: 40px; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 600; background: var(--primary-light); color: var(--primary);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}

.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--primary); }
.logo img { height: 40px; width: auto; }
.logo span { font-size: 20px; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  display: block; padding: 8px 16px; border-radius: var(--radius);
  font-size: 15px; font-weight: 500; color: var(--text); transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { background: var(--primary-light); color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #014486 50%, var(--primary) 100%);
  color: #fff; padding: 100px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 640px; }
.hero-content h1 { font-size: 48px; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-content h1 span { color: var(--accent); }
.hero-content p { font-size: 20px; line-height: 1.7; opacity: .9; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; }
.hero-stat h3 { font-size: 32px; font-weight: 700; color: var(--accent); }
.hero-stat p { font-size: 14px; opacity: .75; margin: 0; }
.hero-breadcrumb { font-size: 14px; opacity: 0.8; margin-bottom: 16px; }
.hero-breadcrumb a { color: #fff; }
.hero-breadcrumb a:hover { opacity: 0.7; }
.hero-meta { display: flex; gap: 24px; margin-top: 16px; font-size: 15px; opacity: 0.9; flex-wrap: wrap; }

/* ---------- Stats Bar ---------- */
.stats-section { padding: 40px 0; background: var(--bg-alt); }
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.stat-item {
  background: var(--bg);
  backdrop-filter: blur(10px);
  padding: 20px 40px;
  border-radius: 12px;
  text-align: center;
  color: var(--text);
  box-shadow: var(--shadow);
}
.stat-item .stat-number {
  font-size: 2rem;
  font-weight: bold;
  display: block;
  color: var(--primary);
}
.stat-item .stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--text-secondary);
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  padding: 32px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card .icon {
  width: 56px; height: 56px; border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center; font-size: 28px;
  background: var(--primary-light); margin-bottom: 16px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; }

/* ---------- Product Card ---------- */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.product-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: all var(--transition); background: var(--bg);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card__img {
  height: 180px; background: linear-gradient(135deg, var(--primary-light), #d4e8fc);
  display: flex; align-items: center; justify-content: center; font-size: 64px;
}
.product-card__body { padding: 20px 24px 24px; }
.product-card__body h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.product-card__body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.product-card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.product-card__tags span {
  padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600;
  background: var(--bg-alt); color: var(--text-secondary);
}

/* ---------- Article Card ---------- */
.articles-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}
.article-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); background: var(--bg); display: flex; flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-md); }
.article-card__img {
  height: 200px; background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
  display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--text-muted);
}
.article-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.article-card__meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 16px; }
.article-card__body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.article-card__body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; flex: 1; }
.article-card__footer { display: flex; justify-content: space-between; align-items: center; }
.article-card__read { font-size: 14px; font-weight: 600; color: var(--primary); }

/* ---------- Training Card Styles (参考 htdocs/training/index.html) ---------- */

/* Categories Grid */
.categories-section { margin-bottom: 50px; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Category Card */
.category-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.category-card .category-emoji {
  font-size: 2.5rem;
  margin-bottom: 15px;
}
.category-card h3 {
  color: #1a1a2e;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.category-card p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
}
.category-card .category-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: #888;
}

/* Catalogs Grid */
.catalogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Catalog Card */
.catalog-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  transition: all 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.catalog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.catalog-card .catalog-header {
  margin-bottom: 12px;
}
.catalog-card .catalog-code {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  letter-spacing: 0.5px;
}
.catalog-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.catalog-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.6;
  flex: 1;
}
.catalog-card .catalog-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.catalog-card .btn { margin-top: auto; }

/* Catalog Category Group */
.catalog-category {
  margin-bottom: 60px;
}
.catalog-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.catalog-category-emoji {
  font-size: 1.5rem;
}
.catalog-category-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.catalog-category-count {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Course Card */
.course-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  transition: all 0.3s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.course-card .course-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 20px;
  color: white;
}
.course-card .course-catalog {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 5px;
  display: block;
}
.course-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.course-card .course-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-card .course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}
.course-card .course-level {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.course-card .course-level.beginner,
.course-card .course-level BEGINNER {
  background: #e8f5e9;
  color: #2e844a;
}
.course-card .course-level.intermediate,
.course-card .course-level INTERMEDIATE {
  background: #fff3e0;
  color: #dd7a01;
}
.course-card .course-level.advanced,
.course-card .course-level ADVANCED {
  background: #fce4ec;
  color: #c23934;
}
.course-card .duration {
  font-size: 0.85rem;
  color: #888;
}
.course-card .duration span {
  font-weight: 600;
  color: var(--primary);
}
.course-card .btn { margin-top: 15px; }

/* Lessons List */
.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Lesson Card */
.lesson-card {
  background: white;
  border-radius: 12px;
  padding: 20px 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
}
.lesson-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  border-color: var(--primary-light);
}
.lesson-card .lesson-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
}
.lesson-card .lesson-number span {
  font-size: 14px;
}
.lesson-card .lesson-content {
  flex: 1;
  min-width: 0;
}
.lesson-card .lesson-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
}
.lesson-card .lesson-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.lesson-card .lesson-page {
  font-size: 0.75rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.lesson-card .lesson-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-card .lesson-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lesson-card .lesson-actions .play-btn {
  background: linear-gradient(135deg, var(--accent-green) 0%, #3da35d 100%);
}
.lesson-card .lesson-actions .play-btn:hover {
  background: linear-gradient(135deg, #256b3d 0%, var(--accent-green) 100%);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.9rem;
}

/* ---------- Course Table ---------- */
.course-table-wrap { overflow-x: auto; }
.course-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.course-table th, .course-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.course-table th { background: var(--bg-alt); font-weight: 700; color: var(--text); white-space: nowrap; }
.course-table tr:hover td { background: var(--primary-light); }
.course-table .level { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.level-beginner { background: #e6f7e6; color: #2e844a; }
.level-intermediate { background: #fff3d6; color: #dd7a01; }
.level-advanced { background: #fde6e6; color: #c23934; }

.course-code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-dark);
  color: #fff;
  letter-spacing: 0.5px;
  margin-right: 8px;
  vertical-align: middle;
}

.course-code-link {
  text-decoration: none;
}
.course-code-link:hover .course-code {
  background: var(--primary);
}
.course-table td a {
  color: var(--text);
  text-decoration: none;
}
.course-table td a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---------- Course Cover ---------- */
.course-cover {
  margin-bottom: 16px;
}
.course-cover img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ---------- Course Video Button ---------- */
.course-video-btn-wrap {
  margin-top: 16px;
}
.course-video-btn {
  width: 100%;
}

/* ---------- Video Modal ---------- */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(0,0,0,.85);
}
.video-modal.active {
  display: block;
}
.video-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  cursor: pointer;
}
.video-modal__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 960px;
  z-index: 1;
}
.video-modal__close {
  position: absolute;
  top: -44px;
  right: -4px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background var(--transition);
  z-index: 2;
}
.video-modal__close:hover {
  background: rgba(255,255,255,.3);
}
.video-modal__player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.video-modal__player video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  outline: none;
}

/* ---------- Page Hero (sub pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 60px 0; text-align: center;
}
.page-hero h1 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.page-hero p { font-size: 18px; opacity: .85; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 500; }
.breadcrumb .sep { margin: 0 8px; }

/* ---------- Search & Filter Bar ---------- */
.filter-bar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-bottom: 32px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius);
}
.filter-bar input[type="search"] {
  flex: 1; min-width: 240px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px; outline: none;
  transition: border-color var(--transition);
}
.filter-bar input[type="search"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(1,118,211,.15); }
.filter-bar select {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; background: var(--bg); outline: none; cursor: pointer;
}
.filter-bar .result-count { font-size: 14px; color: var(--text-muted); white-space: nowrap; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin-top: 40px; flex-wrap: wrap;
}
.pagination button {
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all var(--transition); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  user-select: none;
}
.pagination button:hover:not(:disabled):not(.active) {
  background: var(--primary-light); color: var(--primary); border-color: var(--primary);
}
.pagination button.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 700;
}
.pagination button:disabled {
  opacity: .35; cursor: not-allowed; background: var(--bg-alt);
}
.pagination button.nav-btn {
  font-size: 18px; font-weight: 700;
}
.pagination .ellipsis {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 14px; color: var(--text-muted);
  letter-spacing: 2px;
}

/* ---------- Detail Page Layout ---------- */
.detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.detail-main {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  max-width: 100%;
  overflow-x: auto;
}

.detail-main h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.detail-main > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.sidebar-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-card ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  list-style: none;
}

.sidebar-card ul li:last-child {
  border-bottom: none;
}

.sidebar-card ul li strong {
  color: var(--text);
  font-weight: 600;
}

.sidebar-card ul li a {
  color: var(--primary);
  font-weight: 500;
}

.sidebar-card ul li a:hover {
  color: var(--primary-dark);
}

.main-content {
  font-size: 16px;
  line-height: 1.8;
}
.main-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.main-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; }
.main-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; }
.main-content p { margin-bottom: 16px; color: var(--text-secondary); }
.main-content ul, .main-content ol { margin-bottom: 16px; padding-left: 24px; }
.main-content li { margin-bottom: 6px; list-style: disc; color: var(--text-secondary); }
.main-content pre {
  background: #1e1e1e; color: #e0e0e0; padding: 20px; border-radius: var(--radius);
  overflow-x: auto; font-size: 14px; margin-bottom: 16px; line-height: 1.5;
}
.main-content code { font-family: "SF Mono", "Menlo", "Consolas", monospace; }
.main-content img { border-radius: var(--radius); margin: 20px 0; }

.content-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.content-section h2 {
  font-size: 1.2rem;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.content-body {
  color: var(--text-secondary);
  line-height: 1.7;
}

.video-container {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.image-container {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.image-container img {
  max-width: 100%;
  border-radius: 8px;
}

.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.keyword-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
}

.sidebar {
  position: sticky;
  top: 88px;
}
.sidebar-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.sidebar-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.info-list .info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.info-list .info-item:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.info-value {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 400px;
  overflow-y: auto;
}
.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  color: var(--text);
  text-decoration: none;
}
.chapter-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.chapter-item.active {
  background: var(--primary);
  color: #fff;
}
.chapter-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.chapter-item.active .chapter-number {
  background: rgba(255,255,255,0.2);
}
.chapter-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; text-align: center; padding: 64px 0; border-radius: var(--radius-lg);
  margin: 0 24px;
}
.cta-banner h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 18px; opacity: .9; margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,.7); padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px;
  padding: 20px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,.4);
}

/* ---------- Product EDI Styles ---------- */
.edi-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 24px 0; }
.edi-feature-card { background: var(--bg-alt, #f9fafb); border-radius: 12px; padding: 24px; border: 1px solid var(--border, #e5e7eb); transition: transform 0.2s, box-shadow 0.2s; }
.edi-feature-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.edi-feature-card .icon { font-size: 32px; margin-bottom: 12px; }
.edi-feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.edi-feature-card p { font-size: 14px; color: var(--text-secondary, #666); line-height: 1.6; }

.edi-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.edi-module-item { background: var(--bg-alt, #f9fafb); border-radius: 8px; padding: 16px; border: 1px solid var(--border, #e5e7eb); text-align: center; transition: all 0.2s; }
.edi-module-item:hover { border-color: var(--primary, #2563eb); }
.edi-module-item .icon { font-size: 28px; margin-bottom: 8px; }
.edi-module-item h4 { font-size: 14px; margin: 0; }
.edi-module-item a { text-decoration: none; color: inherit; display: block; }
.edi-module-item a:hover { color: var(--primary, #2563eb); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .detail-content { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .detail-sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 16px 24px;
    box-shadow: var(--shadow-lg);
  }
  .mobile-menu-btn { display: flex; }

  .hero { padding: 60px 0 48px; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 16px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stat h3 { font-size: 24px; }

  .section { padding: 48px 0; }
  .section-title { font-size: 28px; }

  .stats-bar { gap: 15px; }
  .stat-item { padding: 15px 25px; }

  .products-grid, .articles-grid { grid-template-columns: 1fr; }
  .catalogs-grid, .courses-grid { grid-template-columns: 1fr; }

  .lesson-card { flex-direction: column; align-items: flex-start; }
  .lesson-card .lesson-actions { width: 100%; justify-content: flex-end; margin-top: 10px; }

  .filter-bar { flex-direction: column; }
  .cta-banner { margin: 0 16px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 26px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .page-hero h1 { font-size: 28px; }
}
