/* ============================================================
   PETCTMR 预约网 - 主样式表
   响应式设计 - 移动端优先
   配色: 医疗蓝白
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: #333; line-height: 1.6; background: #f8f9fa;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: #1a73e8; text-decoration: none; transition: color .2s; }
a:hover { color: #0d47a1; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; background: none; }
input, select, textarea { font-family: inherit; font-size: 16px; outline: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.clearfix::after { content: ''; display: table; clear: both; }

/* --- Colors --- */
:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --secondary: #00bcd4;
    --accent: #ff6b35;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --border: #e0e0e0;
    --bg: #f8f9fa;
    --bg-white: #fff;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}

/* --- Top Bar --- */
.top-bar {
    background: var(--primary-dark); color: rgba(255,255,255,0.9);
    font-size: 13px; padding: 6px 0;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar-slogan {
    opacity: 0.95;
    background: rgba(255,255,255,0.15);
    padding: 2px 10px;
    border-radius: 4px;
}
.top-bar-phone strong { font-size: 14px; }

/* --- Header --- */
.header {
    background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: sticky; top: 0; z-index: 1000;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { max-height: 50px; }
.logo-text {
    background: var(--primary); color: #fff; font-weight: 700; font-size: 22px;
    padding: 4px 12px; border-radius: 6px; letter-spacing: 1px; white-space: nowrap;
}

/* --- Navigation --- */
.nav { display: flex; gap: 4px; }
.nav a {
    display: block; padding: 10px 14px; color: #333; font-size: 15px;
    font-weight: 500; border-radius: 6px; transition: all .2s; white-space: nowrap;
}
.nav a:hover { background: var(--primary-light); color: var(--primary); }
.nav a.active { background: var(--primary); color: #fff; }

/* Mobile nav toggle */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px; padding: 8px;
}
.nav-toggle span {
    width: 24px; height: 2px; background: var(--primary);
    transition: all .3s; border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Banner --- */
.banner { position: relative; overflow: hidden; background: linear-gradient(135deg, #0d47a1, #1a73e8, #00bcd4); }
.banner img { width: 100%; max-height: 320px; object-fit: cover; }
.banner-default { padding: 48px 0; text-align: center; color: #fff; }
.banner-default h1 {
    font-size: 28px; margin-bottom: 10px;
    background: rgba(255,255,255,0.18);
    padding: 8px 24px;
    border-radius: 8px;
    display: inline-block;
}
.banner-default p { font-size: 16px; opacity: 0.9; }

/* --- Main Content --- */
.main-content { padding: 30px 0; min-height: 400px; }

/* --- Section Title --- */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary);
}
.section-title h2 {
    font-size: 22px; color: var(--primary-dark); font-weight: 700;
    background: linear-gradient(135deg, rgba(13,71,161,0.08), rgba(26,115,232,0.06));
    padding: 6px 16px;
    border-radius: 6px;
}
.section-title h2::before {
    content: ''; display: inline-block; width: 4px; height: 20px;
    background: var(--primary); margin-right: 10px; vertical-align: -3px; border-radius: 2px;
}
.section-title .more { font-size: 14px; color: var(--text-light); }
.section-title .more:hover { color: var(--primary); }

/* --- Hospital Cards --- */
.hospital-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* --- Compact Hospital Grid (5 per row) --- */
.hospital-grid-compact { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.hospital-grid-compact .hospital-card { border-radius: 6px; }
.hospital-grid-compact .hospital-card-img { height: 110px; }
.hospital-grid-compact .hospital-card-body { padding: 10px; }
.hospital-grid-compact .hospital-card-body h3 { font-size: 14px; margin-bottom: 4px; }
.hospital-grid-compact .hospital-card-region { font-size: 12px; margin-bottom: 4px; }
.hospital-grid-compact .hospital-card-desc {
    font-size: 12px; line-height: 1.5; margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hospital-grid-compact .hospital-card-link { font-size: 12px; }
.hospital-grid-compact .hospital-card-img .hot-badge { font-size: 10px; padding: 1px 6px; }
.hospital-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: all .3s; display: flex; flex-direction: column;
}
.hospital-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.hospital-card-img {
    width: 100%; height: 200px; overflow: hidden; position: relative; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
}
.hospital-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hospital-card-img .placeholder {
    font-size: 16px; color: var(--primary); text-align: center; padding: 20px;
}
.hospital-card-img .hot-badge {
    position: absolute; top: 8px; right: 8px; background: var(--accent);
    color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 12px;
}
.hospital-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.hospital-card-body h3 { font-size: 17px; margin-bottom: 6px; color: var(--text); }
.hospital-card-body h3 a { color: inherit; }
.hospital-card-body h3 a:hover { color: var(--primary); }
.hospital-card-region { font-size: 13px; color: var(--primary); margin-bottom: 8px; }
.hospital-card-desc { font-size: 14px; color: var(--text-light); flex: 1; line-height: 1.7; margin-bottom: 12px; }
.hospital-card-footer { display: flex; justify-content: space-between; align-items: center; }
.hospital-card-link {
    color: var(--primary); font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
}
.hospital-card-link:hover { color: var(--primary-dark); }

/* --- Region Filter --- */
.region-filter { margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.region-filter a {
    padding: 6px 16px; background: #fff; border: 1px solid var(--border);
    border-radius: 20px; font-size: 14px; color: var(--text-light); transition: all .2s;
}
.region-filter a:hover, .region-filter a.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
/* Mobile region select (hidden on desktop) */
.region-select-mobile { display: none; }

/* --- Search Bar --- */
.search-bar { margin-bottom: 24px; display: flex; gap: 10px; }
.search-bar input {
    flex: 1; padding: 10px 16px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 15px;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar button {
    padding: 10px 24px; background: var(--primary); color: #fff;
    border-radius: 6px; font-size: 15px; font-weight: 500;
}
.search-bar button:hover { background: var(--primary-dark); }

/* --- Hospital Detail --- */
.hospital-detail { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hospital-detail-header { padding: 24px; border-bottom: 1px solid var(--border); }
.hospital-detail-header h1 { font-size: 24px; color: var(--text); margin-bottom: 8px; }
.hospital-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--text-light); }
.hospital-detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.hospital-detail-body { padding: 24px; }
.hospital-detail-body h3 { font-size: 18px; color: var(--primary-dark); margin: 20px 0 10px; padding-left: 12px; border-left: 4px solid var(--primary); }
.hospital-detail-body h4 { font-size: 16px; color: var(--text); margin: 16px 0 8px; }
.hospital-detail-body p { margin-bottom: 12px; color: var(--text-light); line-height: 1.8; }
.hospital-detail-body ul { margin: 8px 0 12px 20px; }
.hospital-detail-body ul li { list-style: disc; color: var(--text-light); margin-bottom: 4px; }
.hospital-detail-body .hospital-lead { font-size: 15px; color: var(--text); font-weight: 500; margin-bottom: 12px; line-height: 1.8; }
.hospital-detail-body .hospital-content-detail { color: var(--text-light); line-height: 1.8; }
.hospital-detail-body .hospital-content-detail p { margin-bottom: 12px; color: var(--text-light); line-height: 1.8; }
.hospital-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 16px 0; }
.hospital-info-item { padding: 12px 16px; background: var(--bg); border-radius: 6px; }
.hospital-info-item .label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.hospital-info-item .value { font-size: 15px; color: var(--text); }

/* --- Appointment Form --- */
.appointment-form-wrapper {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); margin-bottom: 24px;
    border: 2px solid var(--primary);
}
.appointment-form-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 16px 24px;
}
.appointment-form-header h2 { font-size: 20px; margin-bottom: 4px; }
.appointment-form-header p { font-size: 13px; opacity: 0.9; }
.appointment-form-body { padding: 24px; }
.appointment-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 14px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.form-group label .required { color: var(--danger); }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 15px; transition: border-color .2s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .error-msg { color: var(--danger); font-size: 12px; margin-top: 4px; min-height: 16px; }
.appointment-form-actions {
    grid-column: 1 / -1; display: flex; gap: 12px; justify-content: center; margin-top: 8px;
}

/* --- Compact Appointment Form --- */
.appointment-form-compact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.appointment-form-compact .form-group label { font-size: 13px; margin-bottom: 4px; }
.appointment-form-compact .form-group input,
.appointment-form-compact .form-group select,
.appointment-form-compact .form-group textarea {
    padding: 7px 10px; font-size: 14px; border-radius: 5px;
}
.appointment-form-compact .form-group textarea { min-height: 60px; }
.appointment-form-compact .form-group .error-msg { font-size: 11px; }
.appointment-form-compact .btn { padding: 8px 28px; font-size: 14px; }
.btn {
    padding: 12px 32px; border-radius: 6px; font-size: 16px; font-weight: 500;
    transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { border: 1px solid var(--border); color: var(--text-light); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 14px; }

/* --- Form Result Message --- */
.form-message {
    padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
    display: none; font-size: 14px;
}
.form-message.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; display: block; }
.form-message.error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; display: block; }

/* --- Article List --- */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-item {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); display: flex; transition: all .2s;
}
.article-item:hover { box-shadow: var(--shadow-lg); }
.article-item-img { width: 180px; flex-shrink: 0; overflow: hidden; }
.article-item-img img { width: 100%; height: 100%; object-fit: cover; }
.article-item-body { padding: 16px 20px; flex: 1; }
.article-item-body h3 { font-size: 17px; margin-bottom: 8px; }
.article-item-body h3 a { color: var(--text); }
.article-item-body h3 a:hover { color: var(--primary); }
.article-item-summary { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 8px; }
.article-item-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 16px; }

/* --- Article Grid Compact (homepage) --- */
.article-grid-compact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.article-card-compact {
    background: #fff; border-radius: 6px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08); transition: all .2s;
    border: 1px solid #f0f0f0;
}
.article-card-compact:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.12); border-color: #e0e0e0; }
.article-card-compact-body { padding: 12px 14px; }
.article-card-compact-body h3 { font-size: 14px; margin-bottom: 6px; line-height: 1.4; }
.article-card-compact-body h3 a { color: var(--text); }
.article-card-compact-body h3 a:hover { color: var(--primary); }
.article-card-compact-desc { font-size: 12px; color: var(--text-light); line-height: 1.5; margin-bottom: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-card-compact-meta { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
.article-cat-tag { background: #f5f5f5; color: var(--text-light); padding: 1px 8px; border-radius: 10px; font-size: 11px; }

/* --- Article Detail --- */
.article-detail { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.article-detail h1 { font-size: 26px; margin-bottom: 12px; color: var(--text); }
.article-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.article-content { font-size: 15px; line-height: 1.9; color: var(--text); }
.article-content p { margin-bottom: 14px; }
.article-content h3 { font-size: 18px; margin: 20px 0 10px; color: var(--primary-dark); }
.article-content h4 { font-size: 16px; margin: 16px 0 8px; }
.article-content ul, .article-content ol { margin: 8px 0 12px 20px; }
.article-content ul li { list-style: disc; margin-bottom: 4px; }
.article-content ol li { list-style: decimal; margin-bottom: 4px; }

/* --- Article Detail Layout --- */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}
.article-sidebar {
    position: sticky;
    top: 80px;
}
.article-sidebar-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.article-sidebar-card h3 {
    font-size: 16px;
    color: var(--primary-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.article-sidebar-card ul { list-style: none; }
.article-sidebar-card li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}
.article-sidebar-card li:last-child { border-bottom: none; }
.article-sidebar-card li a {
    font-size: 14px;
    color: var(--text-light);
    display: block;
    line-height: 1.5;
}
.article-sidebar-card li a:hover { color: var(--primary); }
.article-sidebar-card li time {
    font-size: 12px;
    color: var(--text-muted);
}
.article-sidebar-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    text-align: center;
}
.article-sidebar-cta h3 { font-size: 16px; margin-bottom: 8px; }
.article-sidebar-cta p { font-size: 14px; opacity: 0.9; margin-bottom: 12px; }
.article-sidebar-cta .cta-phone { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.article-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.article-nav-label { color: var(--text-muted); font-size: 14px; }
.article-nav a { font-size: 14px; }

/* --- Hospital CTA Box --- */
.hospital-cta {
    margin-top: 24px;
    padding: 16px;
    background: var(--primary-light);
    border-radius: var(--radius);
    text-align: center;
}
.hospital-cta p {
    margin: 0;
    font-size: 15px;
    color: var(--primary-dark);
}
.hospital-cta a { font-weight: 700; text-decoration: underline; }

/* --- Hospital Detail Image --- */
.hospital-detail-image {
    margin-bottom: 20px;
    text-align: center;
}
.hospital-detail-image img {
    max-height: 300px;
    border-radius: var(--radius);
    margin: 0 auto;
}

/* --- Home Search Section --- */
.home-search {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* --- Pagination --- */
.pagination { margin-top: 30px; display: flex; justify-content: center; }
.pagination ul { display: flex; gap: 6px; list-style: none; }
.pagination li a, .pagination li span {
    display: block; padding: 8px 14px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 14px; color: var(--text-light); background: #fff;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active a { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination li.ellipsis span { border: none; background: transparent; }

/* --- Float Sidebar (Right) --- */
.float-sidebar {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 999; display: flex; flex-direction: column; gap: 1px;
}

/* 移动端客服弹窗（全局隐藏，仅移动端 .show 时显示） */
.mobile-contact-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
}
.mobile-contact-overlay.show { display: block; }
.mobile-contact-modal {
    display: none; position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 320px; background: #fff; border-radius: 12px;
    padding: 24px 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); z-index: 2001;
    text-align: center;
}
.mobile-contact-modal.show { display: block; animation: slideUp .25s ease; }
@keyframes slideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.mobile-contact-modal h4 { font-size: 16px; color: #333; margin-bottom: 16px; }
.mobile-contact-modal .modal-phone { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.mobile-contact-modal .modal-time { font-size: 13px; color: #999; margin-bottom: 16px; }
.mobile-contact-modal .modal-wechat-id { font-size: 14px; color: #333; margin-bottom: 12px; }
.mobile-contact-modal .modal-close {
    display: block; width: 100%; padding: 10px; background: #f0f0f0; color: #666;
    border: none; border-radius: 8px; font-size: 15px; margin-top: 12px;
}
.mobile-contact-modal .modal-call-btn {
    display: block; width: 100%; padding: 12px; background: var(--success); color: #fff;
    border: none; border-radius: 8px; font-size: 16px; font-weight: 500; text-decoration: none;
}
.mobile-contact-modal img { width: 180px; height: 180px; margin: 0 auto 8px; border-radius: 8px; }
.float-item {
    position: relative; width: 56px; height: 56px; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; border: 1px solid var(--border); transition: all .2s;
}
.float-item:first-child { border-radius: 8px 0 0 0; }
.float-item:last-child { border-radius: 0 0 0 8px; }
.float-item:hover { background: var(--primary); color: #fff; }
.float-item:hover .float-icon { color: #fff; }
.float-phone:hover { background: var(--success); }
.float-wechat:hover { background: #07c160; }
.float-icon { color: var(--primary); transition: color .2s; }
.float-label { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.float-item:hover .float-label { color: #fff; }
.float-popup {
    position: absolute; right: 66px; top: 50%; transform: translateY(-50%) scale(0);
    background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg);
    padding: 20px; width: 200px; opacity: 0; pointer-events: none;
    transition: all .25s; transform-origin: right center;
}
.float-item:hover .float-popup { transform: translateY(-50%) scale(1); opacity: 1; pointer-events: auto; }
.float-popup h4 { font-size: 14px; color: var(--text); margin-bottom: 8px; text-align: center; }
.popup-phone { font-size: 20px; font-weight: 700; color: var(--primary); text-align: center; }
.popup-time { font-size: 12px; color: var(--text-muted); text-align: center; }
.float-popup-wechat .qrcode-img, .float-popup-wechat .qrcode-placeholder {
    width: 160px; height: 160px; margin: 0 auto 8px; border-radius: 4px; overflow: hidden;
}
.float-popup-wechat .qrcode-placeholder { display: flex; align-items: center; justify-content: center; background: #f5f5f5; }
.popup-wechat-id { font-size: 12px; color: var(--text-muted); text-align: center; }

/* --- Footer --- */
.footer { background: #1a2332; color: rgba(255,255,255,0.7); padding: 40px 0 0; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 30px; padding-bottom: 30px; }
.footer-col h3 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.8; margin-bottom: 8px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-about p { opacity: 0.7; }
.footer-contact-list { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact-icon { width: 36px; height: 36px; flex-shrink: 0; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-contact-text { display: flex; flex-direction: column; gap: 2px; }
.footer-contact-label { font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-contact-value { font-size: 15px; color: rgba(255,255,255,0.9); font-weight: 500; }
.footer-phone { font-size: 22px !important; color: #4fc3f7 !important; font-weight: 700; letter-spacing: 1px; }
.footer-qrcode { width: 80px; height: 80px; border-radius: 6px; margin-top: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; text-align: center; font-size: 13px; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 12px 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }

/* --- Alert / Notice --- */
.alert {
    padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }
.alert-warning { background: #fff3e0; color: #e65100; border-left: 4px solid var(--warning); }
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid var(--success); }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 64px; height: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 16px; }

/* ============================================================
   Responsive - Tablet
   ============================================================ */
@media (max-width: 992px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
    .hospital-info-grid { grid-template-columns: 1fr; }
    .article-item-img { width: 140px; }
    /* Compact grid: 3 per row on tablet */
    .hospital-grid-compact { grid-template-columns: repeat(3, 1fr); }
    /* Compact form: 2 columns on tablet */
    .appointment-form-compact { grid-template-columns: repeat(2, 1fr); }
    /* Article grid compact: 3 per row on tablet */
    .article-grid-compact { grid-template-columns: repeat(3, 1fr); }
    /* Banner height adjustment */
    .banner img { max-height: 260px; }
    .banner-default { padding: 36px 0; }
    .banner-default h1 { font-size: 24px; }
}

/* ============================================================
   Responsive - Large Mobile (between tablet and mobile)
   ============================================================ */
@media (max-width: 860px) {
    .hospital-grid-compact { grid-template-columns: repeat(2, 1fr); }
    .article-grid-compact { grid-template-columns: repeat(2, 1fr); }
    .appointment-form-compact { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Responsive - Mobile
   ============================================================ */
@media (max-width: 768px) {
    /* Navigation - Mobile Menu */
    .nav-toggle { display: flex; }
    .nav {
        position: fixed; top: 0; right: -100%; width: 75%; max-width: 320px;
        height: 100vh; background: #fff; flex-direction: column;
        padding: 70px 15px 20px; gap: 0; box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right .3s; overflow-y: auto; z-index: 1001;
    }
    .nav.open { right: 0; }
    .nav a { padding: 14px 16px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 16px; }

    /* Overlay - z-index 低于 header(1000)，确保导航栏和汉堡按钮可点击 */
    .nav-overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5); z-index: 998;
    }
    .nav-overlay.show { display: block; }

    .top-bar-slogan { display: none; }
    .top-bar-inner { justify-content: center; }
    .top-bar-phone { font-size: 14px; }

    .banner-default { padding: 30px 0; }
    .banner-default h1 { font-size: 22px; }
    .banner-default p { font-size: 14px; }

    /* Hospital grid - 1 column on mobile */
    .hospital-grid { grid-template-columns: 1fr; gap: 16px; }
    /* Compact grid: 2 per row on mobile */
    .hospital-grid-compact { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hospital-grid-compact .hospital-card-img { height: 90px; }
    .hospital-grid-compact .hospital-card-body h3 { font-size: 13px; }

    /* Article grid compact: 2 per row on mobile */
    .article-grid-compact { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .article-card-compact-body { padding: 10px; }
    .article-card-compact-body h3 { font-size: 13px; }

    /* Hospital card */
    .hospital-card-img { height: 180px; }
    .hospital-card-body { padding: 14px; }
    .hospital-card-body h3 { font-size: 16px; }
    .hospital-card-desc { font-size: 13px; -webkit-line-clamp: 3; }

    /* Appointment form - 1 column */
    .appointment-form { grid-template-columns: 1fr; }
    .appointment-form-compact { grid-template-columns: 1fr; }
    .appointment-form-body { padding: 16px; }
    .appointment-form-header { padding: 14px 16px; }
    .appointment-form-header h2 { font-size: 18px; }

    /* Article list */
    .article-item { flex-direction: column; }
    .article-item-img { width: 100%; height: 160px; }
    .article-item-body { padding: 14px; }

    /* Article detail */
    .article-detail { padding: 16px; }
    .article-detail h1 { font-size: 20px; }

    /* Hospital detail */
    .hospital-detail-header { padding: 16px; }
    .hospital-detail-header h1 { font-size: 20px; }
    .hospital-detail-body { padding: 16px; }

    /* Region filter - switch to dropdown on mobile */
    .region-filter { display: none; }
    .region-select-mobile {
        display: block; width: 100%; padding: 12px 16px;
        border: 1px solid var(--border); border-radius: 8px;
        font-size: 16px; background: #fff; color: var(--text);
        margin-bottom: 16px; -webkit-appearance: none; -moz-appearance: none; appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: right 16px center;
        min-height: 48px;
    }

    /* Search bar */
    .search-bar { flex-direction: column; }
    .search-bar button { width: 100%; }

    /* Section title */
    .section-title h2 { font-size: 18px; }

    /* Footer */
    .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
    .footer-col ul { display: inline-flex; flex-wrap: wrap; gap: 12px; }
    .footer-col ul li { margin-bottom: 0; }
    .footer-about { grid-column: 1 / -1; }
    .footer-about p { text-align: left; }
    .footer-contact { grid-column: 1 / -1; }
    .footer-contact-list { flex-direction: row; flex-wrap: wrap; gap: 20px; justify-content: flex-start; }
    .footer-contact-item { flex: 1 1 200px; }

    /* Float sidebar - bottom bar on mobile */
    .float-sidebar {
        position: fixed; right: 0; left: 0; bottom: 0; top: auto;
        transform: none; flex-direction: row; justify-content: space-around;
        background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); padding: 6px 0;
    }
    .float-item {
        width: auto; height: auto; border: none; border-radius: 0;
        flex: 1; padding: 6px; border-right: 1px solid var(--border);
    }
    .float-item:last-child { border-right: none; }
    .float-item:first-child { border-radius: 0; }

    /* 移动端隐藏桌面端 hover 弹窗 */
    .float-popup { display: none !important; }
    .float-label { font-size: 11px; }
    .float-icon { width: 22px; height: 22px; }

    /* Add bottom padding for fixed bottom bar */
    body { padding-bottom: 60px; }

    /* Back to top hidden on mobile */
    .float-top { display: none !important; }

    /* Pagination */
    .pagination ul { flex-wrap: wrap; justify-content: center; }
    .pagination li a, .pagination li span { padding: 6px 10px; font-size: 13px; }

    .main-content { padding: 16px 0; }

    /* Article layout - single column on mobile */
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

/* ============================================================
   Responsive - Small Mobile
   ============================================================ */
@media (max-width: 480px) {
    .logo-text { font-size: 16px; padding: 3px 8px; }
    .banner-default { padding: 24px 0; }
    .banner-default h1 { font-size: 18px; padding: 6px 16px; }
    .banner-default p { font-size: 13px; }
    .hospital-card-img { height: 160px; }
    .footer-top { grid-template-columns: 1fr; gap: 16px; }
    .footer-contact-list { flex-direction: column; gap: 12px; }
    .footer-contact-item { flex: 1 1 100%; }
    .footer-phone { font-size: 18px !important; }
    /* Compact grid: 1 per row on very small screens */
    .hospital-grid-compact { grid-template-columns: 1fr; }
    .article-grid-compact { grid-template-columns: 1fr; }
    /* Section title smaller */
    .section-title h2 { font-size: 16px; }
    .section-title { margin-bottom: 14px; padding-bottom: 8px; }
    /* Container padding smaller */
    .container { padding: 0 10px; }
    /* Hospital detail smaller */
    .hospital-detail-header { padding: 14px; }
    .hospital-detail-header h1 { font-size: 18px; }
    .hospital-detail-body { padding: 14px; }
    .hospital-detail-body h3 { font-size: 16px; }
    /* Appointment form compact */
    .appointment-form-compact .form-group input,
    .appointment-form-compact .form-group select,
    .appointment-form-compact .form-group textarea { font-size: 16px; }
    /* Article detail */
    .article-detail { padding: 14px; border-radius: 6px; }
    .article-detail h1 { font-size: 18px; }
    .article-content { font-size: 14px; }
    /* Pagination */
    .pagination li a, .pagination li span { padding: 5px 8px; font-size: 12px; }
    /* Top bar */
    .top-bar { font-size: 12px; padding: 4px 0; }
    .top-bar-phone strong { font-size: 13px; }
}

/* ============================================================
   Responsive - Very Small Mobile (<=360px)
   ============================================================ */
@media (max-width: 360px) {
    .logo-text { font-size: 14px; padding: 2px 6px; }
    .banner-default h1 { font-size: 16px; }
    .nav { width: 85%; }
    .float-item { padding: 4px; }
    .float-label { font-size: 10px; }
    .float-icon { width: 20px; height: 20px; }
    body { padding-bottom: 54px; }
    .footer-bottom { font-size: 12px; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    .header, .footer, .float-sidebar, .top-bar, .nav-toggle { display: none !important; }
}
