/* =====================================================
   香港教育資訊網 - 主樣式表
   HK Education Info - Main Stylesheet
   ===================================================== */

:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #e3f2fd;
  --secondary: #f57c00;
  --accent: #00838f;
  --success: #43a047;
  --danger: #e53935;
  --text: #212121;
  --text-secondary: #757575;
  --border: #e0e0e0;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.15);
  --radius: 12px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft JhengHei", "PingFang TC", "Heiti TC", "Noto Sans TC", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; border-radius: 8px; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ── Top Bar ── */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,.8); }
.topbar a:hover { color: #fff; }

/* ── Header ── */
.site-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  padding: 14px 0;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.logo-text h1 { font-size: 18px; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.logo-text p { font-size: 11px; color: var(--text-secondary); }

/* ── Search Bar in Header ── */
.header-search {
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
}
.search-form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  transition: border-color .2s;
  background: #fff;
}
.search-form:focus-within { border-color: var(--primary); }
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 14px;
  background: transparent;
}
.search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s;
}
.search-form button:hover { background: var(--primary-dark); }

/* ── Navigation ── */
.main-nav {
  background: var(--primary);
  position: relative;
}
.main-nav .container {
  display: flex;
  align-items: stretch;
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  margin: 0;
}
.nav-list > li {
  position: relative;
}
.nav-list > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 18px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav-list > li > a:hover,
.nav-list > li.active > a {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.nav-list > li > a .arrow { font-size: 10px; opacity: .7; }

/* ── Dropdown ── */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s;
}
.nav-list > li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s;
}
.dropdown a:hover { background: var(--primary-light); color: var(--primary); }
.dropdown a .emoji { font-size: 16px; }

/* ── Hero Banner ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1976d2 50%, var(--accent) 100%);
  color: #fff;
  padding: 60px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}
.hero p {
  font-size: 17px;
  opacity: .9;
  margin-bottom: 32px;
  position: relative;
}
.hero-search {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.hero-search-form {
  display: flex;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.hero-search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 24px;
  font-size: 15px;
  color: var(--text);
}
.hero-search-form button {
  background: var(--secondary);
  color: #fff;
  border: none;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.hero-search-form button:hover { background: #e65100; }
.hero-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hero-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.2);
  transition: background .2s;
}
.hero-tags a:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ── Quick Links / Category Cards ── */
.quick-links {
  padding: 40px 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 2px solid transparent;
  text-align: center;
  transition: all .25s;
  text-decoration: none;
}
.quick-card:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.quick-card .icon { font-size: 36px; margin-bottom: 10px; }
.quick-card .label { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.quick-card .count { font-size: 12px; color: var(--text-secondary); }

/* ── Section ── */
.section { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  border-left: 4px solid var(--primary);
  padding-left: 14px;
}
.section-header h2 { font-size: 22px; font-weight: 700; color: var(--text); }
.section-header a { font-size: 13px; color: var(--text-secondary); }
.section-header a:hover { color: var(--primary); }

/* ── School Card ── */
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.school-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  border: 1px solid var(--border);
}
.school-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.school-card-header {
  background: linear-gradient(135deg, var(--primary-light), #bbdefb);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.school-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
  font-weight: 700;
}
.school-card-body { padding: 16px 20px; }
.school-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.school-name-en { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.school-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-success { background: #e8f5e9; color: #2e7d32; }
.tag-warning { background: #fff3e0; color: #e65100; }
.tag-info { background: #e0f7fa; color: #006064; }
.school-info { font-size: 13px; color: var(--text-secondary); }
.school-info li { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; list-style: none; }
.school-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.btn-view:hover { background: var(--primary-dark); color: #fff; }

/* ── Filter Bar ── */
.filter-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}
.filter-group label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.filter-group select,
.filter-group input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--primary); }
.btn-filter {
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.btn-filter:hover { background: var(--primary-dark); }
.btn-reset {
  padding: 9px 16px;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.btn-reset:hover { border-color: var(--primary); color: var(--primary); }

/* ── District Index ── */
.district-section { margin-bottom: 32px; }
.district-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-left: 4px solid var(--primary);
}
.district-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.district-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text);
  transition: all .2s;
}
.district-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.district-link .count {
  font-size: 11px;
  background: rgba(0,0,0,.1);
  padding: 1px 6px;
  border-radius: 10px;
}
.district-link:hover .count { background: rgba(255,255,255,.2); }

/* ── Article Card ── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.article-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #bbdefb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  overflow: hidden;
  position: relative;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px 16px 0 0; }
.article-body { padding: 16px; flex: 1; }
.article-cat {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
.article-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th {
  background: var(--primary);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }
.data-table a { color: var(--primary); font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ── Pagination ── */
.pagination nav { margin: 32px 0; }
.pagination ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}
.pagination ul li a,
.pagination ul li.active a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: all .2s;
}
.pagination ul li a:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.pagination ul li.active a { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination ul li.ellipsis a { border: none; background: transparent; cursor: default; color: var(--text-secondary); }

/* ── Breadcrumb ── */
.breadcrumb { padding: 12px 0; margin-bottom: 20px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 13px; }
.breadcrumb ol li { display: flex; align-items: center; color: var(--text-secondary); }
.breadcrumb ol li::after { content: '›'; margin-left: 6px; opacity: .5; }
.breadcrumb ol li:last-child::after { display: none; }
.breadcrumb ol li a { color: var(--primary); }
.breadcrumb ol li[aria-current] { color: var(--text); font-weight: 600; }

/* ── School Detail ── */
.school-detail-header {
  background: linear-gradient(135deg, var(--primary-dark), #1976d2);
  color: #fff;
  padding: 40px 0;
}
.school-detail-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.school-detail-logo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}
.school-detail-info h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.school-detail-info h2 { font-size: 16px; opacity: .8; font-weight: 400; margin-bottom: 12px; }
.school-detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.15);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}
.detail-tabs { background: #fff; border-bottom: 2px solid var(--border); }
.tab-list {
  display: flex;
  overflow-x: auto;
  list-style: none;
  gap: 0;
}
.tab-list li a {
  display: block;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.tab-list li a:hover,
.tab-list li.active a {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-item .label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.info-item .value { font-size: 14px; color: var(--text); }

/* ── Sidebar ── */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 28px;
  align-items: start;
}
.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}
.sidebar-card-header {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}
.sidebar-card-body { padding: 16px; }
.sidebar-list { list-style: none; }
.sidebar-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text); }
.sidebar-list a:hover { color: var(--primary); }
.sidebar-list .num {
  font-size: 11px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── Stats Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .label { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* ── Footer ── */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.75);
  margin-top: 60px;
}
.footer-main {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 14px; border-bottom: 2px solid rgba(255,255,255,.15); padding-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,.65); font-size: 13px; transition: color .2s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

/* ── Search Results ── */
.search-header {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-header h2 { font-size: 16px; color: var(--text); }
.search-header strong { color: var(--primary); }
.search-header .count { font-size: 13px; color: var(--text-secondary); }
.search-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.search-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.search-tab.active, .search-tab:hover { color: var(--primary); border-bottom-color: var(--primary); }
.search-result-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.result-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 6px;
}
.result-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.result-title mark { background: #fff176; border-radius: 2px; padding: 0 2px; }
.result-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.result-url { font-size: 12px; color: var(--success); margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
  .layout-with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; max-width: 100%; flex: 0 0 100%; }
  .nav-list { overflow-x: auto; }
  .nav-list > li > a { padding: 12px 14px; font-size: 13px; }
  .dropdown { display: none; }
  .hero h2 { font-size: 24px; }
  .hero p { font-size: 15px; }
  .school-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .school-detail-top { flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .quick-links-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-row { flex-direction: column; }
  .filter-group { min-width: 100%; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.fw-bold { font-weight: 700; }
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.loading { text-align: center; padding: 40px; color: var(--text-secondary); font-size: 15px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state .icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.badge-band1 { background: #fce4ec; color: #c62828; }
.badge-band2 { background: #fff3e0; color: #e65100; }
.badge-band3 { background: #f1f8e9; color: #558b2f; }

/* ── 文章正文图片控制 ── */
.article-content img {
  /* 最大宽度不超过正文容器 */
  max-width: 100%;
  /* 高度自动保持比例 */
  height: auto;
  /* 标准尺寸：正文宽图 */
  width: auto;
  /* 单张图片时居中 */
  display: block;
  margin: 16px auto;
  /* 圆角 + 轻微阴影，提升质感 */
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

/* 文章封面图片 */
.article-cover-img {
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 文章内学校名称链接 */
.school-link {
  color: #1976d2;
  text-decoration: none;
  border-bottom: 1px dotted #1976d2;
  transition: all 0.2s;
}
.school-link:hover {
  color: #0d47a1;
  border-bottom-color: #0d47a1;
  background: #e3f2fd;
  padding: 1px 4px;
  margin: 0 -2px;
  border-radius: 4px;
}
  /* 点击放大过渡效果 */
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: zoom-in;
}
.article-content img:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}
/* 大图：独占一行，最大80%宽 */
.article-content img.img-large {
  max-width: 80%;
}
/* 中图：最大50%，可与文字并排 */
.article-content img.img-medium {
  max-width: 50%;
  margin: 8px 16px 8px 0;
  float: left;
}
/* 小图：行内图标/图例 */
.article-content img.img-small {
  max-width: 200px;
  max-height: 160px;
  display: inline;
  vertical-align: middle;
  margin: 4px 6px;
}
/* 清除浮动 */
.article-content::after {
  content: '';
  display: table;
  clear: both;
}
/* 图片说明文字 */
.article-content figure {
  margin: 16px auto;
  text-align: center;
}
.article-content figcaption {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  font-style: italic;
}

/* 灯箱遮罩（点击图片放大） */
#img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#img-lightbox.active { display: flex; }
#img-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  margin: 0;
  cursor: default;
  transform: none;
}
#img-lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  user-select: none;
}
#img-lightbox-close:hover { opacity: 1; }
