/* 
  school.whatapps-vxa.com.cn - Global Styles
  Theme: Light Editorial + Restrained Neutral Gray
*/

/* --- 设计变量 (Design Variables) --- */
:root {
  /* 颜色系统 */
  --color-bg: #ffffff;
  --color-bg-secondary: #f7f8fa;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #25d366; /* WhatsApp Brand Green */
  --color-accent-dark: #1ebe57;
  --color-highlight: #ecfdf5;
  
  /* 排版与间距 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  
  /* 布局参数 */
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* --- 基础重置与排版 (Base & Typography) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--color-text-secondary); max-width: 75ch; }

a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--color-accent); }

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
  padding-left: 0;
}

/* --- 容器与网格 (Layout) --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
  .text-right-desktop { text-align: right; }
}

/* --- 组件：页头与页脚 (Header & Footer) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link[aria-current="page"],
.nav-link:hover {
  color: var(--color-accent);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; } /* Simplified for this task, assumes standard desktop focus */
}

.site-footer {
  background-color: var(--color-bg-secondary);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --- 组件：按钮 (Buttons) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
  border: 2px solid var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-text-primary);
  background-color: var(--color-bg);
}

/* --- 组件：卡片与列表 (Cards & Lists) --- */
.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-secondary);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* --- 组件：表格 (Table) --- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: var(--color-bg-secondary);
  font-weight: 600;
  color: var(--color-text-primary);
}

td {
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* --- 组件：FAQ (Details/Summary) --- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-primary);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 组件：最新动态 (News Cards) --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.news-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 1rem 1rem 0;
}

.news-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.news-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  align-self: flex-start;
}

/* --- 组件：相关阅读 (Related Links) --- */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-sm);
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.related-item:hover {
  background-color: var(--color-bg-secondary);
}

.related-item strong {
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.related-item span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- SVG 动效 (Animations) --- */
.svg-motion-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.animate-flow {
  animation: flowDash 12s linear infinite;
}

.animate-pulse {
  animation: pulseOpacity 6s ease-in-out infinite;
}

@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0.6; }
  100% { stroke-dashoffset: 1; }
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 减少动态效果支持 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .svg-motion-path {
    stroke-dashoffset: 0 !important;
  }
}

/* --- 工具类 (Utilities) --- */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.hidden-mobile { display: none; }
@media (min-width: 768px) { .hidden-mobile { display: inline; } }

/* Hero 区域特殊样式 */
.hero-section {
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.hero-svg-container {
  width: 100%;
  height: auto;
  max-height: 300px;
  color: var(--color-accent);
}
