/* =============================================
   style.css — 全新现代化主题，保留原有变量
   ============================================= */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e8f0fe;
    --dark-bg: #0a2540;
    --surface: #f8fafc;
    --card-shadow: 0 8px 30px rgba(0, 20, 50, 0.08);
    --card-shadow-hover: 0 16px 48px rgba(0, 20, 50, 0.14);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 全局重置 */
body {
    font-family: var(--font);
    background: var(--surface);
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ----- 导航栏（玻璃态） ----- */
.navbar {
    background: rgba(10, 37, 64, 0.92) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    padding: 0.65rem 0;
}

.navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar .navbar-brand i {
    font-size: 1.6rem;
    color: #ffc107;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}
.navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}
.navbar .nav-link i {
    margin-right: 0.3rem;
}

/* 搜索框 */
.navbar .form-control {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}
.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.navbar .form-control:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    color: #fff;
}
.navbar .btn-outline-light {
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
}
.navbar .btn-outline-light:hover {
    background: #fff;
    color: var(--dark-bg);
    border-color: #fff;
}

/* ----- Hero 区域（渐变+光晕） ----- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0a2540 0%, #1a3a6f 50%, #0d6efd 100%);
    color: white;
    padding: 5rem 0 4.5rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(ellipse at 70% 50%, rgba(13, 110, 253, 0.25) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 120%;
    background: radial-gradient(ellipse at 30% 80%, rgba(255, 193, 7, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero-text {
    position: relative;
    z-index: 2;
}
.hero-text h1 {
    font-weight: 800;
    font-size: 3.2rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}
.hero-text h1 span {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-text .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 480px;
}
.hero-text .btn {
    border-radius: 50px;
    padding: 0.65rem 2rem;
    font-weight: 600;
}
.hero-text .btn-primary {
    background: #fff;
    color: var(--dark-bg);
    border: none;
}
.hero-text .btn-primary:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.hero-text .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.hero-text .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    transform: translateY(-2px);
}

/* 统计卡片（毛玻璃） */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffc107;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-label {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ----- 通用区块 ----- */
.section {
    padding: 3.5rem 0;
}
.section-header {
    text-align: center;
    margin-bottom: 2.8rem;
}
.section-header h2 {
    font-weight: 700;
    font-size: 2.1rem;
    letter-spacing: -0.02em;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.section-header h2 i {
    color: var(--primary);
}
.section-header .text-muted {
    font-size: 1.05rem;
    opacity: 0.7;
}

/* ----- 卡片（医院、榜单、特色） ----- */
.hospital-card,
.ranking-card,
.feature-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.02);
}
.hospital-card:hover,
.ranking-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(13, 110, 253, 0.08);
}

.hospital-card .card-title,
.ranking-card .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
.hospital-card .card-title a,
.ranking-card .card-title a {
    color: var(--dark-bg);
    transition: color 0.2s;
}
.hospital-card .card-title a:hover,
.ranking-card .card-title a:hover {
    color: var(--primary);
}

.hospital-card .badge,
.ranking-card .badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
}

.feature-card {
    text-align: center;
    padding: 2.2rem 1.5rem;
    background: #fff;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}
.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
    background: var(--primary-light);
    padding: 0.8rem;
    border-radius: var(--radius-md);
    line-height: 1;
}
.feature-card h5 {
    font-weight: 700;
    font-size: 1.1rem;
}
.feature-card p {
    font-size: 0.92rem;
    color: #64748b;
}

/* 榜单排名徽章 */
.ranking-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 0.15rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    min-width: 48px;
    text-align: center;
}

/* ----- 医院详情页卡片 ----- */
.detail-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.detail-card .card-header {
    background: rgba(10, 37, 64, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-weight: 600;
    padding: 1rem 1.5rem;
}
.detail-card .card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
}
.detail-card .card-header h5 i {
    margin-right: 0.5rem;
    color: var(--primary);
}
.detail-card .list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 0.75rem 1.5rem;
    background: transparent;
}
.detail-card .list-group-item:last-child {
    border-bottom: none;
}

/* 优势科室标签 */
.badge-advantage {
    background: #d1fae5;
    color: #065f46;
    font-weight: 600;
}
.badge-secondary-soft {
    background: #f1f5f9;
    color: #475569;
}

/* ----- 分页 ----- */
.pagination .page-link {
    border-radius: 50px;
    margin: 0 0.2rem;
    border: none;
    color: var(--dark-bg);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}
.pagination .page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}
.pagination .page-item.disabled .page-link {
    color: #b0b8c5;
    background: transparent;
}

/* ----- 页脚 ----- */
footer {
    background: #0a1e2f;
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
footer h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}
footer a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: #fff;
    text-decoration: underline;
}
footer .border-top {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* 空状态 */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #94a3b8;
}
.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* 响应式微调 */
@media (max-width: 992px) {
    .hero-text h1 { font-size: 2.4rem; }
    .hero-section { padding: 3rem 0; }
    .stats-grid { gap: 0.8rem; padding: 1.5rem 1rem; }
    .stat-number { font-size: 2rem; }
}
@media (max-width: 576px) {
    .hero-text h1 { font-size: 1.9rem; }
    .hero-text .lead { font-size: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-number { font-size: 1.6rem; }
    .section-header h2 { font-size: 1.6rem; }
}

/* 淡入动画（可选） */
.fade-in-up {
    animation: fadeInUp 0.6s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}