:root {
  --orange: #E8752B;
  --orange-light: #F5A623;
  --blue: #2B4C7E;
  --blue-light: #3A6EA5;
  --bg-warm: #FDF6EF;
  --text: #333;
  --text-light: #777;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(43, 76, 126, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 17px;
  color: var(--text);
  background: var(--bg-warm);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-badge {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: bold;
  box-shadow: 0 4px 10px rgba(232, 117, 43, 0.35);
}
.logo-text .name { font-size: 24px; font-weight: bold; color: var(--blue); letter-spacing: 1px; }
.logo-text .domain { font-size: 13px; color: var(--text-light); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 10px 20px;
  font-size: 18px;
  color: var(--text);
  border-radius: 8px;
  transition: all .2s;
  font-weight: 500;
}
.nav a:hover { color: var(--orange); background: #FDF0E5; }
.nav a.active { color: #fff; background: var(--orange); }

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--blue);
  background: none; border: none;
}

/* 页脚 */
.footer {
  background: var(--blue);
  color: #dbe4f0;
  padding: 40px 0 20px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.footer p, .footer a { font-size: 15px; color: #dbe4f0; line-height: 2; }
.footer a:hover { color: var(--orange-light); }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 14px;
  color: #a9bcd4;
}

/* 通用区块标题 */
.section-title {
  text-align: center;
  margin: 50px 0 30px;
}
.section-title h2 {
  font-size: 30px;
  color: var(--blue);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 50px; height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  border-radius: 2px;
}
.section-title p { color: var(--text-light); margin-top: 8px; }

/* Banner */
.banner-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  box-shadow: var(--shadow);
}
.banner-slider { display: flex; transition: transform .6s ease; }
.banner-slide { min-width: 100%; position: relative; }
.banner-slide img { width: 100%; height: 380px; object-fit: cover; }
.banner-slide .banner-text {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  background: rgba(43,76,126,0.75);
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 20px;
  white-space: nowrap;
}
.banner-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.banner-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; }
.banner-dots span.active { background: var(--orange); }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.25); color: #fff; border: none;
  font-size: 22px; cursor: pointer;
}
.banner-arrow:hover { background: var(--orange); }
.banner-arrow.prev { left: 16px; }
.banner-arrow.next { right: 16px; }

/* 课程卡片 */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.course-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s;
}
.course-card:hover { transform: translateY(-6px); }
.course-card img { width: 100%; height: 200px; object-fit: cover; }
.course-card .card-body { padding: 18px 20px 22px; }
.course-card h3 { font-size: 20px; color: var(--blue); margin-bottom: 8px; }
.course-card .intro { color: var(--text-light); font-size: 15px; margin-bottom: 12px; }
.course-card .audience {
  display: inline-block;
  background: #FDF0E5; color: var(--orange);
  padding: 4px 14px; border-radius: 20px; font-size: 14px;
}
.course-cat {
  display: inline-block;
  background: var(--blue); color: #fff;
  padding: 2px 12px; border-radius: 4px; font-size: 13px;
  margin-bottom: 10px;
}

/* 新闻列表 */
.news-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 30px; }
.news-item {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 0;
  border-bottom: 1px dashed #eee;
  cursor: pointer;
  transition: .2s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { color: var(--orange); }
.news-item .thumb { width: 120px; height: 80px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.news-item .news-info { flex: 1; min-width: 0; }
.news-item .title { font-size: 18px; font-weight: 500; color: var(--text); }
.news-item:hover .title { color: var(--orange); }
.news-item .news-excerpt {
  color: var(--text-light); font-size: 14px; margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.news-item .meta { color: var(--text-light); font-size: 14px; white-space: nowrap; }
.news-item .cat-tag {
  background: #eef3fb; color: var(--blue);
  padding: 2px 12px; border-radius: 4px; font-size: 13px; white-space: nowrap;
}

/* 分页 */
.pagination { text-align: center; margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.pagination .pg-btn {
  padding: 10px 26px; border: 1px solid var(--orange); border-radius: 24px;
  background: #fff; color: var(--orange); font-size: 16px; cursor: pointer;
}
.pagination .pg-btn:hover { background: var(--orange); color: #fff; }
.pagination .pg-btn:disabled { border-color: #ddd; color: #ccc; background: #fafafa; cursor: not-allowed; }
.pagination .pg-info { font-size: 15px; color: var(--text-light); }

/* 照片墙 */
.photo-grid {
  columns: 3;
  column-gap: 20px;
}
.photo-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  background: #fff;
}
.photo-item img { width: 100%; display: block; }
.photo-item .photo-cap {
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.photo-item .photo-desc { font-size: 13px; color: var(--text-light); }

/* 关于/联系（富文本内容渲染） */
.about-content { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; }
.about-content h3 { color: var(--blue); margin: 20px 0 10px; font-size: 22px; }
.about-content p { margin-bottom: 14px; color: #555; line-height: 1.9; }
.about-content strong, .about-content b { color: var(--blue); font-weight: bold; }
.about-content div { margin-bottom: 14px; color: #555; line-height: 1.9; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.contact-card h3 { color: var(--blue); margin-bottom: 16px; }
.contact-card .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #eee; font-size: 17px; }
.contact-card .item:last-child { border-bottom: none; }
.contact-card .item .ic { font-size: 24px; }

/* 悬浮管理入口 */
.admin-fab {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 200;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  padding: 14px 20px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(43,76,126,0.4);
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
  border: none;
  transition: transform .2s;
}
.admin-fab:hover { transform: translateY(-3px); }

/* 加载/空状态 */
.loading { text-align: center; padding: 40px; color: var(--text-light); }
.empty { text-align: center; padding: 40px; color: var(--text-light); }

/* 响应式 */
@media (max-width: 900px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { columns: 2; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .banner-slide img { height: 260px; }
  .banner-slide .banner-text { font-size: 16px; padding: 8px 20px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .menu-toggle { display: block; }
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 10px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 20px; font-size: 19px; }
  .course-grid { grid-template-columns: 1fr; }
  .photo-grid { columns: 2; column-gap: 10px; }
  .photo-item { margin-bottom: 10px; }
  .news-item { flex-wrap: wrap; }
  .news-item .thumb { width: 100%; height: 140px; }
  .logo-text .name { font-size: 20px; }
  .banner-slide img { height: 200px; }
  .banner-arrow { width: 32px; height: 32px; font-size: 16px; }
}
