/* css/department.css */

.dept-list-section {
    padding: 3rem 0 6rem 0;
    background-color: #fff; /* 大背景白 */
}

/* 每一个分类组的间距 */
.dept-category-group {
    margin-bottom: 4rem;
}

/* --- 分类头部 --- */
.dept-cat-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3f8fe6; /* 标题下蓝线 */
    width: fit-content; /* 宽度随内容 */
    padding-right: 2rem;
}

/* 图标盒子 */
.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    color: #3f8fe6;
    margin-right: 0.8rem;
}
.icon-box svg {
    width: 100%;
    height: 100%;
}

.cat-title {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
    letter-spacing: 1px;
}


/* --- 网格容器 (浅蓝底) --- */
.dept-grid-container {
    background-color: #f0f6fa; /* 复刻图片的浅蓝色底 */
    padding: 2rem;
    border-radius: 4px;
}

/* --- 网格布局核心 --- */
.dept-grid {
    display: grid;
    /* 核心：5列等宽，复刻图片 */
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem; /* 卡片间距 */
}

/* --- 卡片样式 --- */
.dept-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background-color: #fff;
    color: #555;
    font-size: 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* 初始边框透明，预留位置防抖动 */
    border: 1px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);

    /* 处理长文字 */
    line-height: 1.4;
    min-height: 3.5rem; /* 保证高度一致 */
}

/* 占位卡片 (隐藏，用于对齐最后一行) */
.dept-card.empty {
    visibility: hidden;
    pointer-events: none;
}

/* --- 动态交互效果 (Hover) --- */
.dept-card:hover {
    transform: translateY(-5px); /* 1. 向上浮动 */
    box-shadow: 0 8px 20px rgba(63, 143, 230, 0.15); /* 2. 投影加深 */
    border-color: #3f8fe6; /* 3. 边框变蓝 */
    color: #3f8fe6; /* 4. 文字变蓝 */
    font-weight: 500;
}


/* --- 响应式适配 --- */
@media screen and (max-width: 1200px) {
    .dept-grid {
        grid-template-columns: repeat(4, 1fr); /* 屏幕变小显示4列 */
    }
}

@media screen and (max-width: 900px) {
    .dept-grid {
        grid-template-columns: repeat(3, 1fr); /* 平板显示3列 */
    }
}

@media screen and (max-width: 600px) {
    .dept-grid-container {
        padding: 1rem;
    }
    .dept-grid {
        grid-template-columns: repeat(2, 1fr); /* 手机显示2列 */
        gap: 0.8rem;
    }
    .dept-card {
        font-size: 0.85rem;
        padding: 0.8rem;
    }
}