/* 科室页面布局样式 */
.departments-container {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    
}

/* 左侧科室导航样式 */
.departments-sidebar {
    width: 275px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0px 0px 27px 0px rgba(0,0,0,0.08);
    padding: 0px 0;
}

.departments-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}


.department-view-item{
    width: 275px;
}
.department-link {
    display: block;
    padding: 15px 25px;
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.department-link:hover {
    color: #923A30;
    background: rgba(146, 58, 48, 0.05);
}

.department-view-item.active .department-link {
    color: #ffffff;
    background: #923A30;
    font-weight: bold;
}

.department-view-item.active .department-link::before {
    /* content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #923A30;
    border-radius: 0 2px 2px 0; */
    display: none;
}

/* 右侧内容区域样式 */
.departments-content {
    flex: 1;
    min-width: 0; /* 防止flex子项溢出 */
}

.departments-content img {
    width: 100%;
    height: auto;
    max-width: 900px;
    display: block;
    margin: 0 auto;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-left: 40px;
    width: 150px;
}

.qr-code-container img {
    width: 150px;
    height: auto;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .departments-container {
        gap: 20px;
    }
    
    .departments-sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .page-content{
        padding: 45px 0;
    }
    .department-view-item:has(> img) {
        display: none;
    }
    .departments-container {
        flex-direction: column;
    }
    
    .departments-sidebar {
        margin: 20px 0 0 0;
        width: 100%;
        flex-shrink: 0;
        background: #FFFFFF;
        border-radius: 20px;
        box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.08);
        height: 70px;
    }


    .departments-menu {
        list-style: none;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 10px;
        margin: 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .department-view-item {
        flex: 0 0 auto;
        scroll-snap-align: start;
        margin: 0;
        display: inline-block;
        width: auto;
    }
    
    .department-link {
        padding: 10px 15px;
        text-align: center;
        border-radius: 20px;
        border: 1px solid #eee;
        display: block;
        white-space: nowrap;
    }

    .qr-code-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .department-view-item {
        width: calc(50% - 5px); /* 每行2个，减去间距 */
    }
} 