﻿body { font-family: "Microsoft YaHei", sans-serif; color: #333; }

.section-title {
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
    margin-bottom: 25px;
    font-size: 24px;
}

.banner { max-height: 450px; overflow: hidden; }
.banner img { object-fit: cover; width: 100%; }

.doctor-card { transition: all 0.3s; border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.doctor-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.doctor-card img { height: 280px; object-fit: cover; }

.news-list li { 
    padding: 10px 0; 
    border-bottom: 1px dashed #eee; 
    display: flex;
    justify-content: space-between;
}
.news-list a { color: #333; text-decoration: none; display: flex; width: 100%; }
.news-list a:hover { color: #0d6efd; }
.news-list .title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list .date { color: #999; margin-left: 15px; flex-shrink: 0; }

.hot-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.hot-tag {
    display: inline-block;
    padding: 8px 20px;
    background: #f0f5ff;
    color: #0d6efd;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
}
.hot-tag:hover { background: #0d6efd; color: #fff; }

.booking-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.booking-section h3 { color: #fff; }

.news-title { font-size: 28px; margin-bottom: 15px; }
.news-content { font-size: 16px; line-height: 1.8; }
.news-content img { max-width: 100%; height: auto; }

.prev-next { padding: 20px 0; }
.prev-next p { margin-bottom: 10px; }

.booking-form { background: #f9f9f9; padding: 30px; border-radius: 8px; }

.about-content { line-height: 2; font-size: 16px; }

.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}
.pagination a.active { background: #0d6efd; color: #fff; border-color: #0d6efd; }

@media (max-width: 768px) {
    .section-title { font-size: 20px; }
    .doctor-card img { height: 200px; }
    .banner { max-height: 200px; }
    .booking-section { text-align: center; padding: 30px 20px !important; }
    .booking-section .text-end { text-align: center !important; margin-top: 15px; }
}
/* 顶部信息栏 样式完全保留 */
.top-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}
.top-bar .logo img {
    height: 50px;
}
.top-bar .top-phone {
    text-align: right;
    line-height: 50px;
    font-size: 20px;
    font-weight: bold;
    color: #0d6efd;
}
.top-bar .top-phone::before {
    content: "📞";
    margin-right: 5px;
}

/* 导航栏美化 浅色改版 */
/* 强制覆盖原有蓝色背景，改为浅灰白色，和Banner拉开层次 */
.navbar.bg-primary {
    background-color: #3686fd !important;
}
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 10px 0;
}

/* 导航文字改为深色，适配浅色背景 */
.navbar .nav-link {
    color: #333 !important;
    margin: 0 6px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 15px;
}
.navbar .nav-link:hover {
    background: #eef5ff;
    color: #0d6efd !important;
}

/* 菜单整体靠右，预约按钮自然处于最右侧 */
.navbar .navbar-nav {
    margin-left: auto;
    align-items: center;
}

/* 预约挂号按钮 默认状态更突出 */
.navbar .nav-link.btn-warning {
    color: #fff !important;
    background: linear-gradient(135deg, #ff8a33 0%, #ff6b00 100%) !important;
    border: none;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(230, 81, 0, 0.3);
    margin-left: 12px;
}
.navbar .nav-link.btn-warning:hover {
    background: linear-gradient(135deg, #ff6b00 0%, #e65100 100%) !important;
    box-shadow: 0 5px 14px rgba(230, 81, 0, 0.4);
    color: #fff !important;
}

/* 移动端点击展开后 所有菜单项居中 */
@media (max-width: 991px) {
    .navbar .navbar-nav {
        margin-left: 0;
        padding: 10px 0;
        text-align: center;
        align-items: stretch;
    }
    .navbar .nav-link {
        margin: 4px 0;
        padding: 10px;
    }
    .navbar .nav-link.btn-warning {
        margin: 10px auto 0;
        max-width: 200px;
    }
        /* 预约按钮单独居中 */
    .navbar .nav-link.btn-warning {
        margin: 12px auto 0 !important;
        display: block;
        max-width: 220px;
        text-align: center;
    }
}

/* 首页三栏模块 */
.home-news-block {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
}
.news-slide-box {
    flex: 0 0 40%;
}
.news-slide-box .carousel-caption {
    background: rgba(0,0,0,0.6);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 15px;
}
.news-list-box {
    flex: 0 0 35%;
}
.news-list-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list-box li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}
.news-list-box a {
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.news-list-box a:hover {
    color: #0d6efd;
}
.news-list-box .date {
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
}

.about-side-box {
    flex: 1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}
.about-side-box h4 {
    border-left: 4px solid #0d6efd;
    padding-left: 10px;
    margin-bottom: 15px;
}
.about-side-box .about-text {
    line-height: 1.7;
    color: #666;
    font-size: 14px;
    padding: 12px 0;
    margin-bottom: 13px;
}
.about-side-box .side-phone {
    background: #0d6efd;
    color: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
}
.about-side-box .side-phone .num {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
}

/* 医院环境 */
.env-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.env-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s;
}
.env-item:hover img {
    transform: scale(1.05);
}
.env-item p {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}

/* 友情链接 */
.link-box {
    background: #f8f9fa;
    padding: 20px 0;
    margin-top: 30px;
}
.link-box h5 {
    margin-bottom: 15px;
}
.link-list a {
    display: inline-block;
    color: #666;
    text-decoration: none;
    margin-right: 20px;
    margin-bottom: 8px;
    font-size: 14px;
}
.link-list a:hover {
    color: #0d6efd;
}

/* 底部美化居中 */
footer {
    text-align: center;
}
footer .row > div {
    margin-bottom: 20px;
}
footer ul {
    display: flex;
    justify-content: center;
    gap: 20px;
}
footer hr {
    margin: 15px 0;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .home-news-block {
        flex-direction: column;
    }
    .env-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .top-bar .top-phone {
        text-align: left;
        font-size: 16px;
    }
}
/* ========== 新闻中心模块 ========== */
.news-center-wrap {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

.news-center-wrap .section-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.news-center-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-center-icon {
    width: 4px;
    height: 20px;
    background: #0d6efd;
    border-radius: 2px;
}

.news-center-title h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.news-more-link {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.news-more-link:hover {
    color: #0d6efd;
}
/* 左侧最新文章 */
.latest-news-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.latest-news-img img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 6px;
}

/* 头部：日期+标题 同行 垂直居中 */
.latest-news-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.news-date-box {
    flex-shrink: 0;
    width: 60px;
    background: #0d6efd;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px 0;
}

.news-date-box .day {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.news-date-box .month {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.9;
}

.latest-news-header h4 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 18px;
    line-height: 1.45;
}

.latest-news-header h4 a {
    color: #333;
    text-decoration: none;
    /* 标题最多2行，超出省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-news-header h4 a:hover {
    color: #0d6efd;
}

/* 简介区域 通铺显示 */
.latest-news-desc p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    text-indent: 0;
    /* 简介最多2行，超出省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 右侧新闻列表 */
.news-list-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-card li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-list-card li:last-child {
    border-bottom: none;
}

.news-list-card a {
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-size: 15px;
}

.news-list-card a:hover {
    color: #0d6efd;
}

.news-list-card .date {
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
    font-size: 13px;
}

/* ========== 医院简介 ========== */
.about-side-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.about-side-box h4 {
    border-left: 4px solid #0d6efd;
    padding-left: 12px;
    margin-bottom: 15px;
}

.about-side-box .about-text {
    line-height: 1.8;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.about-side-box .side-phone {
    background: #0d6efd;
    color: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
}

.about-side-box .side-phone .num {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
}

/* ========== 通用标题 ========== */
.section-title {
    border-left: 4px solid #0d6efd;
    padding-left: 12px;
    margin-bottom: 20px;
    font-size: 20px;
}

/* ========== 问答/新闻并排列表 ========== */
.news-list-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-list-box li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-list-box a {
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-size: 14px;
}

.news-list-box a:hover {
    color: #0d6efd;
}

.news-list-box .date {
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
    font-size: 13px;
}

/* ========== 医院环境 ========== */
.env-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.env-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s;
}

.env-item:hover img {
    transform: scale(1.05);
}

.env-item p {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}

/* ========== 友情链接 ========== */
.link-box {
    background: #f8f9fa;
    padding: 20px 0;
    margin-top: 30px;
}

.link-box h5 {
    margin-bottom: 15px;
}

.link-list a {
    display: inline-block;
    color: #666;
    text-decoration: none;
    margin-right: 20px;
    margin-bottom: 8px;
    font-size: 14px;
}

.link-list a:hover {
    color: #0d6efd;
}

/* ========== 响应式适配 ========== */
@media (max-width: 768px) {
    .news-center-wrap {
        padding: 20px;
    }

    .latest-news-img img {
        height: 220px;
    }

    .latest-news-info {
        flex-direction: column;
    }

    .news-date-box {
        width: 100%;
        padding: 10px;
    }

    .env-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 保证两栏高度对齐 */
.news-center-wrap {
    display: flex;
    flex-direction: column;
}

.about-side-box {
    display: flex;
    flex-direction: column;
}

.flex-1 {
    flex: 1;
}

/* 缩小封面图高度，适配并排布局 */
.latest-news-img img {
    height: 240px;
}

/* 新闻列表高度自适应 */
.news-list-card {
    display: flex;
    flex-direction: column;
}
/* 导航栏文字优化 */
.navbar .nav-link {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff !important;
    padding: 8px 18px !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.navbar .nav-link:hover {
    background: rgba(255,255,255,0.2);
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 预约挂号按钮强化 */
.navbar .nav-link.btn-warning {
    color: #ffffff !important;
    font-weight: 700;
    padding: 8px 20px !important;
}

.navbar .nav-link.btn-warning:hover {
    background: #ffc107;
    filter: brightness(1.05);
}
/* ========== 文章内容通用排版 ========== */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

/* 首行缩进2字符 + 段间距 */
.article-content p {
    text-indent: 2em;
    margin-bottom: 16px;
}

/* 图片自适应居中 */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 18px auto;
    border-radius: 4px;
}

/* 标题间距 */
.article-content h2,
.article-content h3 {
    margin: 22px 0 12px;
    font-weight: 600;
    color: #222;
}

/* 列表缩进 */
.article-content ul,
.article-content ol {
    margin: 12px 0 12px 2.5em;
}

/* 引用块样式 */
.article-content blockquote {
    border-left: 4px solid #0d6efd;
    background: #f8f9fa;
    padding: 12px 18px;
    margin: 16px 0;
    color: #555;
}

/* 文章详情页标题区 */
.article-detail {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}
.article-detail h1 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}
.article-meta {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
/* 科室卡片 */
.dept-card {
    transition: all 0.3s;
    border: 1px solid #e6e6e6;
}
.dept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dept-card .card-title {
    font-size: 18px;
    margin-bottom: 12px;
}
.about-side-box {
    display: flex;
    flex-direction: column;
}
.about-img img {
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
}
.about-text {
    line-height: 1.75;
    color: #555;
    margin:8px 0 16px;
}
/* 隐藏旧电话模块 */
.side-phone {
    display: none !important;
}
.about-btn-group .btn{
    padding:10px 0;
}


/* 全局盒子模型，禁止内边距撑破栅格宽度【核心修复换行BUG】 */
*,*::before,*::after{
    box-sizing: border-box !important;
}

.banner-pc img{
    max-height:450px;
    object-fit:cover;
    width: 100%;
}
.banner-mobile img{
    width: 100%;
    overflow: hidden;
}
.banner-mobile .banner-mobile-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: none;
    object-fit: unset;
}
.banner-mobile .carousel-item {
    width: 100%;
}

/* 新闻标题左侧蓝线样式，匹配你的截图 */
.news-center-icon {
    width: 4px;
    height: 22px;
    background: #0d6efd;
    display: inline-block;
    margin-right:12px;
}
.section-title {
    display: flex;
    align-items: center;
    border-left:4px solid #0d6efd;
    padding-left:14px;
    font-size:22px;
    margin-bottom:22px;
}
/* 移动端banner完整显示修复 */
.banner-mobile,
.banner-mobile .carousel,
.banner-mobile .carousel-inner,
.banner-mobile .carousel-item {
    width: 100%;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 25px;
}

.banner-mobile .banner-mobile-img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
}