/* ============================================================
   首页样式（home.css）
   移动端优先：内容列最大 640px 居中；桌面端放宽为双栏资讯。
   ============================================================ */

:root {
  --home-green: #1f6f5c;
  --home-green-soft: #eaf4ef;
  --home-blue: #2b6cb0;
  --home-ink: #1f2d27;
  --home-ink-2: #5b6b64;
  --home-line: #e6ece9;
}

body.home-body {
  margin: 0;
  background: #f4f7f5;
  color: var(--home-ink);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  padding-bottom: 76px; /* 给底部导航留位 */
}

/* ---------- 顶部品牌栏 ---------- */
.home-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--home-line);
}
.home-topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--home-green);
}
.home-topnav {
  display: flex;
  gap: 18px;
}
.home-topnav a {
  color: var(--home-ink-2);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 4px;
  border-radius: 8px;
}
.home-topnav a:hover { color: var(--home-green); }
.home-topnav .home-topnav-user {
  color: #fff;
  background: var(--home-green);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- 内容容器 ---------- */
.home-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 顶部大图 + 入口卡片 ---------- */
.hero {
  position: relative;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  min-height: 240px;
  background: linear-gradient(160deg, #7db79b 0%, #4f9a7d 45%, #2e7a60 100%);
  box-shadow: 0 14px 30px rgba(31, 111, 92, 0.18);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-hill {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
}
.hero-hill-1 { width: 420px; height: 420px; left: -120px; bottom: -280px; }
.hero-hill-2 { width: 520px; height: 520px; right: -180px; bottom: -360px; background: rgba(255, 255, 255, 0.08); }
.hero-sun {
  position: absolute;
  width: 90px; height: 90px;
  right: 36px; top: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.35);
}

.hero-card {
  position: relative;
  margin: 84px 14px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  padding: 14px 16px 12px;
}
.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--home-line);
}
.hero-org {
  font-weight: 700;
  font-size: 15px;
  color: var(--home-green);
}
.hero-points { font-size: 13px; color: var(--home-ink-2); }

.hero-entries {
  display: flex;
  align-items: stretch;
  padding: 18px 6px 6px;
}
.hero-entry {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--home-ink);
  padding: 10px 0 2px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.hero-entry:hover { transform: translateY(-2px); background: #f7faf8; }
.hero-entry-cn { font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.hero-entry-en { font-size: 11px; color: #b9c4be; letter-spacing: 0.5px; }
.hero-entry-icon { margin-top: 2px; }
.hero-divider { width: 1px; background: var(--home-line); margin: 8px 4px; }

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 6px;
}
.hero-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d6e0db;
}
.hero-dots .dot-active { background: var(--home-green); }

/* ---------- Banner ---------- */
.banner-section {
  margin: 16px 0 4px;
}
.banner-item {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(31, 111, 92, 0.12);
  cursor: pointer;
}
.banner-item[hidden] { display: none; }
.banner-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  background: #dce8e2;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.banner-dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #c8d5cf;
  transition: width 0.2s ease;
}
.banner-dots .dot-active { width: 16px; border-radius: 3px; background: var(--home-green); }

/* ---------- 最新资讯 ---------- */
.news-section {
  margin-top: 26px;
}
.news-head {
  text-align: center;
  margin-bottom: 14px;
}
.news-head-en {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #d3ded8;
  line-height: 1;
}
.news-head-cn {
  margin: 2px 0 0;
  font-size: 20px;
  color: var(--home-ink);
}
.news-more {
  position: relative;
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--home-green);
  text-decoration: none;
}

.news-list {
  display: grid;
  gap: 10px;
}
.news-card {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--home-line);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.news-card:hover {
  box-shadow: 0 8px 18px rgba(31, 111, 92, 0.10);
  transform: translateY(-1px);
}
.news-no {
  font-size: 20px;
  font-weight: 800;
  color: var(--home-green);
  min-width: 22px;
  line-height: 1.4;
}
.news-main { flex: 1; min-width: 0; }
.news-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-summary {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--home-ink-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: #9aaba3;
}
.news-thumb {
  width: 92px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, #d8ebe1, #bcd9c9);
  flex-shrink: 0;
}
.news-thumb-placeholder {
  width: 92px;
  height: 64px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #d8ebe1, #bcd9c9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c8a76;
  font-size: 11px;
  letter-spacing: 2px;
}
.news-skeleton {
  text-align: center;
  color: #9aaba3;
  font-size: 13px;
  padding: 28px 0;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed var(--home-line);
}
.news-empty { color: #9aaba3; text-align: center; padding: 20px 0; font-size: 13px; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 40;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--home-line);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  padding: 6px 10px;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #8a9a92;
  font-size: 11.5px;
  transition: color 0.15s ease, background 0.15s ease;
}
.bottom-nav-item:hover { color: var(--home-green); }
.bottom-nav-item.active {
  color: var(--home-green);
  background: var(--home-green-soft);
}

/* ---------- 页脚 ---------- */
.home-footer {
  text-align: center;
  color: #9aaba3;
  font-size: 12px;
  padding: 26px 0 18px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  .home-topnav { gap: 10px; }
  .home-topnav a:nth-child(1),
  .home-topnav a:nth-child(2) { display: none; } /* 小屏只留课程中心与我的 */
  .hero { min-height: 210px; }
  .hero-card { margin: 70px 10px 10px; }
  .hero-entry-cn { font-size: 22px; }
  .bottom-nav { left: 12px; right: 12px; transform: none; justify-content: space-around; bottom: 8px; }
}
