/* 全局定义 */
:root {
    --primary-color: #111827;
    --accent-color: #2563eb;
    --text-main: #374151;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    /* 各分类主题色 */
    --c-student: #10b981;
    --c-exam: #ef4444;
    --c-pro: #f59e0b;
    --c-parent: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "PingFang SC", sans-serif;
    color: var(--primary-color);
    background: #fff;
    line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* 导航栏：靠右对齐关键 */
.header {
    height: 80px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    /*z-index: 1000;*/
}

.flex-header {
    display: flex;
    justify-content: space-between; /* 左右分布 */
    align-items: center;
    height: 100%;
}

.logo { font-size: 24px; font-weight: 800; text-decoration: none; color: var(--primary-color); }
.logo span { color: var(--accent-color); }

/* 菜单列表靠右 */
.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 24px;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-list a:hover, .nav-list a.active { color: var(--accent-color); }

.btn-login {
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 6px;
}

.menu-toggle { display: none; font-size: 22px; cursor: pointer; }

/*.fa-bars {*/
/*    color: var(--primary-color) !important;*/
/*    display: inline-block !important;*/
/*}*/

/* 英雄区 */
.hero { padding: 100px 0 60px; text-align: center; background: linear-gradient(to bottom, #fcfcfc, #fff); }
.hero h1 { font-size: 48px; font-weight: 900; letter-spacing: -1px; margin-bottom: 20px; }
.hero p { font-size: 20px; color: var(--text-muted); margin-bottom: 40px; }
.hero-stats { display: flex; justify-content: center; gap: 40px; }
.stat-item { font-size: 14px; color: var(--text-muted); }
.stat-item b { color: var(--primary-color); font-size: 18px; margin-right: 5px; }

/* 卡片入口 */
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 32px; margin-bottom: 10px; }
.portals { padding: 80px 0; }
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.portal-card {
    padding: 40px 30px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
}

.portal-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.card-icon { font-size: 32px; margin-bottom: 20px; }
.student .card-icon { color: var(--c-student); }
.exam .card-icon { color: var(--c-exam); }
.pro .card-icon { color: var(--c-pro); }
.parent .card-icon { color: var(--c-parent); }

.portal-card h3 { margin-bottom: 12px; font-size: 20px; }
.portal-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 25px; }
.arrow-link { font-size: 14px; font-weight: 700; color: var(--accent-color); text-decoration: none; }

/* 平台特色 */
.features { padding: 100px 0; background-color: var(--bg-light); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feat-item { margin-top: 30px; }
.feat-item h4 { margin-bottom: 8px; font-size: 18px; }
.feat-item p { color: var(--text-muted); font-size: 15px; }
.image-placeholder {
    height: 400px; background: #e5e7eb; border-radius: 20px;
    display: flex; align-items: center; justify-content: center; color: #9ca3af;
}

/* 页脚 */
.footer { padding: 80px 0 40px; border-top: 1px solid #f1f5f9; background: #fff; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 50px; margin-bottom: 50px; }
.footer-brand { flex: 1; min-width: 250px; }
.footer-nav { display: flex; gap: 60px; }
.footer-col h4 { margin-bottom: 20px; font-size: 15px; }
.footer-col a { display: block; text-decoration: none; color: var(--text-muted); font-size: 14px; margin-bottom: 12px; transition: 0.2s; }
.footer-col a:hover { color: var(--accent-color); }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid #f1f5f9; padding-top: 30px; font-size: 13px; color: #9ca3af; }

/* 移动端响应式 */
/*@media (max-width: 768px) {*/
/*    .menu-toggle { display: block; }*/
/*    .nav-list {*/
/*        position: fixed; top: 80px; left: 0; width: 100%; height: 0;*/
/*        background: #fff; flex-direction: column; overflow: hidden;*/
/*        transition: 0.4s ease; padding: 0;*/
/*    }*/
/*    .nav-list.mobile-open { height: auto; padding: 40px 0; border-bottom: 1px solid #f1f5f9; }*/
/*    .grid-2 { grid-template-columns: 1fr; gap: 40px; }*/
/*    .hero h1 { font-size: 32px; }*/
/*    .footer-top { flex-direction: column; }*/
/*}*/

/* story.css 修正部分 */
@media (max-width: 768px) {
    /* 1. 确保按钮在移动端强制显示 */
    .menu-toggle {
        display: block !important;
        z-index: 1001;
        padding: 10px;
        color: var(--primary-color);
    }

    /* 2. 初始状态下隐藏菜单 */
    .nav-list {
        position: fixed;
        top: 80px; /* 对应 header 高度 */
        left: 0;
        width: 100%;
        height: 0;
        background: #fff;
        flex-direction: column;
        overflow: hidden;
        transition: 0.4s ease;
        padding: 0;
        gap: 0; /* 移动端紧凑布局 */
    }

    /* 3. 激活状态：高度自动并显示边框 */
    .nav-list.mobile-open,
    .nav-list.mobile-active {
        height: auto;
        padding: 20px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    /* 4. 调整移动端菜单项样式 */
    .nav-list li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
    }
}


/*@media (max-width: 768px) {*/
/*    .menu-toggle {*/
/*        display: block;*/
/*        z-index: 2001; !* 确保按钮在最上层 *!*/
/*    }*/

/*    .nav-list {*/
/*        position: fixed;*/
/*        top: 80px;*/
/*        left: 0;*/
/*        width: 100%;*/
/*        height: 0; !* 默认关闭 *!*/
/*        background: #fff;*/
/*        flex-direction: column;*/
/*        overflow: hidden;*/
/*        transition: 0.4s ease;*/
/*        padding: 0;*/
/*        box-shadow: 0 10px 15px rgba(0,0,0,0.05);*/
/*    }*/

/*    !* 同时兼容 mobile-open 和 mobile-active 类名 *!*/
/*    .nav-list.mobile-open,*/
/*    .nav-list.mobile-active {*/
/*        height: auto;*/
/*        padding: 30px 0;*/
/*        border-bottom: 1px solid #f1f5f9;*/
/*    }*/

/*    .nav-list li {*/
/*        width: 100%;*/
/*        text-align: center;*/
/*        margin: 10px 0;*/
/*    }*/
/*}*/