/* ============================================
   新苗学园 - 品牌样式表
   主色: #4a7c59 (森林绿)
   辅色: #f4a261 (暖阳橙), #e9f5e1 (浅芽绿)
   中性色: #333, #666, #e5e5e5
   ============================================ */

/* 基础重置与字体 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 链接 */
a {
    color: #4a7c59;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a6449;
}

/* 图片 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    line-height: 1.4;
}

.btn-primary {
    background-color: #4a7c59;
    color: #ffffff;
    border-color: #4a7c59;
}

.btn-primary:hover {
    background-color: #3a6449;
    border-color: #3a6449;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 124, 89, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #4a7c59;
    border-color: #4a7c59;
}

.btn-secondary:hover {
    background-color: #4a7c59;
    color: #ffffff;
    transform: translateY(-2px);
}

/* 卡片 */
.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 通用 Section 样式 */
.section {
    padding: 80px 0;
}

.section-title {
    font-weight: 700;
    font-size: 36px;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.bg-light {
    background-color: #f8fbf6;
}

.bg-primary-light {
    background-color: #e9f5e1;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* === 导航栏 === */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    color: #4a7c59;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu li a {
    display: block;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    color: #555;
    transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: #e9f5e1;
    color: #4a7c59;
}

.nav-menu li a.active {
    font-weight: 600;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* === Hero 区域 === */
.hero-section {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(135deg, #e9f5e1 0%, #f4f9f0 50%, #fef9ef 100%);
    overflow: hidden;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    width: 180px;
    margin: 0 auto 24px;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 48px;
    color: #2d5a3e;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 20px;
    color: #556b5c;
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero 背景装饰 */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #4a7c59;
    top: -80px;
    right: -80px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: #f4a261;
    bottom: -40px;
    left: -40px;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #e9c46a;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

/* === 特色卡片 === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 20px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #e9f5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a7c59;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-weight: 600;
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* === 关于摘要 === */
.about-summary-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    text-align: left;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}

.about-image img {
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* === 新闻网格 === */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    overflow: hidden;
    padding: 0;
}

.news-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #e9f5e1;
}

.news-card-body {
    padding: 20px;
}

.news-card-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.news-card h3 {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.news-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* === 数据统计 === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item {
    padding: 32px 16px;
}

.stat-number {
    display: block;
    font-weight: 700;
    font-size: 48px;
    color: #4a7c59;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 18px;
    color: #556b5c;
    font-weight: 500;
}

/* === 关于页 - 故事 === */
.story-content p {
    font-size: 17px;
    color: #555;
    line-height: 1.9;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 办学理念 */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.philosophy-card {
    text-align: center;
}

.philosophy-card h3 {
    font-weight: 600;
    font-size: 20px;
    color: #4a7c59;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9f5e1;
}

.philosophy-card p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* 时间轴 */
.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e9f5e1;
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-year {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    background: #4a7c59;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.timeline-content {
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.timeline-content h4 {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
}

/* 团队预览网格 */
.team-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.team-preview-grid .teacher-card {
    text-align: center;
}

/* === 教师页 === */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.teacher-card {
    text-align: center;
    padding: 24px 16px;
}

.teacher-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #e9f5e1;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #4a7c59;
    overflow: hidden;
}

.teacher-card h3 {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 4px;
}

.teacher-card .teacher-title {
    font-size: 14px;
    color: #4a7c59;
    font-weight: 500;
    margin-bottom: 8px;
}

.teacher-card .teacher-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* === 新闻列表页 === */
.news-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.news-list .news-card {
    display: flex;
    flex-direction: column;
}

/* === 联系页 === */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info h2,
.contact-form h2 {
    font-weight: 600;
    font-size: 24px;
    color: #333;
    margin-bottom: 24px;
}

.contact-info ul {
    list-style: none;
    margin-bottom: 24px;
}

.contact-info ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    color: #555;
}

.contact-info ul li strong {
    color: #333;
    margin-right: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7c59;
}

.form-feedback {
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 16px;
    font-weight: 500;
}

.form-feedback.success {
    background: #e9f5e1;
    color: #4a7c59;
    border: 1px solid #4a7c59;
}

.form-feedback.error {
    background: #ffeaea;
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* === 页面 Hero === */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #e9f5e1 0%, #f4f9f0 100%);
    text-align: center;
}

.page-hero h1 {
    font-weight: 700;
    font-size: 40px;
    color: #2d5a3e;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 18px;
    color: #556b5c;
}

/* === 页脚 === */
#footer {
    background-color: #2d5a3e;
    color: #e9f5e1;
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
}

.footer-brand .footer-logo {
    width: 160px;
    margin-bottom: 16px;
    filter: brightness(1) invert(0);
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.8;
    color: #c8e0c0;
}

.footer-links h4,
.footer-contact h4 {
    font-weight: 600;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #c8e0c0;
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #ffffff;
}

.footer-contact p {
    font-size: 15px;
    color: #c8e0c0;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: #a0c0a0;
}

/* ========== 响应式设计 ========== */

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .philosophy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-list {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* 手机 (375px - 767px) */
@media (max-width: 767px) {
    .section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 28px;
    }
    .section-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    /* 导航 */
    .mobile-menu-btn {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        display: none;
        z-index: 999;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li a {
        padding: 12px 16px;
        font-size: 18px;
    }

    .hero-section {
        padding: 100px 0 60px;
    }
    .hero-section h1 {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .hero-logo {
        width: 140px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
    .about-summary-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .about-text h2 {
        text-align: center;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .stat-number {
        font-size: 36px;
    }
    .philosophy-grid {
        grid-template-columns: 1fr 1fr;
    }
    .teachers-grid {
        grid-template-columns: 1fr 1fr;
    }
    .team-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    .footer-brand .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }
    .page-hero {
        padding: 100px 0 40px;
    }
    .page-hero h1 {
        font-size: 32px;
    }
    .timeline {
        padding-left: 32px;
    }
    .timeline-year {
        left: -32px;
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
}