:root {
  --color-bg: #f6f8fb;
  --color-surface: #ffffff;
  --color-primary: #174477;
  --color-primary-dark: #0b1f3a;
  --color-accent: #f58634;
  --color-text: #1e2a36;
  --color-muted: #5a6c7c;
  --color-border: #d6dde5;
  --color-highlight: #edf3ff;
  --color-success: #3f6b34;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-soft: 0 16px 40px rgba(13, 46, 90, 0.08);
  --shadow-card: 0 12px 24px rgba(15, 29, 44, 0.12);
  color-scheme: light;
}

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

/* 全局焦点样式 - 可访问性增强 */
*:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* 对于鼠标用户隐藏焦点框，但保留键盘焦点 */
*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-top: 0;
}

p {
  margin-top: 0;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--color-accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 跳转到主内容链接 - 仅在键盘焦点时显示 */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 6px 0;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-hero {
  position: relative;
  min-height: 80vh;
  background: linear-gradient(135deg, rgba(23, 68, 119, 0.95) 0%, rgba(47, 126, 170, 0.90) 100%), 
              url('../images/hero/mountain-bg.jpg') center/cover no-repeat;
  background-attachment: fixed;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-hero h1,
.section-hero .hero__tagline,
.section-hero .hero__desc,
.section-hero .hero__highlights {
  color: #ffffff;
}

.section-hero .hero__tagline {
  color: rgba(245, 134, 52, 1);
}

.section-hero .hero__scroll {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.section-hero .hero__scroll:hover,
.section-hero .hero__scroll:focus {
  color: rgba(245, 134, 52, 1);
  transform: translateY(4px);
}

.section:nth-of-type(even) {
  background: var(--color-highlight);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-header p {
  color: var(--color-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-accent);
  color: #1e1e1e;
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover,
.btn-secondary:focus {
  filter: brightness(0.92);
  transform: translateY(-2px);
}

.btn-link {
  color: var(--color-primary);
  font-weight: 600;
}

.pill {
  display: inline-flex;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(23, 68, 119, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.announcement {
  background: var(--color-accent);
  color: #ffffff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 4vw;
  background: rgba(246, 248, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(214, 221, 229, 0.7);
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08rem;
  color: var(--color-primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-weight: 600;
}

.nav-links a {
  padding: 0.5rem 0;
}

.lang-switcher {
  display: flex;
  gap: 0.75rem;
  font-weight: 600;
}

.lang-switcher a {
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(23, 68, 119, 0.08);
}

.lang-switcher a:hover,
.lang-switcher a:focus {
  background: rgba(23, 68, 119, 0.15);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  padding: 0;
}

.nav-toggle__bar {
  width: 24px;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 3px;
  transition: transform 0.2s ease;
}

.hero__content {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.hero__tagline {
  text-transform: uppercase;
  letter-spacing: 0.15rem;
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 700;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--color-muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.hero__highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--color-muted);
}

.hero__visual {
  justify-self: center;
  max-width: 420px;
}

.hero__scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 0;
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
}

.card {
  background: var(--color-surface);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card ul {
  padding-left: 1.1rem;
  margin: 0;
  color: var(--color-muted);
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--color-accent);
}

.program-grid,
.scholarship-grid,
.campus-grid,
.partnership-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.timeline {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 32px;
}

.timeline-item {
  padding: 24px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 12px rgba(11, 31, 58, 0.08);
}

.timeline-item h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.05rem;
}

.timeline-item h3 span {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.timeline-owner {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 600;
}

.admission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.campus-card figure {
  margin: 0;
}

.campus-card figcaption {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.partnership-card {
  background: var(--color-surface);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 20px rgba(15, 29, 44, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.partnership-cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.logo-placeholder {
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  background: rgba(23, 68, 119, 0.15);
  color: var(--color-primary-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-list {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.news-card {
  padding: 24px;
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 20px rgba(15, 29, 44, 0.08);
}

.news-card time {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.stories-carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s ease;
  will-change: transform;
}

.carousel-track .story-card {
  flex: 0 0 100%;
}

.story-card {
  padding: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(23, 68, 119, 0.07), rgba(245, 134, 52, 0.1));
  display: grid;
  gap: 0.75rem;
}

.story-quote {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  font-weight: 600;
}

.story-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-weight: 600;
}

.story-card:not(.is-active) {
  opacity: 0.45;
}

.carousel-controls {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary-dark);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 29, 44, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover,
.carousel-btn:focus {
  background: rgba(23, 68, 119, 0.1);
  transform: translateY(-2px);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(23, 68, 119, 0.25);
  padding: 0;
  cursor: pointer;
}

.carousel-dot[aria-pressed="true"] {
  background: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

.site-footer {
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 60px 0 30px;
}

.footer__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.footer__grid h2,
.footer__grid h3 {
  color: #ffffff;
}

.footer__links ul,
.footer__contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer__links a,
.footer__contact a {
  color: #ffffff;
}

.footer__links a:hover,
.footer__contact a:hover {
  text-decoration: underline;
}

.footer__note {
  margin-top: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 960px) {
  .main-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid rgba(214, 221, 229, 0.7);
    padding-top: 1rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .lang-switcher {
    margin-left: auto;
  }

  .section {
    padding: 64px 0;
  }
  
  .section-hero {
    min-height: 60vh;
    background-attachment: scroll;
  }
}

@media (max-width: 640px) {
  .announcement {
    font-size: 0.85rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .container {
    width: 90vw;
  }

  .section-header {
    margin-bottom: 32px;
  }
}
