/* ========================================
   师资队伍图片列表样式 - picture-list.css
   特点：
   1. 图片突出卡片边界
   2. 点击展开内容，卡片尺寸不变
   3. 内容区可滚动
   ======================================== */

/* ==================== 页面主体容器 ==================== */
.faculty-main {
    min-height: 90vh;
    background-color: #fff;
    padding:6rem 0;
}

.faculty-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* ==================== 卡片网格布局 ==================== */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    /* 固定3行 */
    gap: 45px 35px;
    /* 行间距45px，列间距35px */
    margin-bottom: 40px;
    padding-top: 35px;
    /* 为突出的图片留出上方空间 */
    min-height: calc(200px * 3 + 45px * 2 + 35px);
    /* 3行卡片高度 + 2个行间距 + 顶部padding */
    align-content: start;
    /* 内容从顶部开始排列 */
}

/* ==================== 卡片通用样式 ==================== */
.faculty-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background: linear-gradient(180deg, #e3f2fa 0%, #cce7f4 100%);
    border-radius: 16px;
    padding: 20px 20px 20px 0;
    min-height: 200px;
    /* 改为最小高度 */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: visible;
}

.faculty-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* ==================== 图片区域 - 突出卡片 ==================== */
.card-image {
    position: relative;
    flex-shrink: 0;
    width: 200px;
    height: auto;
    margin-top: -30px;
    /* 向上突出 */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==================== 卡片主体内容 ==================== */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 18px;
    padding-right: 10px;
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* 头部：姓名 + 职称 */
.card-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.card-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.card-title {
    font-size: 13px;
    color: #666;
}

/* 副标题（如执业药师） */
.card-subtitle {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    flex-shrink: 0;
}

/* 详细内容区域 - 默认隐藏，悬浮时显示 */
.card-detail {
    flex: 1;
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.5s ease;
    margin-top: 8px;
}

.card-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.8;
    margin: 0;
    padding-right: 5px;
}

/* ==================== 鼠标悬浮时显示详细内容 ==================== */
.faculty-card:hover .card-detail {
    opacity: 1;
    max-height: 500px;
    /* 设置足够大的值，实际高度由内容决定 */
    overflow: visible;
    /* 不显示滚动条 */
}

/* ==================== 鼠标悬浮时名字变绿色 ==================== */
.faculty-card:hover .card-name {
    color: #1cb6c1;
}

/* ==================== 展开/收起按钮改为跳转按钮 ==================== */
.card-toggle {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 5;
    text-decoration: none;
}

.card-toggle:hover {
    color: #0d9488;
    transform: scale(1.1);
}

.card-toggle svg {
    width: 26px;
    height: 26px;
}

/* ==================== 分页器样式 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}

.page-info {
    font-size: 13px;
    color: #666;
    margin-right: 15px;
}

.page-btn,
.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    background-color: #fff;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-num:hover {
    border-color: #1cb6c1;
    color: #1cb6c1;
}

.page-num.active {
    background-color: #1cb6c1;
    border-color: #1cb6c1;
    color: #fff;
}

.page-prev,
.page-next {
    padding: 0 15px;
}

.page-btn.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    color: #ccc;
    border-color: #eee;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    color: #999;
}

/* ==================== 响应式布局 ==================== */
@media screen and (max-width: 1200px) {
    .faculty-container {
        padding: 0 40px;
    }

    .faculty-grid {
        gap: 40px 30px;
    }
}

@media screen and (max-width: 1000px) {
    .faculty-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, auto);
        /* 2列时需要5行才能放9个 */
        gap: 40px 25px;
        min-height: calc(200px * 5 + 40px * 4 + 35px);
        /* 5行 */
    }
}

@media screen and (max-width: 768px) {
    .faculty-container {
        padding: 0 25px;
    }

    .faculty-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(9, auto);
        /* 1列时需要9行 */
        gap: 45px;
        min-height: calc(180px * 9 + 45px * 8 + 35px);
        /* 9行 */
    }

    .faculty-card {
        height: 180px;
    }

    .card-image {
        width: 110px;
        height: 155px;
    }

    .faculty-card.expanded .card-detail {
        max-height: 80px;
    }
}

@media screen and (max-width: 480px) {

    .faculty-container {
        padding: 0 15px;
    }

    .faculty-card {
        padding: 15px 15px 15px 0;
        min-height: 140px;
    }

    .card-image {
        width: 95px;
        height: 125px;
        margin-left: 15px;
        margin-top: -25px;
    }

    .card-body {
        padding-left: 12px;
    }

    .card-name {
        font-size: 16px;
    }

    .card-title,
    .card-subtitle {
        font-size: 12px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .page-btn,
    .page-num {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}