/* 全局样式 */
:root {
    --primary-color: #923A30;
    --secondary-color: #8b2323;
    --text-color: #333;
    --bg-color: #f9f6f2;
    --border-color: #B3B3B3;
    --container-width: 1200px;
    --container-padding: 20px;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    background: linear-gradient(rgba(248, 241, 228, 0.7), rgba(248, 241, 228, 0.7)),url('../assets/backgroup.png') no-repeat center center fixed;
    background-size: contain;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #efe1e1;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* 页面内容通用样式 */
.page-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: calc(var(--header-height) + 40px) var(--container-padding) 40px;
    min-height: calc(100vh - var(--header-height));
    /* box-shadow: 0 0 20px rgba(0, 0, 0, 0.05); */
    border-radius: 0 0 8px 8px;
}

.page-content h2 {
    font-size: 28px;
    text-align: left;
    position: relative;
}

.page-content h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.page-content p {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 15px;
    text-align: center;
}



/* Banner区域 */
.banner {
    /* background: url('/assets/backgroup.png') no-repeat center; */
    background-size: cover;
    padding: 50px 0;
    margin-top: 60px;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 0 20px;
}

.banner-right {
    flex: 1;
}

.banner-right img {
    max-width: 100%;
    height: auto;
}

/* 专科部分 */
.departments {

}

.departments h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}
.container-department {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    background-color: #ffffff;
    border-radius: 30px;
    padding: 0px 0 40px 0 ;
}
.container-department h2 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 30px;
    padding: 20px 0;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    img{
        width: 30px;
        height: 30px;
    }
}

.department-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.department-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.department-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 专家团队 */
.doctors {
    padding: 50px 0;
}

.doctors h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
}

.doctor-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 20px;
}

.doctor-card {
    width: 254px;
    height: 400px;
    /* box-shadow: 0px 0px 27px 0px rgba(0,0,0,0.17); */
    border-radius: 20px;
    border: 1px solid #923A30;
    padding: 20px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.doctor-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
}

.doctor-photo .placeholder-img {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.doctor-card h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.doctor-card p {
    color: #666;
    margin-bottom: 10px;
}
.docker-description{
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 60px;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}
.description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: px;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.consult-btn {
    background: #8b2323;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: auto;
    width: fit-content;
    align-self: center;
}

.more-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8b2323;
}

/* 学术资讯 */
.news {
    padding: 50px 0;
}

.news-header {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.new-header h2 {
    font-size: 28px;
}

.more-link {
    color: #8b2323;
    text-decoration: none;
}

.news-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    /* padding: 0 20px; */
}

.news-card {
    width: 284px;
    height: 371px;
    background: #FFFFFF;
    border-radius: 20px;
    border: 1px solid #B3B3B3;
    overflow: hidden;
    margin: 0 auto;
    
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card h3 {
    padding: 15px;
    font-size: 16px;
}

.news-card p {
    padding: 0 15px 15px;
    color: #666;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 45px;
}

/* 导航箭头默认隐藏 */
.department-nav {
    display: none;
}

@media (max-width: 768px) {
    .banner {
        background: url('/assets/backgroup.png') no-repeat center;
        background-size: cover;
        padding: 5px 0;
        margin-top: 60px;
    }
    
    .banner-right img {
        max-width: 100%;
        height: 100px;
        height: auto;
    }

    .departments{
        padding: 0px 0;
        overflow: hidden;
        margin: 10px 10px 10px 10px;
        border-radius: 10px;
    }

    .container-department {
        padding: 10px 0 10px 0;
        background-color: #ffffff;
    }

    .container-department h2 {
        padding: 20px 0;
        font-size: 20px;
        color: #000000;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 20px;
        img{
            width: 20px;
            height: 20px;
        }
        margin-bottom: 0px;
    }


    .department-grid {
    position: relative;
    width: 100%;
    overflow: hidden;
    }

    .department-item {
    text-align: center;
    }

    .icon-box {
    width: 120px;
    height: 120px;
    }

    .department-icon {
    width: 95%;
    height: 90%;
    object-fit: cover;
    }

    /* 导航箭头样式 */
    .department-nav {
        position: absolute;
        top: 110%; 
        transform: translateY(-50%);
        z-index: 100;
        cursor: pointer;
        display: block; /* 添加显示属性 */
        font-size: 24px; /* 添加字体大小 */
        color: var(--primary-color); /* 添加颜色 */
        background: rgba(255,255,255,0.8); /* 添加背景 */
        padding: 10px;
        border-radius: 50%;
        
    }

    .department-nav.prev {
    left: 10px; /* 调整左边距以控制箭头位置 */
    }

    .department-nav.next {
    right: 10px; /* 调整右边距以控制箭头位置 */
    }



    .doctor-card {
        flex: 0 0 254px;
        width: 254px;
        height: 450px !important;
        margin: 0 5px;
        scroll-snap-align: center;
        transform: scale(0.98);
        transition: transform 0.3s ease;
    }
    
    

    .doctor-grid::-webkit-scrollbar {
        display: none;
    }
    


    .doctor-card:hover {
        transform: scale(1);
    }
    .doctor-photo{
        height: 180px !important;
        width: 180px !important;
    }
    .doctor-card h3 {
        font-size: 18px;
    }
    .doctors h2{
        padding: 10px 0 0 0 ;
        margin-bottom:10px;
    }
    .description{
        padding: 0 15px 15px;
        color: #666;
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 70px;
    }
    .consult-btn{
        margin-top: 10px;
        padding: 10px 30px;
        font-size: 16px;
    }

    .doctors {
        position: relative;
        padding: 20px 0;
        overflow: hidden;
        margin: 10px 10px 10px 10px;
        border-radius: 10px;

    }

   /* 导航箭头样式 */
   .doctor-nav {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
    cursor: pointer;
    display: block; /* 添加显示属性 */
    font-size: 24px; /* 添加字体大小 */
    color: var(--primary-color); /* 添加颜色 */
    background: rgba(255,255,255,0.8); /* 添加背景 */
    padding: 10px;
    border-radius: 50%;
    z-index: 1000;
    }

    .doctor-nav.prev {
    left: 0px; /* 调整左边距以控制箭头位置 */
    }

    .doctor-nav.next {
    right: 0px; /* 调整右边距以控制箭头位置 */
    }

    



    .news-grid {
        display: flex;
        width: 100%;
        overflow-x: auto;
        /* grid-template-columns: none;
        gap: 15px;
        padding: 0 40px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 -20px;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 40px;
        padding-left: calc(50% - 142px);
        padding-right: calc(50% - 142px); */
    }

    .news-grid::-webkit-scrollbar {
        display: none;
    }


    .news-card p {
        padding: 0 15px 15px;
        color: #666;
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 45px;
        margin-bottom: 10px;
    }
    

    .news {
        position: relative;
        padding: 20px 0;
        overflow: hidden;
        margin: 10px 10px 10px 10px;
        border-radius: 10px;
    }

    .new-header {
        padding: 0 40px;
        margin-bottom: 20px;
    }

    /* 添加导航箭头样式 */
    .news-nav {
        position: absolute;
        top: 58%;
        transform: translateY(-50%);
        cursor: pointer;
        display: block; /* 添加显示属性 */
        font-size: 24px; /* 添加字体大小 */
        color: var(--primary-color); /* 添加颜色 */
        background: rgba(255,255,255,0.8); /* 添加背景 */
        padding: 10px;
        border-radius: 50%;
        z-index: 1000;
    }
    
        .news-nav.prev {
        left: 0px; /* 调整左边距以控制箭头位置 */
        }
    
        .news-nav.next {
        right: 0px; /* 调整右边距以控制箭头位置 */
        }
}

@media (max-width: 480px) {
    .doctor-card {
        flex: 0 0 220px;
        width: 220px;
        height: 312px;
    }
    
    .department-item {
        width: 100px;
    }

    .news-card {
        flex: 0 0 260px;
        width: 260px;
        min-width: 260px;
        height: 350px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .news-grid {
        padding-left: calc(50% - 130px);
        padding-right: calc(50% - 130px);
    }
} 
