/* ========== Reset & Variables ========== */
:root {
  --primary: #276eff;
  --primary-dark: #1a4fd6;
  --primary-light: #e8f0ff;
  --cyan: #00ccff;
  --cyan-light: #e6f9ff;
  --red: #e60012;
  --red-light: #fff0f0;
  --gold: #ffb800;
  --gold-light: #fff8e6;
  --dark: #1a1a2e;
  --text: #333;
  --text-light: #666;
  --text-lighter: #999;
  --bg: #f5f7fa;
  --white: #ffffff;
  --border: #e8ecf1;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ========== Top Bar ========== */
.topbar {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  height: 36px;
  line-height: 36px;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  display: flex; justify-content: space-between;
}
.topbar-left span { margin-right: 24px; }
.topbar-right a { color: rgba(255,255,255,0.75); margin-left: 16px; }
.topbar-right a:hover { color: var(--cyan); }

/* ========== Header ========== */
.header {
  background: var(--white);
  height: 90px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  display: flex; align-items: center; height: 100%;
}
.logo-area {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
}
.logo-area img { width: 56px; height: 56px; object-fit: contain; }
.logo-text h1 { font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: 2px; }
.logo-text p { font-size: 12px; color: var(--text-light); letter-spacing: 3px; text-transform: uppercase; }

/* ========== Navigation ========== */
.nav {
  background: var(--primary);
  height: 50px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  display: flex; height: 100%;
}
.nav-item {
  position: relative;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center;
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.nav-item:hover, .nav-item.active { background: var(--primary-dark); color: #fff; }
.nav-item::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
  transform: scaleX(0); transition: var(--transition);
}
.nav-item:hover::after, .nav-item.active::after { transform: scaleX(1); }

/* Dropdown */
.nav-item.has-dropdown::before {
  content: '▾';
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
}
.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  min-width: 150px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: 12px 20px;
  color: var(--text); font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--primary-light); color: var(--primary); padding-left: 24px; }

/* ========== Hero Banner ========== */
.hero {
  position: relative;
  height: 480px;
  background: linear-gradient(135deg, #1a3a7a 0%, #276eff 40%, #00a8e0 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute; bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,204,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  position: relative; z-index: 1;
  display: flex; align-items: center; height: 100%;
}
.hero-text { color: #fff; max-width: 560px; }
.hero-text h2 {
  font-size: 42px; font-weight: 700; line-height: 1.3; margin-bottom: 16px;
}
.hero-text h2 span {
  color: var(--gold);
  position: relative;
}
.hero-text h2 span::after {
  content: '';
  position: absolute; bottom: 2px; left: 0; right: 0;
  height: 3px; background: var(--gold); opacity: 0.6;
}
.hero-text p {
  font-size: 16px; opacity: 0.9; line-height: 1.8; margin-bottom: 32px;
}
.hero-buttons { display: flex; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 32px; border-radius: 50px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--gold); color: #7a5a00;
}
.btn-primary:hover { background: #ffa000; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,184,0,0.4); }
.btn-outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); transform: translateY(-2px); }

.hero-stats {
  display: flex; gap: 40px; margin-left: auto;
}
.hero-stat {
  text-align: center; color: #fff;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  min-width: 120px;
}
.hero-stat .number { font-size: 36px; font-weight: 700; color: var(--gold); }
.hero-stat .label { font-size: 13px; opacity: 0.8; margin-top: 4px; }

/* ========== Section Common ========== */
.section { padding: 60px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h3 { font-size: 30px; font-weight: 700; color: var(--dark); }
.section-header h3 span { color: var(--primary); }
.section-header p { color: var(--text-light); margin-top: 8px; font-size: 15px; }
.divider {
  width: 50px; height: 3px; background: var(--primary);
  margin: 12px auto 0; border-radius: 2px;
}

/* ========== Notice Banner ========== */
.notice-banner {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.notice-banner .section-inner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
}
.notice-tag {
  background: var(--red);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 4px 14px; border-radius: 4px;
  white-space: nowrap;
}
.notice-list { flex: 1; overflow: hidden; position: relative; height: 24px; }
.notice-list li {
  font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  height: 24px; line-height: 24px;
}
.notice-list li::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--primary); border-radius: 50%;
  flex-shrink: 0;
}
.notice-list li a:hover { color: var(--primary); }
.notice-more { font-size: 14px; color: var(--text-light); white-space: nowrap; }
.notice-more:hover { color: var(--primary); }

/* ========== Quick Links ========== */
.quick-links {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.quick-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.quick-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.quick-card:nth-child(1) .quick-icon { background: var(--primary-light); color: var(--primary); }
.quick-card:nth-child(2) .quick-icon { background: var(--cyan-light); color: #0099cc; }
.quick-card:nth-child(3) .quick-icon { background: var(--gold-light); color: #cc8800; }
.quick-card:nth-child(4) .quick-icon { background: var(--red-light); color: var(--red); }
.quick-card h4 { font-size: 17px; color: var(--dark); margin-bottom: 6px; }
.quick-card p { font-size: 13px; color: var(--text-light); }

/* ========== News & Events ========== */
.news-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.news-panel {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-header {
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.panel-header h4 { font-size: 18px; color: var(--dark); }
.panel-header h4::before {
  content: '';
  display: inline-block; width: 4px; height: 18px;
  background: var(--primary); border-radius: 2px;
  margin-right: 10px; vertical-align: middle;
}
.panel-header a { font-size: 13px; color: var(--text-light); }
.panel-header a:hover { color: var(--primary); }
.panel-body { padding: 12px 24px; }

.news-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-item a {
  flex: 1; font-size: 14px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding-right: 12px;
}
.news-item a:hover { color: var(--primary); }
.news-item .date { font-size: 12px; color: var(--text-lighter); white-space: nowrap; }

.news-item-featured { position: relative; }
.news-item-featured img {
  width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius);
  margin: 8px 0;
}
.news-item-featured h5 { font-size: 15px; margin: 8px 0 4px; }
.news-item-featured p { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ========== Campus Gallery Preview ========== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.gallery-item {
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--primary-light);
}
.gallery-item:nth-child(1) { aspect-ratio: auto; grid-row: span 2; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-overlay {
  position: absolute; inset: 0;
  background: rgba(39,110,255,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
}
.gallery-overlay span {
  color: #fff; font-size: 18px; font-weight: 600;
  border: 2px solid rgba(255,255,255,0.6); border-radius: 50px;
  padding: 8px 20px;
}

/* ========== CTA Banner ========== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4fd6 100%);
  padding: 50px 0;
}
.cta-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.cta-text { color: #fff; }
.cta-text h3 { font-size: 26px; margin-bottom: 6px; }
.cta-text p { font-size: 14px; opacity: 0.8; }
.cta-inner .btn { background: var(--gold); color: #7a5a00; font-size: 16px; }

/* ========== Footer ========== */
.footer {
  background: var(--dark); color: rgba(255,255,255,0.65);
  padding: 40px 0 20px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 16px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px;
}
.footer-col h4 {
  color: #fff; font-size: 16px; margin-bottom: 16px;
  position: relative; padding-bottom: 10px;
}
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 30px; height: 2px; background: var(--primary);
}
.footer-intro p { font-size: 13px; line-height: 1.8; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--cyan); }
.footer-contact p { font-size: 13px; margin-bottom: 6px; }
.footer-bottom {
  max-width: 1200px; margin: 30px auto 0;
  padding: 20px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 12px;
}

/* ========== Mobile Menu Toggle ========== */
.menu-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  gap: 6px; padding: 8px;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--primary); border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 300;
}
.mobile-overlay.open { display: block; }

.mobile-menu {
  position: fixed; top: 0; right: -280px;
  width: 280px; height: 100%;
  background: var(--white); z-index: 400;
  transition: right 0.3s ease;
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 600;
}
.mobile-menu-close {
  background: none; border: none; color: #fff; font-size: 20px; cursor: pointer;
}
.mobile-menu-body { padding: 8px 0; }
.mobile-nav-item {
  display: block; padding: 14px 20px;
  font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-item.active { color: var(--primary); font-weight: 600; }
.mobile-nav-parent {
  padding: 14px 20px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-submenu { display: none; background: #f8f9fb; }
.mobile-submenu.open { display: block; }
.mobile-submenu a {
  display: block; padding: 12px 36px;
  font-size: 14px; color: var(--text-light);
  border-bottom: 1px solid var(--border);
}

/* ========== RESPONSIVE ========== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .topbar { display: none; }
  .hero { height: auto; padding: 40px 0; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-text h2 { font-size: 22px; }
  .hero-text p { font-size: 14px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { margin: 24px 0 0; gap: 20px; justify-content: center; }
  .hero-stat { padding: 16px 18px; min-width: 90px; }
  .hero-stat .number { font-size: 24px; }

  .nav { display: none; }
  .menu-toggle { display: flex; }

  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(1) { grid-row: span 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cta-inner { flex-direction: column; text-align: center; gap: 16px; }
  .cta-text h3 { font-size: 20px; }
  .section { padding: 36px 0; }
  .section-header h3 { font-size: 22px; }
}

/* Phone (≤640px) */
@media (max-width: 640px) {
  .header { height: 64px; }
  .logo-area img { width: 40px; height: 40px; }
  .logo-text h1 { font-size: 17px; }
  .logo-text p { font-size: 10px; letter-spacing: 1px; }

  .hero { padding: 28px 0; }
  .hero-text h2 { font-size: 19px; }
  .hero-text p { font-size: 13px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { min-width: 80px; padding: 12px 14px; }
  .hero-stat .number { font-size: 20px; }
  .hero-stat .label { font-size: 11px; }

  .notice-banner .section-inner { flex-wrap: wrap; gap: 8px; }
  .notice-tag { font-size: 12px; padding: 3px 10px; }
  .notice-list { flex-basis: 100%; }
  .notice-list li { font-size: 13px; }
  .notice-list li span { display: none; }
  .notice-more { font-size: 12px; }

  .quick-links { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick-card { padding: 20px 14px; }
  .quick-icon { width: 48px; height: 48px; font-size: 22px; margin-bottom: 10px; }
  .quick-card h4 { font-size: 15px; }
  .quick-card p { font-size: 12px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .panel-header { padding: 12px 16px; }
  .panel-body { padding: 8px 16px; }
  .news-item a { font-size: 13px; }
  .news-item .date { font-size: 11px; }

  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { font-size: 11px; }

  .btn { padding: 10px 24px; font-size: 14px; }
  .cta-text h3 { font-size: 18px; }
  .section-header h3 { font-size: 20px; }
  .section-header p { font-size: 13px; }
}
