/*============================================
  青伴公益 Qingban Public Welfare
  定制样式表 - Custom Stylesheet
  品牌色: 温暖蓝 #4A90D9 / 柔和橙 #F5A623
 ============================================*/

/* ===== CSS 变量定义 ===== */
:root {
  --qb-primary: #4A90D9;
  --qb-primary-dark: #357ABD;
  --qb-primary-light: #6BA5E7;
  --qb-accent: #F5A623;
  --qb-accent-dark: #E8950F;
  --qb-bg: #F8F9FB;
  --qb-bg-white: #FFFFFF;
  --qb-text: #2D3436;
  --qb-text-light: #636E72;
  --qb-text-muted: #B2BEC3;
  --qb-border: #DFE6E9;
  --qb-gradient: linear-gradient(135deg, #4A90D9 0%, #5B86E5 50%, #667EEA 100%);
  --qb-gradient-warm: linear-gradient(135deg, #4A90D9 0%, #F5A623 100%);
  --qb-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --qb-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --qb-radius: 12px;
  --qb-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局样式 ===== */
body {
  background-color: var(--qb-bg);
  color: var(--qb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== 导航栏 ===== */
.navbar {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow var(--qb-transition);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-weight: 700;
  color: var(--qb-primary) !important;
  font-size: 1.3rem;
}

.navbar-nav .nav-link {
  color: var(--qb-text) !important;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 1rem !important;
  transition: color var(--qb-transition);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--qb-primary);
  border-radius: 2px;
  transition: transform var(--qb-transition);
}

.navbar-nav .nav-link:hover {
  color: var(--qb-primary) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-item.active .nav-link::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-item.active .nav-link {
  color: var(--qb-primary) !important;
}

.navbar-text a {
  color: var(--qb-text-light) !important;
  font-size: 0.9rem;
  transition: color var(--qb-transition);
  padding: 0 0.3rem;
}

.navbar-text a:hover {
  color: var(--qb-primary) !important;
}

/* 移动端导航按钮 */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

/* ===== Hero Banner 渐变区域 ===== */
.hero-banner {
  background: var(--qb-gradient);
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
  text-align: center;
}

/* 装饰性背景圆 */
.hero-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: hero-float 8s ease-in-out infinite;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  animation: hero-float 6s ease-in-out infinite reverse;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* 波浪底部 */
.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: auto;
}

.hero-banner .hero-content {
  position: relative;
  z-index: 2;
}

.hero-banner .hero-title {
  color: #FFFFFF;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.hero-banner .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-banner .hero-btn {
  display: inline-block;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--qb-accent);
  border: none;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
  transition: all var(--qb-transition);
  cursor: pointer;
}

.hero-banner .hero-btn:hover {
  background: var(--qb-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(245, 166, 35, 0.5);
  color: #FFFFFF;
}

.hero-banner .hero-btn-outline {
  display: inline-block;
  padding: 14px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #FFFFFF;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50px;
  text-decoration: none;
  margin-left: 15px;
  transition: all var(--qb-transition);
}

.hero-banner .hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* 粒子装饰点 */
.hero-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.hero-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  animation: dot-pulse 3s ease-in-out infinite;
}

.hero-dot:nth-child(1) { width: 8px; height: 8px; top: 20%; left: 10%; animation-delay: 0s; }
.hero-dot:nth-child(2) { width: 6px; height: 6px; top: 60%; left: 80%; animation-delay: 0.5s; }
.hero-dot:nth-child(3) { width: 10px; height: 10px; top: 30%; left: 70%; animation-delay: 1s; }
.hero-dot:nth-child(4) { width: 5px; height: 5px; top: 70%; left: 20%; animation-delay: 1.5s; }
.hero-dot:nth-child(5) { width: 7px; height: 7px; top: 45%; left: 45%; animation-delay: 2s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.5); }
}

/* 响应式 Hero */
@media (max-width: 768px) {
  .hero-banner {
    padding: 50px 0 90px;
  }
  .hero-banner .hero-title {
    font-size: 1.8rem;
  }
  .hero-banner .hero-subtitle {
    font-size: 0.95rem;
  }
  .hero-banner .hero-btn,
  .hero-banner .hero-btn-outline {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
  .hero-banner .hero-btn-outline {
    margin-left: 8px;
  }
}

/* ===== 区块标题 ===== */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title .title-text {
  font-size: 2rem;
  font-weight: 700;
  color: var(--qb-text);
  margin-bottom: 0.5rem;
}

.section-title .title-bar {
  display: block;
  width: 50px;
  height: 3px;
  background: var(--qb-gradient-warm);
  border-radius: 3px;
  margin: 0 auto 1rem;
}

.section-title .title-sub {
  font-size: 1rem;
  color: var(--qb-text-light);
  font-weight: 400;
  line-height: 1.6;
}

@media (max-width: 576px) {
  .section-title .title-text {
    font-size: 1.5rem;
  }
  .section-title .title-sub {
    font-size: 0.9rem;
  }
}

/* ===== 内容区块通用 ===== */
.section-area {
  padding: 4rem 0;
}

.section-area.bg-light {
  background-color: var(--qb-bg) !important;
}

.section-area.bg-white {
  background-color: var(--qb-bg-white) !important;
}

/* ===== 卡片样式 ===== */
.card {
  border: none;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  transition: all var(--qb-transition);
  overflow: hidden;
  background: #FFFFFF;
  margin: 8px 0;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--qb-shadow-hover);
}

.card-img-top {
  border-radius: var(--qb-radius) var(--qb-radius) 0 0;
  object-fit: cover;
  width: 100%;
  transition: transform var(--qb-transition);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* 移除固定高度限制，使用 aspect-ratio */
.card-img-150,
.card-img-200,
.card-img-180,
.card-img-120,
.card-img-100 {
  height: auto;
  overflow: hidden;
  border-radius: var(--qb-radius) var(--qb-radius) 0 0;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: var(--qb-text);
  transition: color var(--qb-transition);
}

.card-title a:hover {
  color: var(--qb-primary);
}

.card-text {
  color: var(--qb-text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== "查看更多" 按钮 ===== */
.more-link {
  display: inline-block;
  color: var(--qb-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 24px;
  border: 2px solid var(--qb-primary);
  border-radius: 50px;
  transition: all var(--qb-transition);
  text-decoration: none;
}

.more-link:hover {
  background: var(--qb-primary);
  color: #FFFFFF;
  text-decoration: none;
}

/* ===== Footer ===== */
.footer {
  background: #2D3436 !important;
  color: rgba(255, 255, 255, 0.7);
  border-top: none !important;
  margin-top: 0 !important;
}

.footer h5 {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--qb-primary);
  display: inline-block;
}

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

.footer ul li {
  padding: 4px 0;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--qb-transition);
}

.footer a:hover {
  color: var(--qb-accent);
}

.footer .copyright {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.footer .qrcode {
  border-radius: 8px;
  background: #FFFFFF;
  padding: 5px;
  max-width: 120px;
}

.footer .code {
  height: auto;
}

.footer .code img {
  height: auto;
  max-width: 120px;
}

/* ===== 在线客服侧边栏 ===== */
.online dl {
  background: var(--qb-primary);
  border-radius: 8px;
  padding: 12px 6px;
  box-shadow: 0 2px 10px rgba(74, 144, 217, 0.3);
  transition: all var(--qb-transition);
}

.online dl:hover {
  background: var(--qb-primary-dark);
  transform: translateX(-3px);
}

.online dl dt {
  border-radius: 8px;
  box-shadow: var(--qb-shadow-hover);
  border: none;
}

.online dl dt h3 {
  color: var(--qb-text);
  font-size: 15px;
}

.online dl dt button {
  background: var(--qb-accent);
  border-radius: 25px;
  font-size: 15px;
  transition: all var(--qb-transition);
}

.online dl dt button:hover {
  background: var(--qb-accent-dark);
}

.online dl dt input {
  border-radius: 8px;
  border: 1px solid var(--qb-border);
}

.online .scroll-top {
  background: var(--qb-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.online .scroll-top:hover {
  background: #000;
}

/* ===== 移动端底部导航 ===== */
.container-fluid.bg-info.fixed-bottom {
  background: var(--qb-gradient) !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.container-fluid.bg-info.fixed-bottom a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background var(--qb-transition);
}

.container-fluid.bg-info.fixed-bottom a:active {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== 关于我们区块 ===== */
.about-text {
  color: var(--qb-text-light);
  line-height: 2;
  text-indent: 2em;
  font-size: 0.95rem;
}

/* ===== 新闻动态列表 ===== */
.news-item {
  padding: 1rem;
  border-radius: var(--qb-radius);
  transition: all var(--qb-transition);
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 0.5rem;
}

.news-item:hover {
  box-shadow: var(--qb-shadow);
  transform: translateX(5px);
}

.news-item h5 a {
  color: var(--qb-text);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color var(--qb-transition);
}

.news-item h5 a:hover {
  color: var(--qb-primary);
}

.news-item .news-date {
  color: var(--qb-text-muted);
  font-size: 0.85rem;
}

/* ===== 回到顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--qb-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
  transition: all var(--qb-transition);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--qb-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.5);
}

/* ===== 页面加载动画优化 ===== */
.wow {
  visibility: hidden;
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--qb-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--qb-text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--qb-text-light);
}

/* ===== 选中文字颜色 ===== */
::selection {
  background: rgba(74, 144, 217, 0.2);
  color: var(--qb-primary);
}

/* ===== 按钮通用 ===== */
.btn-primary-custom {
  background: var(--qb-primary);
  color: #FFFFFF;
  border: none;
  padding: 10px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--qb-transition);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.btn-primary-custom:hover {
  background: var(--qb-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4);
  color: #FFFFFF;
}

/* ========================================
   内页公共样式
   ======================================== */

/* ===== 内页头部大屏 ===== */
.page-hero {
  background: var(--qb-gradient);
  padding: 50px 0 80px;
  position: relative;
  overflow: hidden;
  margin-bottom: -30px;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--qb-bg);
  border-radius: 20px 20px 0 0;
}

.page-hero-title {
  color: #FFFFFF;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}

.page-hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 35px 0 60px;
  }
  .page-hero-title {
    font-size: 1.4rem;
  }
  .page-hero-sub {
    font-size: 0.9rem;
  }
}

/* ===== 内页容器 ===== */
.pages {
  min-height: 400px;
  padding-top: 20px;
  padding-bottom: 40px;
}

/* ===== 当前位置 ===== */
.position {
  font-size: 0.85rem;
  padding: 8px 0;
}
.position, .position a {
  color: var(--qb-text-muted);
}
.position a:hover {
  color: var(--qb-primary);
}

/* ===== 内容卡片（内页通用） ===== */
.content-card {
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--qb-text);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--qb-primary);
}

.content-card-title i {
  color: var(--qb-primary);
  margin-right: 6px;
}

/* ===== 详情页标题 ===== */
.detail-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--qb-text);
  padding-bottom: 0.8rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--qb-border);
}

.detail-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--qb-text-light);
  font-size: 0.9rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
}

.detail-meta i {
  margin-right: 3px;
  color: var(--qb-primary);
}

/* ===== 上一篇/下一篇 ===== */
.prev-next {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  color: var(--qb-text-light);
  font-size: 0.9rem;
  border-top: 1px solid var(--qb-border);
  margin-top: 1.5rem;
}

.prev-next a {
  color: var(--qb-primary);
}

/* ===== 筛选框 ===== */
.filter-box {
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  padding: 1.2rem;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  flex-shrink: 0;
  width: 80px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--qb-text);
  padding-top: 3px;
}

.filter-tags {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tags .btn-sm {
  font-size: 0.82rem;
}

/* ===== 新闻列表 ===== */
.news-list {
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  overflow: hidden;
}

.news-list-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--qb-border);
  transition: all var(--qb-transition);
}

.news-list-item:last-child {
  border-bottom: none;
}

.news-list-item:hover {
  background: rgba(74, 144, 217, 0.03);
}

.news-list-item h5 {
  margin-bottom: 0.3rem;
}

.news-list-item h5 a {
  color: var(--qb-text);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color var(--qb-transition);
}

.news-list-item h5 a:hover {
  color: var(--qb-primary);
}

.news-list-desc {
  color: var(--qb-text-light);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.news-date {
  color: var(--qb-text-muted);
  font-size: 0.85rem;
}

/* ===== 留言/评论项 ===== */
.msg-item {
  display: flex;
  padding: 1rem 0;
  border-bottom: 1px solid var(--qb-border);
}

.msg-item:last-child {
  border-bottom: none;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 0.8rem;
  flex-shrink: 0;
  object-fit: cover;
}

.msg-body {
  flex: 1;
}

.msg-nickname {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--qb-text);
  margin-bottom: 0.2rem;
}

.msg-content {
  color: var(--qb-text-light);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

.msg-info {
  font-size: 0.8rem;
  color: var(--qb-text-muted);
}

.msg-reply {
  display: flex;
  margin-top: 0.8rem;
  padding: 0.8rem;
  background: var(--qb-bg);
  border-radius: 8px;
}

.replybtn {
  display: inline-block;
  color: var(--qb-primary);
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  transition: color var(--qb-transition);
}

.replybtn:hover {
  color: var(--qb-primary-dark);
}

/* ===== 顶部搜索栏（课程列表页） ===== */
.search-form-top {
  margin-bottom: 1.2rem;
}

.search-form-top .input-group {
  box-shadow: var(--qb-shadow);
  border-radius: 50px;
  overflow: hidden;
}

.search-form-top .form-control {
  border: 2px solid var(--qb-border);
  border-right: none;
  border-radius: 50px 0 0 50px;
  height: 46px;
  padding: 0 20px;
  font-size: 0.95rem;
  transition: border-color var(--qb-transition);
}

.search-form-top .form-control:focus {
  border-color: var(--qb-primary);
  box-shadow: none;
}

.search-form-top .btn-primary-custom {
  border-radius: 0 50px 50px 0;
  padding: 0 28px;
  height: 46px;
  box-shadow: none;
}

.search-form-top .btn-primary-custom:hover {
  box-shadow: none;
}

/* ===== 搜索表单（搜索页） ===== */
.search-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 2rem;
  padding: 1.5rem;
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
}

.search-form .form-group {
  flex: 1;
  max-width: 400px;
  margin-bottom: 0;
}

.search-form .form-control {
  border-radius: 50px;
  border: 2px solid var(--qb-border);
  height: 44px;
  padding: 0 20px;
  transition: border-color var(--qb-transition);
}

.search-form .form-control:focus {
  border-color: var(--qb-primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 217, 0.15);
}

/* ===== 视频播放器 ===== */
.video-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a2e;
}

.video-player {
  width: 100%;
  max-height: 500px;
  display: block;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ===== 表单链接 ===== */
.form-links {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--qb-text-light);
}

.form-links a {
  color: var(--qb-primary);
  font-weight: 500;
}

.form-links a:hover {
  color: var(--qb-primary-dark);
}

/* ===== 分页样式 ===== */
.pagination .page-link {
  color: var(--qb-primary);
  border-radius: 6px;
  margin: 0 2px;
  transition: all var(--qb-transition);
}

.pagination .page-link:hover {
  background: var(--qb-primary);
  color: #FFFFFF;
  border-color: var(--qb-primary);
}

.pagination .page-num-current {
  background: var(--qb-primary);
  border-color: var(--qb-primary);
  color: #FFFFFF;
}

/* ===== 分类导航按钮 ===== */
.sortnav .btn-outline-info {
  color: var(--qb-primary);
  border-color: var(--qb-primary);
}

.sortnav .btn-outline-info:hover {
  background: var(--qb-primary);
  color: #FFFFFF;
}

.sortnav .btn-info {
  background: var(--qb-primary);
  border-color: var(--qb-primary);
}

/* ===== 卡片标题链接 ===== */
.card-title-link {
  color: var(--qb-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--qb-transition);
}

.card-title-link:hover {
  color: var(--qb-primary);
}

/* ===== 表单控件 ===== */
.form-control {
  border-radius: 8px;
  border: 2px solid var(--qb-border);
  padding: 10px 15px;
  transition: border-color var(--qb-transition), box-shadow var(--qb-transition);
}

.form-control:focus {
  border-color: var(--qb-primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 217, 0.15);
}

.form-group label {
  font-weight: 500;
  color: var(--qb-text);
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

/* ===== 视频弹窗 Modal ===== */
.video-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.video-modal-overlay.active {
  display: flex;
}

.video-modal {
  background: #FFFFFF;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--qb-border);
  background: var(--qb-bg);
}

.video-modal-header h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--qb-text);
}

.video-modal-header h5 i {
  color: var(--qb-primary);
  margin-right: 8px;
}

.video-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--qb-text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--qb-transition);
}

.video-modal-close:hover {
  background: rgba(0,0,0,0.08);
  color: var(--qb-text);
}

.video-modal-body {
  background: #000;
}

.video-modal-body video {
  display: block;
}

.video-modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--qb-border);
  background: var(--qb-bg);
}

/* 移动端弹窗适配 */
@media (max-width: 768px) {
  .video-modal {
    width: 95%;
    max-height: 80vh;
    border-radius: 10px;
  }
  .video-modal-header {
    padding: 12px 16px;
  }
  .video-modal-header h5 {
    font-size: 1rem;
  }
  .video-modal-footer {
    padding: 10px 16px;
  }
}

/* ===== 联系信息卡片 ===== */
.contact-info-card {
  text-align: center;
  padding: 1.8rem 1.2rem;
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  transition: all var(--qb-transition);
  height: 100%;
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--qb-shadow-hover);
}

.contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--qb-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #FFFFFF;
}

.contact-info-card h6 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--qb-text);
  margin-bottom: 0.5rem;
}

.contact-info-card p {
  font-size: 0.9rem;
  color: var(--qb-text-light);
  margin: 0;
  line-height: 1.6;
}

.contact-info-card a {
  color: var(--qb-primary);
}

/* ===== 响应式微调 ===== */
@media (max-width: 768px) {
  .section-area {
    padding: 2.5rem 0;
  }
  .card {
    margin: 5px 0;
  }
  .footer .col-12 {
    margin-bottom: 1.5rem;
  }
  .filter-row {
    flex-direction: column;
  }
  .filter-label {
    width: 100%;
    margin-bottom: 0.3rem;
  }
  .detail-title {
    font-size: 1.3rem;
  }
  .prev-next {
    flex-direction: column;
    gap: 0.5rem;
  }
  .content-card {
    padding: 1rem;
  }
  .search-form {
    flex-direction: column;
    align-items: center;
  }
  .search-form .form-group {
    max-width: 100%;
    width: 100%;
  }
  .course-tab {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

/* ========================================
   导航下拉菜单（通用 + 我的课程）
   ======================================== */
/* 所有导航 dropdown 统一样式 */
.navbar-nav .dropdown-menu {
  border: none;
  border-radius: var(--qb-radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 8px 0;
  min-width: 200px;
  animation: dropdownFadeIn 0.25s ease;
  margin-top: 8px;
}

.navbar-nav .dropdown-menu .dropdown-item {
  padding: 10px 20px;
  color: var(--qb-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--qb-transition);
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
  background: rgba(74,144,217,0.06);
  color: var(--qb-primary);
  padding-left: 24px;
}

/* 我的课程 dropdown 额外样式 */
.mycourse-dropdown {
  border: none;
  border-radius: var(--qb-radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 8px 0;
  min-width: 220px;
  animation: dropdownFadeIn 0.25s ease;
  margin-top: 8px;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mycourse-dropdown .dropdown-item {
  padding: 10px 20px;
  color: var(--qb-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--qb-transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mycourse-dropdown .dropdown-item i {
  color: var(--qb-primary);
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mycourse-dropdown .dropdown-item:hover {
  background: rgba(74,144,217,0.06);
  color: var(--qb-primary);
  padding-left: 24px;
}

.mycourse-dropdown .dropdown-item-desc {
  font-size: 0.78rem;
  color: var(--qb-text-muted);
  font-weight: 400;
  margin-top: 2px;
  margin-left: 28px;
}

.mycourse-dropdown .dropdown-divider {
  margin: 4px 0;
  border-color: var(--qb-border);
}

/* 移动端导航中的下拉菜单样式 */
@media (max-width: 991px) {
  .mycourse-dropdown {
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
    background: transparent;
  }
  .mycourse-dropdown .dropdown-item {
    padding: 8px 24px;
    font-size: 0.9rem;
  }
  .mycourse-dropdown .dropdown-item-desc {
    display: none !important;
  }
}

/* ========================================
   我的课程 — 选课按钮
   ======================================== */
.hero-btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--qb-primary);
  background: transparent;
  border: 2px solid var(--qb-primary);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--qb-transition);
  white-space: nowrap;
}

.hero-btn-outline-sm:hover {
  background: var(--qb-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74,144,217,0.3);
}

.hero-btn-outline-sm.enrolled {
  background: #28a745;
  border-color: #28a745;
  color: #FFFFFF;
}

.hero-btn-outline-sm.enrolled:hover {
  background: #218838;
  border-color: #218838;
  box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

/* Toast 提示 */
.enroll-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  padding: 12px 24px;
  border-radius: 8px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.enroll-toast.show {
  transform: translateX(0);
}

.enroll-toast.toast-success {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.enroll-toast.toast-error {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

/* ========================================
   我的课程 — 课程卡片
   ======================================== */
.my-course-card {
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  overflow: hidden;
  transition: all var(--qb-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.my-course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--qb-shadow-hover);
}

.my-course-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--qb-bg);
}

.my-course-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--qb-transition);
}

.my-course-card:hover .my-course-cover img {
  transform: scale(1.05);
}

.my-course-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
  backdrop-filter: blur(4px);
}

.my-course-status.status-completed {
  background: rgba(40,167,69,0.85);
}

.my-course-status.status-progress {
  background: rgba(74,144,217,0.85);
}

.my-course-status.status-new {
  background: rgba(108,117,125,0.85);
}

.my-course-body {
  padding: 1rem 1.2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.my-course-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--qb-text);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  min-height: 3em;
}

.my-course-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--qb-text-muted);
}

.my-course-meta i {
  color: var(--qb-primary);
  margin-right: 3px;
}

.my-course-progress {
  margin-top: auto;
}

.my-course-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.my-course-actions .btn-sm {
  font-size: 0.82rem;
  padding: 5px 14px;
}

/* 空状态 */
.empty-state {
  padding: 3rem 1rem;
}

.empty-state .empty-icon {
  opacity: 0.5;
}

/* ========================================
   我的课程 — 统计卡片
   ======================================== */
.stats-card {
  background: #FFFFFF;
  border-radius: var(--qb-radius);
  box-shadow: var(--qb-shadow);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--qb-transition);
  height: 100%;
}

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

.stats-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stats-body {
  flex: 1;
}

.stats-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--qb-text);
  line-height: 1.2;
}

.stats-label {
  font-size: 0.82rem;
  color: var(--qb-text-muted);
  margin-top: 2px;
}

/* 统计卡片响应式 */
@media (max-width: 576px) {
  .stats-card {
    padding: 0.8rem;
    gap: 0.6rem;
  }
  .stats-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1rem;
  }
  .stats-number {
    font-size: 1.2rem;
  }
  .stats-label {
    font-size: 0.72rem;
  }
}


/* ===== 视频章节样式 ===== */
.video-chapters {
  border-radius: 0 0 8px 8px;
}
.chapter-btn {
  display: inline-block;
  padding: 5px 14px;
  margin: 2px;
  border: 1px solid #d4d4d4;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chapter-btn:hover {
  border-color: var(--qb-primary);
  color: var(--qb-primary);
  background: #f0f5ff;
}
.chapter-btn.active {
  background: var(--qb-gradient);
  color: #fff;
  border-color: transparent;
}

/* ===== 课件下载样式 ===== */
.courseware-section .content-card {
  background: #fafbfc;
  border: 1px solid #e8ecf1;
}
.courseware-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.courseware-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid #e0e4e9;
  border-radius: 8px;
  text-decoration: none !important;
  color: #333;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}
.courseware-file-item:hover {
  border-color: var(--qb-primary);
  box-shadow: 0 2px 12px rgba(102,126,234,0.12);
  transform: translateY(-1px);
  color: var(--qb-primary);
}
.courseware-file-item .file-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.courseware-file-item .fa-file-pdf-o { color: #e74c3c; }
.courseware-file-item .fa-file-powerpoint-o { color: #e67e22; }
.courseware-file-item .fa-file-word-o { color: #2980b9; }
.courseware-file-item .fa-file-excel-o { color: #27ae60; }
.courseware-file-item .fa-file-archive-o { color: #8e44ad; }
.courseware-file-item .download-icon {
  color: #aaa;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.courseware-file-item:hover .download-icon {
  color: var(--qb-primary);
}

/* ===== 视频防下载保护层 ===== */
.video-protect-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: transparent;
  pointer-events: none;  /* 允许点击穿透到video控件 */
}
/* 视频弹窗body需要relative定位 */
.video-modal-body {
  position: relative;
}

/* 视频水印（半透明文字）*/
.video-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  font-size: 2.5rem;
  color: rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  user-select: none;
  font-weight: bold;
  letter-spacing: 0.2em;
}