﻿/* ========== 众智商学院 - icourse163 风格 ========== */
:root {
  --primary: #1a56db;
  --primary-hover: #2563eb;
  --primary-light: #dbeafe;
  --secondary: #059669;
  --accent: #ea580c;
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --text: #333;
  --text-dim: #888;
  --text-bright: #1a1a1a;
  --border: #e8e8e8;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ========== Top Header Bar ========== */
.topbar {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar .logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.topbar .nav-cates {
  display: flex;
  gap: 4px;
  flex: 1;
}

.topbar .nav-cates a {
  padding: 8px 14px;
  color: var(--text);
  font-size: 14px;
  border-radius: 4px;
  transition: 0.2s;
  white-space: nowrap;
}
.topbar .nav-cates a:hover,
.topbar .nav-cates a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.topbar .search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 16px;
  background: #fafafa;
  transition: 0.3s;
  min-width: 200px;
}
.topbar .search-box:focus-within {
  border-color: var(--primary);
  background: #fff;
}
.topbar .search-box input {
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: 13px;
  width: 100%;
  background: transparent;
}
.topbar .search-box .search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 16px;
  padding: 4px;
}

/* ========== Main Layout ========== */
.page-wrap { padding-top: 60px; }

/* ========== Banner ========== */
.banner {
  background: linear-gradient(135deg, #1a56db 0%, #059669 100%);
  padding: 48px 20px;
  color: #fff;
}
.banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.banner h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.banner p { font-size: 1rem; opacity: 0.9; line-height: 1.8; margin-bottom: 20px; }
.banner .banner-btn {
  display: inline-block;
  padding: 12px 32px;
  background: #fff;
  color: var(--primary) !important;
  border-radius: 24px;
  font-weight: 600;
  font-size: 15px;
  transition: 0.3s;
}
.banner .banner-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.banner .banner-stats { display: flex; gap: 32px; margin-top: 24px; }
.banner .banner-stats .bs-item { text-align: center; }
.banner .banner-stats .bs-num { font-size: 1.8rem; font-weight: 700; }
.banner .banner-stats .bs-label { font-size: 0.82rem; opacity: 0.8; }

/* ========== Section ========== */
.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 20px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
}
.section-title .more:hover { color: var(--primary); }

/* ========== Course Card Grid ========== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.course-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.course-card .cc-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
  position: relative;
}
.course-card .cc-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.course-card .cc-body { padding: 16px; }
.course-card .cc-body h3 { font-size: 15px; font-weight: 600; color: var(--text-bright); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card .cc-body .cc-org { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.course-card .cc-body .cc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-dim); padding-top: 10px; border-top: 1px solid var(--border); }
.course-card .cc-body .cc-meta .cc-students { color: var(--primary); font-weight: 600; }

/* ========== Breadcrumb ========== */
.breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-dim);
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }

/* ========== Course Detail Page ========== */
.detail-header {
  background: linear-gradient(135deg, #1a56db 0%, #059669 100%);
  color: #fff;
  padding: 40px 20px;
}
.detail-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
}
.detail-header .dh-thumb {
  width: 300px;
  height: 170px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.detail-header .dh-info h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.detail-header .dh-info .dh-org { font-size: 14px; opacity: 0.85; margin-bottom: 12px; }
.detail-header .dh-info .dh-desc { font-size: 14px; line-height: 1.8; opacity: 0.9; margin-bottom: 16px; }
.detail-header .dh-info .dh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-header .dh-info .dh-tags span { background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 12px; font-size: 12px; }
.detail-header .dh-info .dh-btn { display: inline-block; padding: 10px 28px; background: #fff; color: var(--primary) !important; border-radius: 20px; font-weight: 600; font-size: 14px; }

.detail-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}

.detail-body .db-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.detail-body .db-section h3 { font-size: 1rem; font-weight: 700; color: var(--text-bright); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }
.detail-body .db-section ul { list-style: none; }
.detail-body .db-section ul li { padding: 8px 0; padding-left: 20px; position: relative; color: var(--text); font-size: 14px; border-bottom: 1px dashed var(--border); }
.detail-body .db-section ul li:last-child { border-bottom: none; }
.detail-body .db-section ul li::before { content: "▸"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

.detail-sidebar .ds-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.detail-sidebar .ds-card h4 { font-size: 14px; font-weight: 700; color: var(--text-bright); margin-bottom: 12px; }
.detail-sidebar .ds-card p { font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.detail-sidebar .ds-card .ds-phone { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin: 8px 0; }

/* ========== Footer ========== */
.footer {
  background: #333;
  color: #ccc;
  padding: 40px 20px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer h5 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer p, .footer a { font-size: 13px; color: #aaa; line-height: 2; }
.footer a:hover { color: #fff; }
.footer .footer-bottom { grid-column: 1 / -1; text-align: center; padding-top: 20px; border-top: 1px solid #444; margin-top: 20px; font-size: 12px; color: #888; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .banner-inner { grid-template-columns: 1fr; }
  .detail-header-inner { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar .nav-cates { display: none; }
  .topbar .search-box { min-width: 120px; }
  .detail-header .dh-thumb { width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .course-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
