/* ============================================================
   河北劳动关系职业学院 — 清华风首页设计系统
   主色：匠人红 #8B1528 | 学术蓝 #1a3a5c
   辅色：中兴灰 #F5F5F5 | 点缀：金色 #C9A96E
   ============================================================ */

/* ===== 1. CSS Variables ===== */
:root {
  --red: #8B1528;
  --red-light: #A01830;
  --red-dark: #6B0F1E;
  --gold: #C9A96E;
  --blue: #1a3a5c;
  --blue-light: #2a5a8c;

  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #CCCCCC;
  --gray-600: #555555;
  --gray-800: #1A1A1A;

  --text: #222222;
  --text-secondary: #555555;
  --text-muted: #888888;
  --bg: #FFFFFF;
  --bg-warm: #F5F5F5;
  --border: #E5E5E5;

  --font-serif: "Songti SC", "SimSun", "STSong", "Noto Serif SC", serif;
  --font-sans: "PingFang SC", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;

  --container-max: 1200px;
  --header-height: 70px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.12);
}

/* ===== 2. Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, button, textarea, select { font: inherit; outline: none; }
button { cursor: pointer; border: none; background: none; }

.container, .inner { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* ===== 3. Loading Overlay ===== */
.page-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 400ms ease, visibility 400ms ease;
}
.page-loading.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 4. Scroll Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== 5. Header ===== */
.header {
  background: #fff;
  border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 100;
}
.header .inner {
  max-width: var(--container-max); margin: 0 auto; padding: 0 20px;
}

/* Row 1: School Logo + Dept Name | Return + Search */
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  border-bottom: 1px solid var(--gray-200);
}
.header-logo {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.school-logo-img {
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.dept-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 3px;
  white-space: nowrap;
}
.header-actions {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.btn-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
  padding: 6px 16px; border: 1px solid var(--gray-200);
  border-radius: 4px; transition: all var(--transition-fast);
}
.btn-back:hover {
  color: var(--red); border-color: var(--red);
}
.btn-back svg { width: 14px; height: 14px; }
.search-bar {
  display: flex; align-items: center;
  background: var(--gray-100);
  border-radius: 20px; padding: 0 4px 0 16px;
  border: 1px solid var(--gray-200);
  transition: border-color var(--transition-fast);
}
.search-bar:focus-within { border-color: var(--red); }
.search-bar input {
  border: none; background: transparent; outline: none;
  font-size: 13px; width: 160px; padding: 8px 0;
  color: var(--text);
}
.search-bar input::placeholder { color: #bbb; }
.search-bar button {
  width: 32px; height: 32px; border: none;
  background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition-fast);
}
.search-bar button:hover { background: var(--red-dark); }
.search-bar button svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2; }

/* Row 2: Department Navigation */
.header-nav {
  display: flex; align-items: center;
  height: 48px;
}
.header-nav .nav-item {
  flex: 1; text-align: center;
  font-size: 15px; font-weight: 500;
  padding: 12px 0;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.header-nav .nav-item:hover { color: var(--red); }
.header-nav .nav-item.active {
  color: var(--red);
}
.header-nav .nav-item.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; background: var(--red);
  border-radius: 2px;
}

/* Mobile menu toggle (legacy, keep for mobile) */
.menu-toggle {
  display: none; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  color: var(--text);
}

/* ===== 6. Hero Banner ===== */
.hero-banner {
  position: relative; height: 600px; overflow: hidden;
  background: linear-gradient(135deg, var(--red-dark), var(--red) 50%, var(--blue) 100%);
}
.hero-slides { position: relative; width: 100%; height: 100%; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.8s var(--ease), opacity 0.8s var(--ease);
  will-change: transform, opacity;
  pointer-events: none;
  opacity: 0;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 8s ease forwards;
}
@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}
.hero-slide .slide-text {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  text-align: center; z-index: 3; color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  max-width: 800px; padding: 0 24px;
}
.slide-text h2 {
  font-family: var(--font-serif); font-size: 36px;
  font-weight: 900; margin-bottom: 12px;
}
.slide-text p { font-size: 16px; opacity: 0.9; }

/* Banner Overlay */
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}
.hero-slide a, .hero-slide img { position: relative; z-index: 2; }

/* Banner Arrows */
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; width: 48px; height: 48px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  color: #fff; transition: background var(--transition-fast);
}
.banner-arrow:hover { background: rgba(255,255,255,0.3); }
.banner-arrow svg { width: 20px; height: 20px; }
.banner-prev { left: 24px; }
.banner-next { right: 24px; }

/* Banner Progress */
.banner-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 10; height: 3px; background: rgba(255,255,255,0.2);
}
.banner-progress-track { height: 100%; }
.banner-progress-fill {
  height: 100%; background: var(--gold); width: 0;
}
.banner-progress-fill.playing {
  animation: bannerProgress 5s linear forwards;
}
@keyframes bannerProgress {
  from { width: 0; } to { width: 100%; }
}

/* Banner Counter */
.banner-counter {
  position: absolute; bottom: 24px; right: 24px;
  z-index: 10; color: #fff; font-size: 13px;
  background: rgba(0,0,0,0.3); backdrop-filter: blur(4px);
  padding: 4px 12px; border-radius: 4px;
}

/* ===== 7. Stats Bar ===== */
.stats-bar {
  background: var(--gray-800);
  padding: 32px 0;
}
.stats-bar .inner {
  max-width: var(--container-max); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-serif); font-size: 36px;
  font-weight: 900; color: var(--gold);
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ===== 8. Section Common ===== */
.section { padding: 80px 0; }
.section .inner { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

.section-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 48px; border-bottom: 2px solid var(--gray-200);
  padding-bottom: 16px;
}
.section-header .left { display: flex; align-items: baseline; gap: 16px; }
.section-header h3 {
  font-family: var(--font-serif); font-size: 28px;
  font-weight: 900; color: var(--text);
}
.section-header .en {
  font-size: 12px; color: var(--text-muted); letter-spacing: 2px;
  text-transform: uppercase;
}
.section-header .more {
  font-size: 14px; color: var(--red); font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.section-header .more:hover { text-decoration: underline; }
.section-header .arrow { transition: transform var(--transition-fast); }
.section-header .more:hover .arrow { transform: translateX(4px); }

/* ===== 9. News Section ===== */
.news-section { background: var(--gray-50); }
.news-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; }
.news-carousel {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 16/9; min-height: 280px; background: var(--gray-100);
}
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 30px 24px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
}
.carousel-overlay .carousel-date {
  display: inline-block; padding: 4px 12px;
  background: var(--red); font-size: 12px;
  margin-bottom: 10px; border-radius: 2px;
}
.carousel-overlay h4 {
  font-size: 16px; font-weight: 700; line-height: 1.4;
}
.carousel-nav { position: absolute; bottom: 16px; right: 20px; display: flex; gap: 8px; z-index: 2; }
.carousel-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.5);
  cursor: pointer; padding: 0; transition: background 0.3s;
}
.carousel-dot.active { background: #fff; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.3); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; z-index: 2;
}
.news-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.news-list { display: flex; flex-direction: column; gap: 0; }
.news-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  transition: padding-left var(--transition-fast);
}
.news-list-item:hover { padding-left: 8px; }
.news-num {
  font-family: var(--font-serif); font-size: 18px;
  font-weight: 900; color: var(--gray-200);
  min-width: 28px; line-height: 1;
}
.news-list-item:hover .news-num { color: var(--red); }
.news-info { flex: 1; }
.news-info h5 {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 1;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-date { font-size: 12px; color: var(--text-muted); }

/* ===== 10. Notice Section ===== */
.notice-section { background: #fff; }
.notice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.notice-item {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 0;
  border-bottom: 1px dashed var(--gray-200);
  transition: padding-left var(--transition-fast);
}
.notice-item:hover { padding-left: 8px; }
.notice-badge {
  min-width: 56px; height: 56px;
  background: var(--red);
  color: #fff; border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notice-day { font-size: 20px; font-weight: 900; line-height: 1; }
.notice-month { font-size: 10px; opacity: 0.8; }
.notice-title {
  font-size: 15px; font-weight: 500; line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.notice-arrow { color: var(--gray-200); font-size: 18px; transition: all var(--transition-fast); }
.notice-item:hover .notice-arrow { color: var(--red); transform: translateX(4px); }

/* ===== 11. Major Section ===== */
.major-section { background: var(--gray-50); }
.major-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.major-card {
  background: #fff;
  border-radius: 8px;
  padding: 36px 24px;
  text-align: center;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
  position: relative; overflow: hidden;
}
.major-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--red);
  transform: scaleX(0); transition: transform var(--transition-normal);
}
.major-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.major-card:hover::before { transform: scaleX(1); }
.major-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: var(--red-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.major-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; }
.major-icon img { width: 28px; height: 28px; object-fit: contain; }
.major-card h4 {
  font-size: 17px; font-weight: 700; margin-bottom: 10px;
}
.major-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 12. Student Section ===== */
.student-section { background: #fff; }
.student-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.student-card {
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
}
.student-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.student-card-img {
  height: 200px; overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}
.student-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.student-card:hover .student-card-img img { transform: scale(1.05); }
.student-card-info { padding: 20px; }
.student-date { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.student-card-info h4 {
  font-size: 15px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 13. CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  padding: 80px 0;
  text-align: center; color: #fff;
}
.cta-section .inner { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.cta-section h3 {
  font-family: var(--font-serif); font-size: 36px;
  font-weight: 900; margin-bottom: 16px;
}
.cta-section .accent { color: var(--gold); }
.cta-section p { font-size: 16px; opacity: 0.8; margin-bottom: 32px; }
.btn-cta {
  display: inline-block;
  padding: 16px 48px;
  background: var(--gold);
  color: var(--gray-800);
  font-size: 16px; font-weight: 700;
  border-radius: 4px;
  transition: all var(--transition-fast);
}
.btn-cta:hover { background: #fff; color: var(--red); }

/* ===== 14. Footer ===== */
.footer {
  background: linear-gradient(180deg, var(--red-dark) 0%, #1A1A1A 100%);
  color: rgba(255,255,255,0.65);
  font-size: 14px;
}
.footer-main {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px; padding: 20px 0 16px;
}
.footer-brand p { font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.55); }
.footer-qr-row { display: flex; gap: 12px; margin-top: 10px; }
.footer-qr-item { text-align: center; }
.footer-qr-item .qr-img {
  width: 80px; height: 80px; border-radius: 6px;
  background: rgba(255,255,255,0.08); margin-bottom: 4px;
  display: block; object-fit: cover;
}
.footer-qr-item p { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.footer-col h5 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.footer-col ul li { margin-bottom: 4px; }
.footer-col ul li a { font-size: 12px; color: rgba(255,255,255,0.5); transition: color 150ms; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom-bar {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 0; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-icp { font-size: 12px; color: rgba(255,255,255,0.3); white-space: nowrap; }
.footer-icp a { color: rgba(255,255,255,0.4); }
.footer-icp a:hover { color: #fff; }

/* ===== 15. Page Hero (for channel/article pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--red-dark), var(--blue));
  padding: 120px 0 60px;
  text-align: center; color: #fff;
  position: relative;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="g" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M0 10L10 0" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect fill="url(%23g)" width="100" height="100"/></svg>') repeat;
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero h1 {
  font-family: var(--font-serif); font-size: 36px;
  font-weight: 900; margin-bottom: 12px;
}
.page-hero p { font-size: 16px; opacity: 0.8; max-width: 600px; margin: 0 auto; }
.page-hero-sm { padding: 100px 0 40px; }
.page-hero-sm h1 { font-size: 28px; }

/* ===== 16. Breadcrumb ===== */
.page-breadcrumb {
  background: var(--gray-100); padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.page-breadcrumb .container {
  max-width: var(--container-max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; font-size: 13px;
}
.page-breadcrumb a { color: var(--text-secondary); }
.page-breadcrumb a:hover { color: var(--red); }
.page-breadcrumb .sep { color: var(--gray-300); margin: 0 8px; }
.page-breadcrumb .current { color: var(--text-muted); }

/* ===== 17. Channel Page ===== */
.channel-section { padding: 60px 0; }
.channel-section .container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.channel-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.channel-article-list { display: flex; flex-direction: column; gap: 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-500); font-size: 14px; }
.channel-article-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-200);
  transition: padding-left var(--transition-fast);
}
.channel-article-item:hover { padding-left: 8px; }
.cai-num {
  font-family: var(--font-serif); font-size: 24px;
  font-weight: 900; color: var(--gray-200);
  min-width: 36px; line-height: 1;
}
.channel-article-item:hover .cai-num { color: var(--red); }
.cai-info { flex: 1; }
.cai-info h3 {
  font-size: 17px; font-weight: 600; margin-bottom: 8px; line-height: 1.5;
}
.cai-summary {
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.cai-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 16px; }

/* Sidebar */
.sidebar { position: sticky; top: 100px; }
.sidebar-title {
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--red);
}
.sidebar-link {
  display: block; padding: 10px 16px; font-size: 14px;
  border-radius: 4px; margin-bottom: 4px;
  transition: all var(--transition-fast);
}
.sidebar-link:hover { background: var(--gray-50); color: var(--red); }
.sidebar-link.active { background: var(--red); color: #fff; }
.sidebar-hot { margin-top: 32px; }
.sidebar-hot-item {
  display: block; padding: 8px 0; font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-hot-item:hover { color: var(--red); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 40px;
}
.pagination a, .pagination span {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: 14px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-fast);
}
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination .active { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== 18. Article Detail ===== */
.article-section { padding: 60px 0; }
.article-section .container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.article-detail-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.article-detail {
  background: #fff; border-radius: 8px;
  padding: 40px;
  border: 1px solid var(--gray-200);
}
.article-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-200); }
.article-title {
  font-family: var(--font-serif); font-size: 28px;
  font-weight: 900; line-height: 1.4; margin-bottom: 16px;
}
.article-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; flex-wrap: wrap; }

.article-content {
  font-size: 16px; line-height: 2;
}
.article-content img { max-width: 100%; margin: 24px 0; border-radius: 8px; }
.article-content p { margin-bottom: 16px; }
.article-content h1, .article-content h2, .article-content h3 {
  font-family: var(--font-serif); margin: 32px 0 16px;
}
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content blockquote {
  border-left: 3px solid var(--red); padding: 16px 24px;
  background: var(--gray-50); margin: 24px 0;
}

.article-tags { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-200); }
.tags-label { font-size: 14px; color: var(--text-muted); margin-right: 8px; }
.tag-item {
  display: inline-block; padding: 4px 12px;
  background: var(--gray-100); border-radius: 4px;
  font-size: 12px; margin-right: 8px;
}
.tag-item:hover { background: var(--red); color: #fff; }

.article-nav {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--gray-200);
  display: flex; flex-direction: column; gap: 12px;
}
.article-nav-prev, .article-nav-next {
  font-size: 14px; color: var(--text-secondary);
  padding: 12px 16px; border-radius: 4px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-fast);
}
.article-nav-prev:hover, .article-nav-next:hover { border-color: var(--red); color: var(--red); }

/* ===== 19. Single Page ===== */
.single-page-section { padding: 60px 0; }
.single-page-section .container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.single-page-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.single-page-body-wrap {
  background: #fff; border-radius: 8px; padding: 40px;
  border: 1px solid var(--gray-200);
}
.single-page-body-wrap h1 {
  font-family: var(--font-serif); font-size: 28px;
  text-align: center; margin-bottom: 16px;
}
.single-page-body-wrap .article-content { padding: 0 24px; }
.single-page-empty {
  text-align: center; padding: 80px 0;
  color: var(--text-muted); font-size: 16px;
}

/* ===== 20. Gallery ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.gallery-card {
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gallery-card-img {
  height: 220px; overflow: hidden; position: relative;
  background: var(--gray-100);
}
.gallery-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.gallery-card:hover .gallery-card-img img { transform: scale(1.05); }
.gallery-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3); opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
}
.gallery-card:hover .gallery-card-overlay { opacity: 1; }
.gallery-zoom-icon { width: 32px; height: 32px; stroke: #fff; fill: none; stroke-width: 2; }
.gallery-card-info { padding: 16px; }
.gallery-card-info h3 { font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.gallery-card-info p { font-size: 12px; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-card-date { font-size: 12px; color: var(--text-muted); display: block; margin-top: 8px; }

/* ===== 21. Search ===== */
.search-section { padding: 60px 0; }
.search-section .container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.search-form-wrap { margin-bottom: 40px; }
.search-form {
  display: flex; gap: 12px; max-width: 600px; margin: 0 auto;
}
.search-form input {
  flex: 1; padding: 12px 20px; border: 2px solid var(--gray-200);
  border-radius: 8px; font-size: 16px;
}
.search-form input:focus { border-color: var(--red); }
.search-form button {
  padding: 12px 32px; background: var(--red); color: #fff;
  border-radius: 8px; font-size: 16px; font-weight: 600;
  transition: background var(--transition-fast);
}
.search-form button:hover { background: var(--red-dark); }

/* ===== 22. Message Board ===== */
.message-board-section { padding: 60px 0; }
.message-board-section .container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* ===== 23. Responsive ===== */
@media (max-width: 1024px) {
  .header-nav { display: none; }
  .header-actions { display: none; }
  .menu-toggle { display: flex; }
  .header-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: 16px;
    box-shadow: var(--shadow-lg); z-index: 100;
  }
  .header-nav.open .nav-item { padding: 12px 16px; flex: none; text-align: left; }
  .hero-banner { height: 400px; }
  .stats-bar .inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-carousel { min-height: 200px; }
  .notice-list { grid-template-columns: 1fr; }
  .major-grid { grid-template-columns: repeat(2, 1fr); }
  .student-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .channel-wrap { grid-template-columns: 1fr; }
  .article-detail-wrap { grid-template-columns: 1fr; }
  .single-page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  .header-top { flex-direction: column; height: auto; gap: 12px; padding: 12px 0; }
  .header-actions { width: 100%; justify-content: center; }
  .search-bar { flex: 1; }
  .search-bar input { width: 120px; }
  .header-nav { flex-wrap: wrap; }
  .header-nav .nav-item { flex: 0 0 33.33%; font-size: 14px; }
  .dept-name { font-size: 16px; }
  .school-logo-img { height: 36px; }
  .hero-banner { height: 320px; }
  .slide-text h2 { font-size: 24px; }
  .slide-text p { font-size: 13px; }
  .stats-bar .inner { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 28px; }
  .section { padding: 48px 0; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-header h3 { font-size: 22px; }
  .major-grid { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .article-title { font-size: 22px; }
  .article-detail { padding: 24px; }
  .page-hero h1 { font-size: 28px; }
}
@media (max-width: 480px) {
  .hero-banner { height: 260px; }
  .slide-text h2 { font-size: 20px; }
  .slide-text { bottom: 40px; }
  .banner-arrow { display: none; }
  .banner-counter { display: none; }
  .banner-progress { height: 2px; }
  .stats-bar { padding: 20px 0; }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 11px; }
  .notice-badge { min-width: 44px; height: 44px; }
  .notice-day { font-size: 16px; }
  .major-card { padding: 24px 16px; }
}

/* ===== Mobile: dept_tsinghua inline-style overrides ===== */
@media (max-width: 768px) {
  /* Leader grid inline override */
  .section > .inner > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }
  .section > .inner > div[style*="grid-template-columns"] h4 {
    font-size: 15px !important;
  }
  .section > .inner > div[style*="grid-template-columns"] img {
    width: 80px !important;
    height: 80px !important;
  }
  .section > .inner > div[style*="grid-template-columns"] p {
    font-size: 12px !important;
  }
  /* Gallery full-width no sidebar */
  .main-content-full { grid-column: 1 / -1; }
  /* Breadcrumb scrollable */
  .page-breadcrumb { overflow-x: auto; }
  .page-breadcrumb .container { white-space: nowrap; }
  /* Article content images */
  .article-content img { margin: 16px 0; }
  /* Page hero smaller */
  .page-hero { padding: 80px 0 40px; }
  .page-hero-sm { padding: 70px 0 30px; }
  .page-hero h1 { font-size: 24px; }
  .page-hero-sm h1 { font-size: 20px; }
  .page-hero p { font-size: 14px; }
  /* Breadcrumb */
  .page-breadcrumb { padding: 8px 0; font-size: 12px; }
  /* Article nav */
  .article-nav-prev, .article-nav-next { font-size: 13px; padding: 10px 12px; }
  /* Gallery card image smaller */
  .gallery-card-img { height: 160px; }
  /* Student card image smaller */
  .student-card-img { height: 160px; }
}
@media (max-width: 480px) {
  .section > .inner > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .section > .inner > div[style*="grid-template-columns"] img {
    width: 64px !important;
    height: 64px !important;
  }
  .page-hero { padding: 60px 0 30px; }
  .page-hero h1 { font-size: 20px; }
  .article-detail { padding: 16px; }
  .article-title { font-size: 18px; }
  .article-content { font-size: 15px; }
  .gallery-card-img { height: 140px; }
}

/* ===== Mobile comprehensive overflow protection (<=768px) ===== */
@media (max-width: 768px) {
  /* Global overflow prevention */
  html, body { overflow-x: hidden !important; }
  .container, .inner {
    width: 100% !important; max-width: none !important;
    padding: 0 16px !important; box-sizing: border-box !important;
  }
  /* Header full width */
  .header-wrap, .header { width: 100% !important; left: 0 !important; right: 0 !important; }
  .header-top { padding: 10px 16px !important; flex-wrap: wrap !important; gap: 8px !important; }
  .header-nav { display: flex !important; flex-wrap: wrap !important; gap: 4px !important; }
  .header-nav .nav-item { flex: 0 0 auto !important; font-size: 13px !important; padding: 6px 10px !important; }
  .header-nav .nav-item.active { font-weight: 700; color: var(--red); }
  .dept-name { font-size: 14px !important; }
  .school-logo-img { height: 32px !important; }
  /* Hero banner: auto height with aspect ratio */
  .hero-banner { height: auto !important; aspect-ratio: 16 / 9 !important; }
  .hero-slide img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
  .slide-text { padding: 0 16px !important; max-width: 100% !important; }
  .slide-text h2 { font-size: 18px !important; }
  .slide-text p { font-size: 12px !important; }
  /* Stats bar */
  .stats-bar .inner { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 12px !important; }
  .stat-num { font-size: 22px !important; }
  .stat-label { font-size: 10px !important; }
  /* Section inner */
  .section .inner, .section > .inner { padding: 0 16px !important; }
  .section { padding: 32px 0 !important; }
  .section-header { padding-bottom: 16px !important; }
  .section-header h3 { font-size: 20px !important; }
  .section-header .en { font-size: 11px !important; }
  /* News carousel */
  .news-carousel { overflow: hidden !important; }
  .news-carousel img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
  .carousel-overlay h4 { font-size: 14px !important; }
  /* News list */
  .news-list-item { padding: 10px 0 !important; }
  .news-list-item h5 { font-size: 14px !important; }
  .news-list-item .news-date { font-size: 12px !important; }
  /* Notice list */
  .notice-item { padding: 12px 0 !important; gap: 8px !important; }
  .notice-item .notice-title { font-size: 14px !important; }
  /* Major cards */
  .major-card { padding: 20px !important; }
  .major-card h4 { font-size: 15px !important; }
  .major-card .major-desc { font-size: 12px !important; }
  /* Student cards */
  .student-card-info h4 { font-size: 15px !important; }
  .student-card-info .student-date { font-size: 12px !important; }
  /* CTA section */
  .cta-section .inner { padding: 0 16px !important; }
  .cta-section h3 { font-size: 20px !important; }
  .cta-section p { font-size: 13px !important; }
  /* Article content overflow protection */
  .article-content img, .article-content table, .article-content pre {
    max-width: 100% !important; height: auto !important;
  }
  .article-content { word-wrap: break-word !important; overflow-wrap: break-word !important; }
  /* Page breadcrumb */
  .page-breadcrumb { width: 100% !important; box-sizing: border-box !important; }
  /* Footer */
  .footer-main { padding: 0 16px !important; }
}

@media (max-width: 480px) {
  html, body { overflow-x: hidden !important; }
  .container, .inner { width: 100% !important; max-width: none !important; padding: 0 12px !important; }
  .header-top { padding: 8px 12px !important; }
  .hero-banner { height: auto !important; aspect-ratio: 4 / 3 !important; }
  .stats-bar .inner { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; padding: 10px !important; }
  .stat-num { font-size: 18px !important; }
  .stat-label { font-size: 9px !important; }
  .section-header h3 { font-size: 18px !important; }
  .section-header .en { font-size: 10px !important; }
  .news-carousel h4 { font-size: 13px !important; }
  .news-list-item h5 { font-size: 13px !important; }
  .notice-item .notice-title { font-size: 13px !important; }
}
