/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* 图片预加载 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lazy {
    opacity: 0.7;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.lazy.loaded {
    animation: fadeIn 0.5s ease forwards;
}

/* 图片加载失败占位样式 */
img[onerror] {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* will-change 优化动画性能 */
.banner-slide,
.mobile-menu,
.access-item,
.department-item,
.news-item,
.back-to-top,
.about-content,
.department-item,
.expert-item,
.news-item,
.contact-info,
.contact-form {
    will-change: transform, opacity;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部通知栏 */
.top-notice {
    background-color: #1a68b3;
    color: white;
    text-align: center;
    padding: 10px 0;
}

/* 导航栏样式 */
.main-header {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.main-header.scrolled .header-content {
    padding: 8px 0;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #1a68b3;
    border-bottom: 2px solid #1a68b3;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* 移动端导航菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transition: right 0.3s;
    padding: 60px 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    display: block;
    padding: 10px 0;
}

.mobile-menu ul li a.active {
    color: #1a68b3;
    font-weight: bold;
}

/* 轮播图样式 */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.banner-slides {
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: bold;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.banner-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.banner-controls button {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.banner-controls button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* 快速入口样式 */
.quick-access {
    background-color: white;
    padding: 40px 0;
}

.access-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.access-item {
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: transform 0.3s;
}

.access-item:hover {
    transform: translateY(-5px);
}

.access-item .icon {
    width: 80px;
    height: 80px;
    background-color: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #1a68b3;
    font-size: 32px;
}

.access-item span {
    display: block;
    font-size: 14px;
}

/* 通用区块标题 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.divider {
    width: 80px;
    height: 3px;
    background-color: #1a68b3;
    margin: 0 auto;
}

/* 医院概况样式 */
.about-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.read-more {
    display: inline-block;
    background-color: #1a68b3;
    color: white;
    padding: 10px 30px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.read-more:hover {
    background-color: #155aa1;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 科室介绍样式 */
.departments-section {
    padding: 80px 0;
    background-color: white;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.department-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.department-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.department-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.department-item h3 {
    font-size: 20px;
    margin: 20px;
    color: #333;
}

.department-item p {
    margin: 0 20px 20px;
    color: #666;
    font-size: 14px;
}

.department-item a {
    display: block;
    text-align: center;
    background-color: #1a68b3;
    color: white;
    padding: 12px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.department-item a:hover {
    background-color: #155aa1;
}

.more-btn {
    text-align: center;
}

.more-btn a {
    display: inline-block;
    border: 2px solid #1a68b3;
    color: #1a68b3;
    padding: 10px 40px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.more-btn a:hover {
    background-color: #1a68b3;
    color: white;
}

/* 专家团队样式 */
.experts-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.experts-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.expert-item {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.expert-item img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid #f0f0f0;
}

.expert-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.expert-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

/* 新闻动态样式 */
.news-section {
    padding: 80px 0;
    background-color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

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

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.news-content .date {
    color: #999;
    font-size: 12px;
    margin-bottom: 15px;
}

.news-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.news-content a {
    color: #1a68b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.news-content a:hover {
    text-decoration: underline;
}

/* 联系我们样式 */
.contact-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-content {
    display: flex;
    gap: 60px;
}

.contact-info {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background-color: #1a68b3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 20px;
    flex-shrink: 0;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.info-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.contact-form {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a68b3;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.contact-form button {
    width: 100%;
    background-color: #1a68b3;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #155aa1;
}

/* 页脚样式 */
.main-footer {
    background-color: #333;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #1a68b3;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.8;
    color: #ccc;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #444;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: #1a68b3;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    font-size: 12px;
    color: #ccc;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #1a68b3;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #155aa1;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .banner-content h2 {
        font-size: 40px;
    }
    
    .banner-content p {
        font-size: 18px;
    }
}

@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .about-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 32px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .banner {
        height: 300px;
    }
    
    .banner-content {
        left: 5%;
    }
    
    .banner-content h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .banner-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .access-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .about-section,
    .departments-section,
    .experts-section,
    .news-section,
    .contact-section {
        padding: 60px 0;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .banner {
        height: 250px;
    }
    
    .banner-content h2 {
        font-size: 24px;
    }
    
    .banner-controls button {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .access-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .access-item .icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px;
    }
    
    .expert-item img {
        width: 120px;
        height: 120px;
    }
    
    .footer-content {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .banner {
        height: 200px;
    }
    
    .banner-content h2 {
        font-size: 20px;
    }
    
    .banner-content p {
        font-size: 12px;
    }
    
    .about-section,
    .departments-section,
    .experts-section,
    .news-section,
    .contact-section {
        padding: 40px 0;
    }
}