/* ===== 建筑学 - 棕色/灰色建筑风格 ===== */

/* CSS变量 */
:root {
    --primary: #5d4037;
    --primary-light: #8d6e63;
    --primary-dark: #3e2723;
    --secondary: #607d8b;
    --bg-dark: #37474f;
    --bg-light: #eceff1;
    --bg-card: #ffffff;
    --text-primary: #263238;
    --text-secondary: #546e7a;
    --border: #cfd8dc;
    --shadow: rgba(0, 0, 0, 0.08);
    --sidebar-width: 260px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 容器布局 */
.container {
    display: flex;
    min-height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--bg-dark) 0%, #263238 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 2px 0;
}

.sidebar-nav li.divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 16px 12px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 24px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(93, 64, 55, 0.2);
    color: #bcaaa4;
    border-left-color: var(--primary-light);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-light);
}

/* ===== 主内容区 ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

/* 头部横幅 */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 48px;
    text-align: center;
}

.hero-banner h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-banner .subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 2px;
}

/* 内容区块 */
.section {
    padding: 48px;
    max-width: 1000px;
}

.section h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* 学科介绍卡片 */
.intro-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 4px;
    box-shadow: 0 2px 16px var(--shadow);
    border-left: 5px solid var(--primary);
}

.intro-card p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

.intro-card p:last-of-type {
    margin-bottom: 20px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 6px 16px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
}

/* 知识模块卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.module-card {
    background: var(--bg-card);
    border-radius: 4px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 16px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(93, 64, 55, 0.12);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.module-card h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.module-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 学习路径时间线 */
.path-timeline {
    position: relative;
    padding-left: 40px;
}

.path-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 0;
}

.path-item {
    position: relative;
    margin-bottom: 32px;
}

.path-marker {
    position: absolute;
    left: -33px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 3px solid var(--bg-light);
}

.path-content {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 4px;
    box-shadow: 0 2px 12px var(--shadow);
}

.path-content h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 8px;
}

.path-content p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* 页脚 */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 24px 48px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .container {
        flex-direction: column;
    }
    
    .section {
        padding: 24px;
    }
    
    .hero-banner {
        padding: 40px 24px;
    }
    
    .hero-banner h1 {
        font-size: 32px;
    }
}
