/* 云雀资讯 - 现代资讯门户风格 */
:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.08);
    --accent: #f59e0b;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --white: #fff;
    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.1);
    --header-h: 60px;
    --max-width: 1200px;
    --sidebar-width: 320px;
    --radius: 12px;
    --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
img { max-width: 100%; height: auto; display: block; }

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* ===== Header ===== */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-h);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo { display: flex; align-items: center; }

.site-region {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 600;
}

.logo-img {
    height: 38px;
    width: auto;
    max-width: 168px;
    object-fit: contain;
}

.site-nav { flex: 1; min-width: 0; }

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.site-nav ul::-webkit-scrollbar { display: none; }

.site-nav a {
    display: block;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 20px;
    color: var(--text-secondary);
}
.site-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.site-nav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: .3s;
}

/* ===== Main ===== */
.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Banner ===== */
.hero-banner { margin: -20px -20px 24px; }

.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--card-shadow);
}

.banner-item { position: relative; }

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

.banner-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 48px 24px 20px;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.75));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.banner-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.banner-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: .3s;
}
.banner-dots span.active { background: #fff; width: 22px; border-radius: 4px; }

/* ===== Layout ===== */
.content-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 24px;
    align-items: start;
}

.main-column { min-width: 0; }

.page-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-heading::before {
    content: "";
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary-dark));
    border-radius: 2px;
}

.channel-header { margin-bottom: 8px; }
.channel-desc {
    color: var(--text-secondary);
    margin: -12px 0 20px 14px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.section-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 14px;
    font-weight: 700;
    padding-left: 14px;
    border-left: 3px solid var(--primary);
}

.top-news { margin-bottom: 28px; }

/* ===== News Card (with cover) ===== */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform .25s, box-shadow .25s;
    overflow: hidden;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.news-card-link {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    color: inherit;
    align-items: stretch;
}

.news-card-cover {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    height: 148px;
    min-height: 0;
    max-height: 148px;
    flex-shrink: 0;
    align-self: start;
}

.news-card-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s;
}
.news-card:hover .news-card-cover img { transform: scale(1.05); }

.news-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.news-card.top-card .news-card-link { grid-template-columns: 280px 1fr; }
.news-card.top-card .news-card-cover { height: 168px; max-height: 168px; }

.news-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color .2s;
}
.news-card:hover .news-card-title { color: var(--primary); }

.news-card.top-card .news-card-title { font-size: 1.1875rem; }

.item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.channel-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}
a.channel-tag:hover { background: rgba(37, 99, 235, 0.15); color: var(--primary-dark); }

.item-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-tip {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-light);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

/* ===== Pagination ===== */
.pagination { margin-top: 28px; text-align: center; }
.pagination ul {
    display: inline-flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination li a,
.pagination li span {
    display: block;
    min-width: 38px;
    padding: 8px 14px;
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: .2s;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
}

.sidebar-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-choice {
    position: static;
}

.sidebar-tabs {
    display: flex;
    align-items: center;
    padding: 14px 16px 0;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-tab {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

.sidebar-tab.is-active {
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: -1px;
}

.sidebar-tab-hot {
    color: var(--text-secondary);
    font-weight: 600;
}

.sidebar-tab-divider {
    width: 1px;
    height: 14px;
    background: var(--border);
    flex-shrink: 0;
}

.sidebar-choice-body {
    display: flex;
    flex-direction: column;
}

.choice-block {
    padding: 14px 16px 16px;
}

.choice-block + .choice-block {
    border-top: 1px solid var(--border);
}

.choice-featured {
    display: block;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
    color: #fff;
}

.choice-featured-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
}

.choice-featured-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.choice-featured-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.72) 100%);
}

.choice-featured-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45;
}

.choice-featured-local .choice-local-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 28px 12px 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

.choice-timeline-item {
    margin-bottom: 12px;
}

.choice-timeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.choice-timeline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.choice-timeline-meta time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.choice-timeline-link {
    display: block;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text);
    font-weight: 500;
    padding-left: 14px;
}

.choice-timeline-link:hover {
    color: var(--primary);
}

.choice-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--text-light);
}

.choice-more:hover { color: var(--primary); }

.choice-more-arrow {
    width: 6px;
    height: 6px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: rotate(45deg);
}

.choice-city-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
}

.choice-city-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.choice-city-arrow {
    width: 5px;
    height: 5px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.choice-local-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.choice-local-item-title {
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 500;
}

.choice-local-item:hover .choice-local-item-title { color: var(--primary); }

.sidebar-hot-day-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-hot-day-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.hot-day-featured {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.hot-day-pic {
    position: relative;
    width: 90px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #e2e8f0;
}

.hot-day-pic img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hot-day-featured-body {
    flex: 1;
    min-width: 0;
}

.hot-day-rank {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
}

.hot-day-item .hot-day-rank {
    position: static;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 4px;
    background: #94a3b8;
}

.hot-day-item:nth-child(1) .hot-day-rank { background: linear-gradient(135deg, #f97316, #ea580c); }
.hot-day-item:nth-child(2) .hot-day-rank { background: linear-gradient(135deg, #fb923c, #f97316); }
.hot-day-item:nth-child(3) .hot-day-rank { background: linear-gradient(135deg, #fdba74, #fb923c); }

.hot-day-featured-title,
.hot-day-item-title {
    font-size: 0.875rem;
    line-height: 1.45;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-day-read {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.hot-day-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.hot-day-item-body { flex: 1; min-width: 0; }

.hot-day-featured:hover .hot-day-featured-title,
.hot-day-item:hover .hot-day-item-title { color: var(--primary); }

.content-layout-article .article-detail {
    margin-bottom: 24px;
}

.content-layout-article .related-articles {
    margin-bottom: 0;
}

/* legacy channel list (fallback) */
.sidebar-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.sidebar-block h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.channel-list { list-style: none; }
.channel-list li { margin-bottom: 4px; }

.channel-list a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: .2s;
}
.channel-list a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    margin-right: 10px;
    flex-shrink: 0;
    transition: .2s;
}
.channel-list a:hover,
.channel-list a.active {
    background: var(--primary-soft);
    color: var(--primary);
}
.channel-list a:hover::before,
.channel-list a.active::before { background: var(--primary); }

/* ===== Article Detail ===== */
.breadcrumb {
    margin-bottom: 16px;
    font-size: 0.8125rem;
    color: var(--text-light);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; gap: 4px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--border); }

.article-detail {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.article-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 18px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.article-lead {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(90deg, var(--primary-soft), transparent);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-cover {
    margin-bottom: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.article-cover img { width: 100%; max-height: 480px; object-fit: cover; }

.article-content {
    font-size: 1.0625rem;
    line-height: 1.95;
    color: var(--text);
}
.article-content p { margin-bottom: 1.25em; }
.article-content img {
    margin: 20px auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--card-shadow);
}
.article-content h2, .article-content h3 {
    margin: 1.75em 0 0.75em;
    font-weight: 700;
    color: var(--text);
}

.article-source {
    margin-top: 36px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-light);
}
.article-source a { color: var(--primary); margin-left: 8px; font-weight: 500; }

/* Related */
.related-articles {
    margin-top: 24px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.related-articles h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

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

.related-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: .2s;
}
.related-item:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: var(--primary-soft);
}

.related-item-cover {
    width: 88px;
    height: 66px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
}
.related-item-cover img { width: 100%; height: 100%; object-fit: cover; }

.related-item-body { min-width: 0; flex: 1; }

.related-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}
.related-item:hover .related-item-title { color: var(--primary); }

.related-item time { font-size: 0.75rem; color: var(--text-light); }

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: rgba(255, 255, 255, 0.75);
    padding: 32px 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 0.8125rem;
}

.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-inner p { margin-bottom: 8px; }
.footer-inner a { color: rgba(255, 255, 255, 0.85); }
.footer-inner a:hover { color: #fff; }

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-links a { color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }
.footer-links a:hover { color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
        transform: translateY(-120%);
        opacity: 0;
        transition: .3s;
        pointer-events: none;
    }
    .site-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .site-nav ul { flex-direction: column; gap: 2px; }

    .content-layout { grid-template-columns: 1fr; }
    .sidebar { order: -1; position: static; }
    .sidebar-block,
    .sidebar-choice { position: static; }

    .news-card-link,
    .news-card.top-card .news-card-link {
        grid-template-columns: 1fr;
    }

    .news-card-cover,
    .news-card.top-card .news-card-cover {
        height: auto;
        max-height: none;
        aspect-ratio: 16 / 9;
        align-self: stretch;
    }

    .article-detail { padding: 20px; }
    .article-header h1 { font-size: 1.375rem; }

    .banner-item img { height: 220px; }
    .banner-caption { font-size: 1rem; padding: 32px 16px 16px; }

    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    .site-main { padding: 14px; }
    .hero-banner { margin: -14px -14px 18px; }
    .news-card-body { padding: 14px 16px; }
    .logo-img { height: 32px; max-width: 130px; }
}
