* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2a5f8a; /* 主蓝 */
  --secondary: #3a833c; /* 生态绿 */
  --accent: #d4a418; /* 金 */
  --text: #333333; /* 正文 */
  --bg: #f8f9fa; /* 背景 */
}

body {
  font-family: "微软雅黑", "PingFang SC", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-brand {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

.nav-links a:hover {
  background: var(--secondary);
  color: white;
}

.hero {
  height: 65vh;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("../images/校园背景.png") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4rem;
}

.hero-overlay {
  text-align: center;
  color: white;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.9;
}

.school-gallery {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
  font-size: 2.5rem;
  color: var(--primary);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.gallery-item h3 {
  padding: 1.2rem;
  text-align: center;
  color: var(--primary);
  font-size: 1.3rem;
}

.gallery-item p {
  padding: 0 1.2rem 1.5rem;
  text-align: center;
  color: #666;
  font-size: 0.95rem;
}

.main-footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 2.5rem 5%;
  margin-top: 5rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
