/* 全局样式重置与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Heiti SC", sans-serif;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar .nav-link {
    transition: all 0.3s ease;
}
.navbar .nav-link.active {
    font-weight: 600;
    color: #ffdd00 !important;
}
.navbar .nav-link:hover {
    color: #ffdd00 !important;
    transform: translateY(-2px);
}

/* 卡片样式（核心赋能、模块功能） */
.card {
    transition: all 0.3s ease;
    border-radius: 8px !important;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.15) !important;
    border-color: #0d6efd !important;
}
.card .card-title {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* 架构模块样式 */
.architecture .col-md-2 > div,
.architecture .col-md-3 > div {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.architecture .col-md-2 > div:hover,
.architecture .col-md-3 > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.1);
    border-color: #0d6efd;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式适配（小屏幕） */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem !important;
    }
    .core .card,
    .architecture .col-md-2 > div,
    .architecture .col-md-3 > div {
        margin-bottom: 1rem;
    }
    .navbar-collapse {
        background-color: #0d6efd;
        padding: 1rem;
        border-radius: 0 0 8px 8px;
    }
}

/* 模块页面标题样式 */
.content h2 {
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* 404页面样式 */
.bg-light.d-flex {
    background-color: #f8f9fa !important;
}
/* 在 style.css 末尾添加以下代码，优先级最高，会覆盖原有 mt 类 */

/* 1. 重置body默认边距，避免基础布局偏移 */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* 2. 首页Hero区域：动态避开导航栏（导航栏高度56px + 20px安全间距 = 76px） */
section.hero {
    /* 用 padding-top 替代 margin-top，避免margin折叠问题 */
    padding-top: calc(56px + 20px) !important; 
    margin-top: 0 !important; /* 清除原有 mt-5/mt-7，避免冲突 */
}

/* 3. 所有功能模块页（pages/下）的内容区：同样动态适配 */
section.content {
    padding-top: calc(56px + 20px) !important; 
    margin-top: 0 !important; /* 清除原有 mt-5/mt-7 */
}

/* 4. 适配移动端导航栏折叠后高度增加的场景（动态调整） */
@media (max-width: 768px) {
    section.hero, section.content {
        /* 移动端导航栏折叠后高~120px，预留20px安全间距 */
        padding-top: calc(120px + 20px) !important; 
    }
}