/* 导航选项卡容器 */
.nav-tabs {
    list-style: none;
    padding: 0 20px;
}

/* 选项卡项 */
.tab-item {
    margin-bottom: 5px;
}

/* 右侧内容区 */
.content-area {
    flex: 1;
    /* padding: 0 30px; */
    float: left;
    width: 80%;
}

/* 内容区头部 */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* 内容区标题 */
.content-title {
    font-size: 28px;
    font-weight: bold;
    color: #333333;
}

/* 今日之星标签 */
.today-star {
    font-size: 20px;
    font-weight: bold;
    color: #ff6600;
    padding: 8px 16px;
    background-color: #fff8f0;
    border-radius: 20px;
}

/* 内容区副标题 */
.content-title p {
    font-size: 14px;
    color: #999999;
    margin-top: 6px;
}

/* 医生卡片容器 */
.doctors-container {
    display: grid;
    /* 核心1：去掉固定min值，改用纯1fr + 最大宽度限制，适配所有屏幕 */
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 10px;
    /* 核心2：去掉max-width:100%，改用max-width+margin:auto实现居中+自适应 */
    max-width: 1200px;
    /* 大屏最大宽度，避免内容过宽 */
    width: 100%;
    /* 关键：容器宽度始终占满父级 */
    padding: 0 10px;
    /* 左右留白，避免贴边 */
    margin: 0 auto;
}

/* 平板/电脑端（≥768px）：自动适配列数，每列最小200px，最大1fr */
@media (min-width: 768px) {
    .doctors-container {
        /* 核心3：去掉固定4列，改用auto-fill+minmax，列数随屏幕自动调整 */
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        /* 大屏加大间距，体验更好 */
        padding: 0 20px;
    }
}

/* 大屏（≥1024px）：最多4列，每列自适应平分宽度 */
@media (min-width: 1024px) {
    .doctors-container {
        grid-template-columns: repeat(min(4, auto-fill), 1fr);
        /* min(4, auto-fill)：最多4列，屏幕不够时自动减少 */
    }
}

/* 超小屏（可选）：强制1列，避免挤在一起 */
@media (max-width: 767px) {
    .doctors-container {
        grid-template-columns: 1fr;
    }
}

/* 医生卡片 */
.doctor-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 医生卡片悬停效果 */
.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* 医生头像 */
.doctor-avatar {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

/* 医生姓名 */
.doctor-name {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 8px;
}

.doctor-name span.leve {
    float: right;
    color: red;
    border: 1px solid;
    padding: 0 4px;
    border-radius: 5px;
}


/* 医生职称 */
.doctor-title {
    height: 19px;
    font-size: 14px;
    color: #666666;
    margin-bottom: 10px;
}

/* 医生评分 */
.doctor-rating {
    font-size: 14px;
    color: #ff9900;
    margin-bottom: 10px;
}

/* 医生信息 */
.doctor-info {
    font-size: 12px;
    color: #999999;
    margin-bottom: 16px;
    line-height: 1.6;
}

.doctor-info>p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 操作按钮容器 */
.doctor-buttons {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* 在线咨询按钮 */
.btn-online {
    /* background: linear-gradient(to right, #22a0db 0%, #35c6d3 100%); */
    background-color: #2dbad6;
    color: white;
    border-radius: 20px;
}

/* 在线咨询按钮悬停 */
.btn-online:hover {
    background-color: #22a0db;
}

/* 留言咨询按钮 */
.btn-message {
    background-color: #62a0ed;
    color: white;
    border-radius: 20px;
}

/* 留言咨询按钮悬停 */
.btn-message:hover {
    background-color: #22a0db;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666666;
}

/* 错误状态 */
.error {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #ff0000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }

    .content-area {
        padding: 0 20px;
    }

    .doctors-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

}

/* 新增：左侧department选中样式 */
.department {
    cursor: pointer;
    /* 鼠标悬浮变手型 */
    transition: background-color 0.2s;
}

.department.active {
    background-color: #0e419c;
    /* 选中背景色 */
    color: #fff;
    /* 选中文字色 */
}

/* 主容器 */
.container {
    display: flex;
    max-width: 100%;
    gap: 20px;
    min-height: 1000px;
}

/* 左侧分类导航 - 新增二级菜单样式 */
.category-nav {
    width: 20%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    float: left;
}

.nav-header {
    background-color: #0e419c;
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 16px;
}

.nav-list {
    list-style: none;
}

/* 一级分类 */
.nav-item {
    border-bottom: 1px solid #eee;
}

.nav-item>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-item>a:hover {
    background-color: #f8f9fa;
    color: #0e419c;
}

/* 展开/收起图标 */
.nav-item .icon {
    width: 16px;
    height: 16px;
    border: solid #666;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.nav-item .icon.collapse {
    transform: rotate(-135deg);
}

/* 二级分类 */
.sub-nav {
    background-color: #f9f9f9;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sub-nav li {
    padding: 8px 0 8px 30px;
}

.sub-nav li a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.sub-nav li a:hover {
    color: #0e419c;
    text-decoration: underline;
}

/* 二级菜单展开状态 */
.nav-item .sub-nav.show {
    max-height: 500px;
    /* 足够大的高度容纳所有二级项 */
}

/* 右侧疾病列表 */
.disease-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dept-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    display: none;
    /* 统一隐藏，避免重复定义 */
}

.dept-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dept-header h3 {
    font-size: 16px;
    color: #333;
}

.dept-header a {
    font-size: 12px;
    color: #0e419c;
    text-decoration: none;
}

.disease-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    line-height: 2;
}

.disease-item {
    flex: 0 0 calc(25% - 15px);
    /* 每行4个 */
    display: flex;
    align-items: center;
}

.disease-item::before {
    content: "•";
    color: #0e419c;
    margin-right: 5px;
}

.disease-item a {
    color: #0e419c;
    text-decoration: none;
    font-size: 14px;
}

.disease-item span {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0 10px;
    }

    .category-nav {
        width: 100%;
    }

    .disease-item {
        flex: 0 0 calc(50% - 10px);
        /* 移动端每行2个 */
    }
}

/* 1. 按科室查找（按钮）：突出“可点击” */
.dept-search-btn {
    width: 100%;
    border: none;
    border-radius: 2px;
    /* 圆角区分标题的直角 */
    cursor: pointer;
    /* 鼠标悬浮变手型，提示可点击 */
    transition: background-color 0.2s;
    background-color: #0e419c;
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 16px;
}

.dept-search-btn:hover {
    background-color: #0b357d;
    /* 悬浮加深，增强交互感 */
}

.search {
    width: 40%;
}

.search input {
    width: 83%;
}
 /* 筛选容器整体样式 */
 .filter-container {
    padding: 0 15px 15px 15px;     
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* 筛选项组（地区/区域/科室） */
.filter-group {
    /* margin-bottom: 15px; */
    line-height: 30px;
}

/* 筛选标题（地区/区域/科室） */
.filter-title {
    display: inline-block;
    width: 60px;
    font-weight: bold;
    color: #333;
}

/* 选项容器（默认隐藏二级选项） */
.filter-options {
    display: inline-block;
}

/* 一级选项样式 */
.filter-option {
    display: inline-block;
    padding: 0 8px;
    margin-right: 10px;
    cursor: pointer;
    color: #666;
}
/* 一级选项选中态 */
.filter-option.active {
    background-color: #0e419c;
    color: #fff;
    border-radius: 3px;
}

/* 二级选项容器（默认隐藏） */
.sub-filter {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

/* 二级选项样式 */
.sub-option {
    display: inline-block;
    padding: 0 8px;
    margin-right: 10px;
    cursor: pointer;
    color: #666;
}
.sub-option.active {
    color: #0e419c;
    font-weight: bold;
}