/* ============================================
   style.css - 主样式（包含新增区块样式）
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #f5f7fb;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 头部区域 */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo-area {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo i {
    font-size: 1.8rem;
    margin-right: 6px;
    vertical-align: middle;
}
.site-tagline {
    font-size: 0.85rem;
    color: #64748b;
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.main-nav a {
    text-decoration: none;
    font-weight: 500;
    color: #334155;
    transition: 0.2s;
    padding: 6px 0;
}
.main-nav a:hover, .main-nav a.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}
.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* 主网格布局 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin: 40px auto;
}
.content-area {
    background: transparent;
}
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Hero 区域（新增） */
.hero-section {
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    border-radius: 32px;
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.hero-section h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
}
.hero-section p {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 1.5rem;
}
.hero-search form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}
.hero-search input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 60px;
    font-size: 1rem;
}
.hero-search button {
    background: #2563eb;
    border: none;
    padding: 0 24px;
    border-radius: 60px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.hero-search button:hover {
    background: #1d4ed8;
}

/* 区块头部通用样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}
.section-title, .cat-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.more-link {
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.more-link i {
    vertical-align: middle;
}

/* 文章卡片（原有强化） */
.post-card {
    background: white;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eef2ff;
}
.post-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.post-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
}
.post-title a {
    text-decoration: none;
    color: #0f172a;
    transition: color 0.2s;
}
.post-title a:hover {
    color: #2563eb;
}
.post-meta {
    font-size: 0.85rem;
    color: #5b6e8c;
    margin-bottom: 16px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.post-meta i {
    margin-right: 5px;
}
.post-excerpt {
    color: #334155;
    margin-bottom: 18px;
    line-height: 1.5;
}
.read-more {
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.read-more i {
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.read-more:hover i {
    transform: translateX(3px);
}

/* 分类网格布局（新增） */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 40px 0;
}
.cat-block {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #eef2ff;
}
.cat-block .section-header {
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}
.cat-title {
    font-size: 1.3rem;
    margin: 0;
}
.cat-post-list {
    list-style: none;
}
.cat-post-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eef2ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cat-post-list li a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: color 0.2s;
}
.cat-post-list li a:hover {
    color: #2563eb;
}
.cat-post-list li span {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* 热门推荐卡片区（新增） */
.hot-recommend {
    margin: 40px 0;
}
.hot-card-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.hot-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid #eef2ff;
    transition: 0.2s;
}
.hot-card-rank {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: #2563eb;
    margin-right: 18px;
}
.hot-card-info {
    flex: 1;
}
.hot-card-info h4 {
    margin-bottom: 4px;
}
.hot-card-info h4 a {
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
}
.hot-card-info p {
    font-size: 0.8rem;
    color: #64748b;
}

/* 分页 */
.pagination {
    margin: 40px 0 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a {
    padding: 8px 16px;
    background: white;
    border-radius: 40px;
    text-decoration: none;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
}
.pagination a.active, .pagination a:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.pagination a.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 侧边栏 Widget（扩充） */
.widget {
    background: white;
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 32px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    border: 1px solid #eef2ff;
}
.widget-title {
    font-size: 1.3rem;
    margin-bottom: 18px;
    border-left: 3px solid #2563eb;
    padding-left: 12px;
}
.search-form {
    display: flex;
    gap: 8px;
}
.search-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 60px;
    font-size: 0.9rem;
}
.search-form button {
    background: #2563eb;
    border: none;
    padding: 0 16px;
    border-radius: 60px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.hot-list li, .widget-categories ul li {
    list-style: none;
    padding: 10px 0;
    border-bottom: 1px dashed #eef2ff;
    display: flex;
    justify-content: space-between;
}
.hot-list a, .widget-categories a {
    text-decoration: none;
    color: #1f2937;
}
.tag-cloud a {
    display: inline-block;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 30px;
    margin: 6px 6px 0 0;
    font-size: 0.8rem;
    text-decoration: none;
    color: #2563eb;
}
.widget-follow .social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.widget-follow .social-links a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-ad .ad-placeholder {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #475569;
    border: 1px dashed #cbd5e1;
}

/* 详情页样式（保留） */
.detail-article {
    background: white;
    border-radius: 28px;
    padding: 32px;
}
.article-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
}
.article-meta {
    display: flex;
    gap: 20px;
    color: #5b6e8c;
    font-size: 0.9rem;
    border-bottom: 1px solid #eef2ff;
    padding-bottom: 20px;
    margin-bottom: 28px;
}
.article-content {
    font-size: 1.05rem;
}
.article-content h2 {
    margin: 30px 0 16px;
    font-size: 1.6rem;
}
.article-content p {
    margin-bottom: 1.2rem;
}
.article-tags {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eef2ff;
}
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}
/* 底部 */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 28px 0;
    margin-top: 60px;
    text-align: center;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-links a {
    color: #94a3b8;
    margin-left: 20px;
    text-decoration: none;
}

/* 友情链接样式 */
.footer-friends {
    margin: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    width: 100%;
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    padding-top: 15px;
}
.friends-label {
    font-weight: 500;
    color: #94a3b8;
    margin-right: 12px;
}
.footer-friends a {
    color: #cbd5e1;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}
.footer-friends a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* 语言切换按钮样式 */
.lang-switch {
    display: flex;
    gap: 6px;
    margin-left: 20px;
}
.lang-btn {
    background: none;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    color: #475569;
}
.lang-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}
.lang-btn:hover:not(.active) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.active{
    color: #2563eb!important;
}