/* ========== 子页面通用样式 ========== */

/* 左侧二级导航 */
.side-nav {
    position: fixed;
    left: 0;
    top: 72px;
    width: 260px;
    height: calc(100vh - 72px);
    background: white;
    padding: 28px 16px;
    overflow-y: auto;
    border-right: 1px solid #f5dde4;
    box-shadow: 4px 0 16px rgba(0,0,0,0.03);
}

.side-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 12px 0;
    padding: 18px 22px;
    background: white;
    color: #6b4a55;
    border: none;
    border-radius: 28px 12px 28px 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 520;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 0 #f0d4dc;
    border: 1px solid transparent;
}

.side-btn i {
    font-size: 1.2rem;
    width: 26px;
    color: #b83d5a;
}

.side-btn:hover {
    background: #fff5f8;
    transform: translateX(6px);
    border-color: #f5c6d6;
    box-shadow: 0 6px 12px rgba(232, 90, 122, 0.12);
}

.side-btn.active {
    background: #d9466a;
    color: white;
    border-color: #b83d5a;
    box-shadow: 0 6px 0 #b83d5a;
}

.side-btn.active i {
    color: white;
}

/* 主内容区 */
.content-area {
    margin-left: 280px;
    flex: 1;
    padding: 40px 48px 80px;
    max-width: calc(100% - 280px);
}

.anchor {
    display: block;
    padding-top: 90px;
    margin-top: -90px;
}

.section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px 12px 24px 12px;
    padding: 36px 40px;
    margin-bottom: 40px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.02);
    border: 1px solid #fceef2;
}

.section-title {
    color: #8b3a52;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #f5c6d6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i { color: #b83d5a; }

.section-content { font-size: 16px; color: #3d2a35; }

/* 通用 block */
.block {
    background: #fff8fa;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid #f5c6d6;
    margin-bottom: 20px;
}

.block:last-child { margin-bottom: 0; }

.block h3 {
    color: #b83d5a;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.block ul {
    list-style: none;
    padding-left: 0;
}

.block li { margin-bottom: 0.5em; }
.block li:last-child { margin-bottom: 0; }
.block p { margin-bottom: 0.5em; }
.block p:last-child { margin-bottom: 0; }

/* project-intro 专用 */
.intro-block {
    background: #fff8fa;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #f5c6d6;
    margin-bottom: 24px;
}

.intro-block h3 {
    color: #b83d5a;
    margin-bottom: 14px;
    font-size: 1.15rem;
}

.intro-block ul { list-style: none; padding-left: 0; }
.intro-block li { margin-bottom: 10px; }
.intro-block li:last-child { margin-bottom: 0; }

.target-table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.target-table th {
    background: #ffdde8;
    color: #8b3a52;
    font-weight: 600;
    padding: 16px 14px;
    font-size: 0.95rem;
    text-align: left;
}

.target-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #fceef2;
    vertical-align: top;
}

.target-table tr:last-child td { border-bottom: none; }

/* project-intro section 变体 */
.section.intro-style {
    border-radius: 36px 16px 36px 16px;
    padding: 40px 44px;
    margin-bottom: 48px;
    backdrop-filter: blur(4px);
}

.section.intro-style .section-title {
    font-size: 26px;
    margin-bottom: 28px;
    padding-bottom: 14px;
}

.section.intro-style .section-title i { font-size: 28px; }

/* components 专用 */
.part-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.part-table th {
    background: #ffdde8;
    color: #8b3a52;
    font-weight: 600;
    padding: 14px 16px;
    font-size: 0.95rem;
    text-align: left;
}

.part-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #fceef2;
}

.part-table tr:last-child td { border-bottom: none; }
.part-table th:first-child, .part-table td:first-child { width: 28%; }
.part-table th:nth-child(2), .part-table td:nth-child(2) { width: 22%; }
.part-table th:nth-child(3), .part-table td:nth-child(3) { width: 50%; }

.table-section { margin-bottom: 32px; }
.table-section:last-child { margin-bottom: 0; }

.table-section h4 {
    color: #8b3a52;
    font-size: 1.05rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-section h4 i { color: #b83d5a; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* experiment 专用 */
.step-block { margin-bottom: 20px; }
.step-block:last-child { margin-bottom: 0; }
.step-block h3 { color: #b83d5a; font-size: 1rem; margin-bottom: 10px; }
.step-block .method, .step-block .result { margin-bottom: 8px; font-size: 0.95rem; }
.step-block .method strong, .step-block .result strong { color: #8b3a52; margin-right: 6px; }

.intro-block.experiment-style {
    background: #fff0f4;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #d9466a;
}

/* human-practice 专用 */
.swot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.swot-card {
    padding: 20px;
    border-radius: 16px;
    border-left: 4px solid;
}

.swot-card.s { border-color: #4caf50; background: #f1f8e9; }
.swot-card.w { border-color: #ff9800; background: #fff8e1; }
.swot-card.o { border-color: #2196f3; background: #e3f2fd; }
.swot-card.t { border-color: #f44336; background: #ffebee; }
.swot-card h4 { margin-bottom: 12px; font-size: 1.1rem; }

/* modeling 专用 */
.side-btn.modeling-size {
    padding: 14px 18px;
    font-size: 14px;
}

.side-btn.modeling-size i {
    font-size: 1.1rem;
    width: 24px;
}

.side-nav-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 12px 0 0;
    padding: 14px 18px;
    background: #fff5f8;
    color: #8b3a52;
    border: 1px solid #f5c6d6;
    border-radius: 28px 12px 28px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 0 #f0d4dc;
}

.side-nav-category:first-child { margin-top: 0; }

.side-nav-category:hover {
    background: #fff0f4;
    border-color: #e8a4b8;
    box-shadow: 0 4px 12px rgba(232, 90, 122, 0.15);
}

.side-nav-category i.fa-chevron-down {
    font-size: 12px;
    color: #b83d5a;
    transition: transform 0.25s ease;
}

.side-nav-category.expanded i.fa-chevron-down {
    transform: rotate(180deg);
}

.side-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.side-nav-category.expanded + .side-nav-sub {
    max-height: 800px;
}

.side-nav-sub .side-btn {
    margin: 8px 0 8px 12px;
    padding: 12px 18px;
    font-size: 13px;
    border-radius: 20px 10px 20px 10px;
}

.content-area.modeling-style .section .section-title { font-size: 22px; margin-bottom: 20px; }
.content-area.modeling-style .section .block,
.content-area.modeling-style .section .intro-block {
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 18px;
}
.content-area.modeling-style .section .block h3 { font-size: 1rem; margin-bottom: 10px; }
.content-area.modeling-style .section .intro-block { background: #fff0f4; border-left: 4px solid #d9466a; }

.eq-block {
    background: #fff8fa;
    border: 1px solid #f5c6d6;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 14px 0;
    overflow-x: auto;
    text-align: center;
}

.eq-block.numbered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.eq-num {
    color: #8b6a7a;
    font-size: 13px;
    white-space: nowrap;
}

.model-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}

.model-table th {
    background: #d9466a;
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 500;
}

.model-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f5c6d6;
}

.model-table tr:nth-child(even) td { background: #fffbfc; }

.note-box {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    padding: 14px 18px;
    margin: 14px 0;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
}

.summary-box {
    background: #fff0f4;
    border: 2px solid #d9466a;
    border-radius: 12px;
    padding: 18px 22px;
    margin: 20px 0;
}

.summary-box h3 { color: #8b3a52; margin-bottom: 12px; }

/* 响应式 */
@media (max-width: 900px) {
    .side-nav { width: 200px; }
    .content-area { margin-left: 220px; padding: 24px; }
    .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    body.has-side-nav { flex-direction: column; }
    .side-nav { position: relative; width: 100%; height: auto; top: 0; }
    .content-area { margin-left: 0; max-width: 100%; padding: 24px; }
    .swot-grid { grid-template-columns: 1fr; }
}
