/* 健康医疗网站样式表 */

/*
 * Z-INDEX 层级管理
 * =================
 * 默认: 页面普通内容 (无需设置z-index)
 * 100: 一般固定元素 (.back-to-top, .online-service)  
 * 1000: 导航栏 (.main-nav)
 * 1001: 导航下拉菜单 (.dropdown, .dropdown-menu, .search-suggestions)
 * 1002: 移动端菜单 (.mobile-menu)
 * 10002: 模态框和提示 (.modal, .tooltip, .alert, .notification)
 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* 防止子元素造成水平滚动 */
.container, section, div, article, main, aside {
    max-width: 100%;
}

/* 强制防止任何元素导致水平滚动 */
* {
    box-sizing: border-box;
}

*:not(html):not(body) {
    max-width: 100% !important;
}

/* 确保模态框等特殊元素有最高的z-index */
.modal,
.modal-overlay,
.tooltip,
.alert,
.notification,
.popover {
    z-index: 10002 !important;
}

/* 确保导航下拉菜单能够正确显示 */
.main-nav .dropdown,
.main-nav .dropdown-menu,
.main-nav .search-suggestions,
.user-dropdown {
    z-index: 1001 !important;
}

/* 确保导航栏本身有正确的层级 */
.main-nav {
    z-index: 1000 !important;
    position: relative;
}

.top-info-bar {
    z-index: 999;
    position: relative;
}

img, video, iframe, object, embed {
    max-width: 100%;
    height: auto;
}

/* 专门处理可能导致水平滚动的元素 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 只对非导航区域设置overflow-x hidden */
.hero-section, 
.quick-nav-section, 
.departments-section, 
.featured-doctors-section, 
.latest-news-section, 
.hot-qa-section, 
.popular-search-section {
    width: 100%;
    overflow-x: hidden;
}

/* 确保导航容器不会剪切下拉菜单 */
.main-nav .container {
    overflow: visible;
}

.top-info-bar .container {
    overflow: visible;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* 顶部信息栏 */
.top-info-bar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    color: white;
    padding: 12px 0;
    font-size: 13px;
    position: relative;
    z-index: 999;
    overflow: visible;
}

.top-info-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.top-info-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* 联系信息 */
.contact-info {
    display: flex;
    gap: 25px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.contact-item:hover {
    opacity: 1;
}

.contact-item i {
    color: #93c5fd;
    font-size: 12px;
    width: 14px;
    text-align: center;
}

/* 顶部操作区 */
.top-info-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 用户资料区 */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.welcome-text {
    opacity: 0.8;
    font-size: 12px;
}

.username {
    font-weight: 600;
    color: white;
}

.user-info i {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.user-profile:hover .user-info i {
    transform: rotate(180deg);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 220px;
    overflow: hidden;
}

.user-profile:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.user-meta strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 2px;
}

.user-meta small {
    color: #64748b;
    font-size: 12px;
}

.dropdown-menu-items {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #1e40af;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* 认证按钮 */
.auth-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-btn {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.register-btn {
    color: #1e40af;
    background: white;
    border-color: white;
}

.register-btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* 快速链接 */
.quick-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px) scale(1.05);
}

/* 旧的dropdown样式已被新的用户下拉菜单替代 */

/* 主导航栏 */
.main-nav {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000 !important;
}

.main-nav .container {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 80px;
}

.nav-left {
    flex: 0 0 auto;
    margin-right: 40px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1f2937;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #4f46e5;
}

.nav-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 主导航菜单 */
.main-navigation {
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.nav-item.active .nav-link {
    background: #eef2ff;
    color: #4f46e5;
}

.nav-link i {
    font-size: 16px;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 280px;
    padding: 20px;
    display: flex;
    gap: 30px;
}

.dropdown-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-section h4 {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-section a {
    display: block;
    padding: 8px 0;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.dropdown-section a:hover {
    color: #4f46e5;
}

/* 搜索框 */
.nav-search {
    flex: 0 0 auto;
    width: 300px;
    position: relative;
}

.search-form {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    overflow: hidden;
    background: white;
    transition: border-color 0.3s ease;
}

.search-form:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: none;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.search-btn {
    padding: 10px 16px;
    background: #4f46e5;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #4338ca;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: #f9fafb;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.nav-right {
    flex: 0 0 auto;
    margin-left: 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.login-link {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.login-link:hover {
    background: #f9fafb;
    color: #4f46e5;
    border-color: #4f46e5;
}

.nav-menu ul,
.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu .active a {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 6px;
}

.nav-menu i {
    margin-right: 8px;
    font-size: 16px;
}

.arrow {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-menu .dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* 通用下拉菜单 */
.dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 200px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-menu a:hover {
    background: #f9fafb;
    color: #4f46e5;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* 大型下拉菜单 */
.mega-menu {
    display: flex;
    min-width: 300px;
    max-width: 90vw;
    padding: 20px;
}

.menu-section {
    flex: 1;
    margin-right: 20px;
}

.menu-section:last-child {
    margin-right: 0;
}

.menu-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #4f46e5;
}

.menu-section a {
    display: block;
    padding: 8px 0;
    color: #6b7280;
    font-size: 13px;
    border-bottom: none;
}

/* 移动端菜单 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1002;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

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

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.mobile-menu-content {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: #f9fafb;
    color: #4f46e5;
}

.menu-item.active {
    background: #eef2ff;
    color: #4f46e5;
    border-left: 4px solid #4f46e5;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.mobile-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 10px 20px;
}


/* 首页英雄区域 */
.hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #1e3a8a;
    z-index: 1;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide.active {
    display: block;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.hero-text {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 30px;
}

.hero-indicators {
    display: flex;
    gap: 12px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

.hero-nav {
    display: flex;
    gap: 15px;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* 动画效果 */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease forwards;
}

.animate-fade-up-delay {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.3s forwards;
}

.animate-fade-up-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.6s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 快速导航 */
.quick-nav-section {
    padding: 60px 0;
    background: #f8fafc;
}

.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 30px;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.quick-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.quick-nav-item:hover::before {
    opacity: 0.03;
}

.quick-nav-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
    border-color: #4f46e5;
}

.nav-icon {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-right: 14px;
    flex-shrink: 0;
}

.icon-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-nav-item:hover .icon-bg {
    opacity: 1;
}

.nav-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.nav-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.nav-arrow {
    position: relative;
    z-index: 2;
    color: #cbd5e1;
    transition: all 0.3s ease;
    margin-left: 8px;
    font-size: 14px;
}

.quick-nav-item:hover .nav-arrow {
    color: #4f46e5;
    transform: translateX(4px);
}

/* 科室分类 */
.departments-section {
    padding: 60px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.more-link {
    position: absolute;
    top: 0;
    right: 0;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    transition: all 0.3s ease;
}

.more-link:hover {
    color: white;
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.department-item {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.department-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.department-item:hover::before {
    opacity: 0.02;
}

.department-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.1);
    border-color: #4f46e5;
}

.dept-icon {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: white;
    font-size: 18px;
}

.icon-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.department-item:hover .icon-effect {
    opacity: 1;
}

.dept-content {
    position: relative;
    z-index: 2;
}

.dept-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
    line-height: 1.3;
}

.sub-departments {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.sub-dept-tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1.2;
}

.department-item:hover .sub-dept-tag {
    background: #e0e7ff;
    color: #4f46e5;
}

.dept-arrow {
    color: #cbd5e1;
    transition: all 0.3s ease;
    margin-top: 6px;
    font-size: 14px;
}

.department-item:hover .dept-arrow {
    color: #4f46e5;
    transform: translateX(4px);
}

/* 推荐医生 */
.featured-doctors-section {
    padding: 60px 0;
    background: white;
}

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

.doctor-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #4f46e5;
}

.doctor-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.doctor-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 32px;
}

.doctor-info h3 {
    text-align: center;
    margin-bottom: 10px;
}

.doctor-info h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.doctor-info h3 a:hover {
    color: #4f46e5;
}

.doctor-title, .doctor-hospital, .doctor-category {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 5px;
}

.doctor-specialties {
    font-size: 13px;
    color: #6b7280;
    margin: 15px 0;
    text-align: center;
}

.doctor-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating i {
    color: #fbbf24;
    font-size: 14px;
}

.rating-score {
    margin-left: 5px;
    color: #6b7280;
}

.view-count {
    color: #6b7280;
}

.doctor-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

/* 健康头条 */
.latest-news-section {
    padding: 60px 0;
    background: #f8f9fa;
}

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

.news-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.news-item.featured {
    grid-column: span 2;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
}

.news-category {
    background: rgba(79, 70, 229, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    margin-bottom: 10px;
}

.news-content h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.news-content h3 a:hover {
    color: #4f46e5;
}

.news-summary {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 热门问答 */
.hot-qa-section {
    padding: 60px 0;
    background: white;
}

.qa-list {
    margin-bottom: 40px;
}

.qa-item {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.qa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #4f46e5;
}

.question-content {
    flex: 1;
}

.question-content h3 {
    margin-bottom: 10px;
}

.question-content h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.question-content h3 a:hover {
    color: #4f46e5;
}

.question-preview {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.question-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6b7280;
}

.question-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.question-stats {
    flex: 0 0 auto;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-left: 20px;
}

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

.stat-number {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #4f46e5;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
}

.qa-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 热门搜索 */
.popular-search-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.search-tag {
    display: flex;
    align-items: center;
    background: white;
    color: #374151;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.search-count {
    margin-left: 8px;
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.search-tag:hover .search-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 页脚 */
.main-footer {
    background: #1f2937;
    color: #d1d5db;
    margin-top: 80px;
}

.footer-content {
    padding: 60px 0 30px;
}

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

.footer-section h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

.contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.contact-item i {
    margin-right: 10px;
    color: #4f46e5;
    width: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4f46e5;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #374151;
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #4f46e5;
    color: white;
}

.site-stats {
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #374151;
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #4f46e5;
}

.stat-label {
    font-size: 12px;
    color: #9ca3af;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 30px 0;
}

.footer-bottom-content {
    text-align: center;
}

.copyright {
    margin-bottom: 15px;
}

.copyright p {
    margin-bottom: 5px;
}

.copyright a {
    color: #d1d5db;
    text-decoration: none;
}

.copyright a:hover {
    color: #4f46e5;
}

.separator {
    margin: 0 10px;
    color: #6b7280;
}

.footer-disclaimer {
    font-size: 12px;
    color: #9ca3af;
}

.disclaimer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.disclaimer-text i {
    color: #f59e0b;
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

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

.back-to-top:hover {
    background: #4338ca;
    transform: translateY(-3px);
}

/* 在线客服 */
.online-service {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
}

.service-btn {
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.service-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.service-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.service-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    color: #1f2937;
}

.close-service {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
}

.service-content {
    padding: 15px 20px;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.service-item:last-child {
    border-bottom: none;
}

.service-item i {
    margin-right: 15px;
    font-size: 20px;
    color: #4f46e5;
    width: 24px;
}

.service-item strong {
    display: block;
    color: #1f2937;
    font-size: 14px;
}

.service-item p {
    color: #6b7280;
    font-size: 12px;
    margin: 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 40px 0;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.pagination .current {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.pagination .dots {
    border: none;
    background: none;
    color: #6b7280;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    .hero-image {
        max-width: 60%;
    }
    
    .mega-menu {
        flex-direction: column;
        min-width: 250px;
    }
    
    .menu-section {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .menu-section:last-child {
        margin-bottom: 0;
    }
    
    .news-item.featured {
        grid-column: span 1;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .nav-search {
        width: 250px;
    }
    
    .nav-menu {
        gap: 4px;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .dropdown-menu {
        min-width: 250px;
        padding: 15px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }
    
    .nav-search {
        width: 200px;
    }
    
    .nav-left {
        margin-right: 20px;
    }
    
    .nav-center {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* 顶部信息栏响应式 */
    .top-info-content {
        flex-direction: column;
        gap: 12px;
        padding: 8px 0;
    }
    
    .contact-info {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .contact-item {
        font-size: 11px;
    }
    
    .contact-item:nth-child(3) {
        display: none; /* 隐藏服务时间 */
    }
    
    .top-info-actions {
        gap: 12px;
    }
    
    .user-profile {
        padding: 4px 8px;
        gap: 8px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .user-info {
        font-size: 12px;
    }
    
    .welcome-text {
        display: none;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .quick-links {
        gap: 6px;
    }
    
    .quick-link {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* 主导航响应式 */
    .nav-center {
        display: none;
    }
    
    .nav-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-nav .container {
        height: 70px;
    }
    
    .nav-left {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    /* 顶部信息栏极小屏幕适配 */
    .top-info-bar {
        padding: 8px 0;
        font-size: 11px;
    }
    
    .contact-info {
        gap: 10px;
    }
    
    .contact-item:nth-child(2) {
        display: none; /* 小屏隐藏邮箱 */
    }
    
    .top-info-actions {
        gap: 8px;
    }
    
    .user-profile {
        padding: 3px 6px;
        gap: 6px;
    }
    
    .user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .user-info {
        font-size: 11px;
    }
    
    .auth-btn {
        padding: 4px 8px;
        font-size: 10px;
        gap: 4px;
    }
    
    .quick-link {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    /* 主导航极小屏幕适配 */
    .main-nav .container {
        height: 60px;
        padding: 0 10px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
}
    
    .hero-text h1 {
        font-size: 32px;
    }
    
    .hero-text p {
        font-size: 16px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-image {
        max-width: 80%;
    }
    
    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-item.featured {
        grid-column: span 1;
    }
    
    .qa-item {
        flex-direction: column;
    }
    
    .question-stats {
        margin-left: 0;
        margin-top: 15px;
        justify-content: center;
    }
    
    .footer-sections {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .online-service {
        left: 15px;
        bottom: 15px;
    }
    
    .back-to-top {
        right: 15px;
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .top-bar {
        font-size: 12px;
    }
    
    .top-left span {
        display: none;
    }
    
    .top-left span:first-child {
        display: inline;
    }
    
    .hero-content {
        padding: 60px 0;
    }
    
    .hero-text h1 {
        font-size: 24px;
    }
    
    .quick-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .search-tags {
        gap: 10px;
    }
    
    .search-tag {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .service-panel {
        width: 260px;
    }
}