/**
 * WG4 模板样式 - 浅色紫色杂志风格
 * 设计理念：优雅、现代、杂志化、结构化数据优化
 * 布局特点：三栏布局、大图头条、瀑布流
 */

/* ==================== 基础变量 ==================== */
:root {
    /* 主色调 - 紫色渐变 */
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --primary-bg: rgba(139, 92, 246, 0.08);
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    
    /* 强调色 */
    --accent-color: #ec4899;
    --accent-light: #f472b6;
    
    /* 背景色 */
    --bg-body: #faf5ff;
    --bg-white: #ffffff;
    --bg-light: #fdf4ff;
    --bg-muted: #f3e8ff;
    
    /* 文字颜色 */
    --text-dark: #1e1b4b;
    --text-body: #4c1d95;
    --text-muted: #7c3aed;
    --text-gray: #6b7280;
    
    /* 边框 */
    --border-color: #e9d5ff;
    --border-light: #f3e8ff;
    
    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(139, 92, 246, 0.05);
    --shadow-sm: 0 2px 8px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 4px 20px rgba(139, 92, 246, 0.15);
    --shadow-lg: 0 10px 40px rgba(139, 92, 246, 0.2);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* 尺寸 */
    --header-height: 72px;
    --container-width: 1320px;
    
    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 重置样式 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-gray);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ==================== 容器 ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== 头部 - 极简风格 ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 导航 - 下划线风格 */
.nav-list {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-list li a {
    position: relative;
    padding: 8px 0;
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 500;
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--primary-color);
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 100%;
}

/* 移动端菜单 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== 主体 ==================== */
.main {
    padding-top: calc(var(--header-height) + 40px);
    min-height: 100vh;
}

/* ==================== 首页头条区 - 大图+侧边 ==================== */
.headline {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 50px;
}

.headline-main {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-muted);
}

.headline-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.headline-main:hover img {
    transform: scale(1.05);
}

.headline-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: #fff;
}

.headline-main-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.headline-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.headline-main-title a {
    color: #fff;
}

.headline-main-meta {
    font-size: 14px;
    opacity: 0.9;
}

/* 侧边小文章 */
.headline-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.headline-side-item {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-muted);
}

.headline-side-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.headline-side-item:hover img {
    transform: scale(1.05);
}

.headline-side-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    color: #fff;
}

.headline-side-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.headline-side-title a {
    color: #fff;
}

/* ==================== 区块标题 ==================== */
.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.section-title::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

.section-more {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-white);
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.section-more:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==================== 文章网格 - 瀑布流风格 ==================== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.article-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-muted);
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-card-image img {
    transform: scale(1.1);
}

.article-card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.article-card-body {
    padding: 24px;
}

.article-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-title a {
    color: inherit;
}

.article-card-title a:hover {
    color: var(--primary-color);
}

.article-card-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.article-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 14px;
}

.article-card-author-name {
    font-size: 13px;
    color: var(--text-dark);
    font-weight: 500;
}

.article-card-date {
    font-size: 13px;
    color: var(--text-gray);
}

/* ==================== 服务区块 ==================== */
.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-lg);
}

.service-icon img {
    width: 40px;
    height: 40px;
}

.service-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.service-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ==================== 详情页 ==================== */
.detail {
    max-width: 900px;
    margin: 0 auto;
}

.detail-article {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.detail-header {
    padding: 48px 48px 32px;
    border-bottom: 1px solid var(--border-light);
}

.detail-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-bg);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 24px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
    color: var(--text-gray);
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-meta i {
    color: var(--primary-color);
}

.detail-meta a {
    color: var(--primary-color);
}

.detail-cover {
    padding: 0 48px;
}

.detail-cover img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin: 32px 0;
}

.detail-content {
    padding: 32px 48px 48px;
}

.detail-content p {
    margin-bottom: 1.6em;
    line-height: 1.9;
    font-size: 16px;
    color: var(--text-gray);
}

.detail-content h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2em 0 1em;
    font-weight: 700;
}

.detail-content h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 1.8em 0 0.8em;
    font-weight: 600;
}

.detail-content img {
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.detail-content blockquote {
    background: var(--bg-muted);
    border-left: 4px solid var(--primary-color);
    padding: 20px 28px;
    margin: 28px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

/* 标签 */
.detail-tags {
    padding: 24px 48px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-tags-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.detail-tags a {
    padding: 6px 16px;
    background: var(--bg-white);
    color: var(--text-gray);
    font-size: 13px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.detail-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 上下篇 */
.detail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.detail-nav-item {
    padding: 28px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.detail-nav-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.detail-nav-item.next {
    text-align: right;
}

.detail-nav-label {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-nav-item.next .detail-nav-label {
    justify-content: flex-end;
}

.detail-nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-nav-item:hover .detail-nav-title {
    color: var(--primary-color);
}

.detail-nav-empty {
    background: var(--bg-light);
}

.detail-nav-empty .detail-nav-title {
    color: var(--text-gray);
}

/* 相关推荐 */
.related {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}

.related-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

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

.related-item {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.related-item:hover {
    background: var(--bg-muted);
}

.related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item-title a {
    color: inherit;
}

.related-item-title a:hover {
    color: var(--primary-color);
}

.related-item-meta {
    font-size: 12px;
    color: var(--text-gray);
    display: flex;
    gap: 14px;
}

/* ==================== 分类页 ==================== */
.category-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    padding: 60px;
    margin-bottom: 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 150%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.category-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.category-desc {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-white);
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 64px 0 32px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-top: 20px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-gray);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-gray);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .headline {
        grid-template-columns: 1fr;
    }
    
    .headline-side {
        flex-direction: row;
    }
    
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }
    
    .nav-list {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-white);
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list li a {
        display: block;
        padding: 14px 0;
    }
    
    .nav-list li a::after {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .headline-side {
        flex-direction: column;
    }
    
    .headline-main-title {
        font-size: 1.25rem;
    }
    
    .headline-main-content {
        padding: 24px;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .services {
        grid-template-columns: 1fr;
    }
    
    .detail-header,
    .detail-content {
        padding: 28px;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .detail-tags {
        padding: 20px 28px;
    }
    
    .detail-nav {
        grid-template-columns: 1fr;
    }
    
    .detail-nav-item.next {
        text-align: left;
    }
    
    .detail-nav-item.next .detail-nav-label {
        justify-content: flex-start;
    }
    
    .related {
        padding: 28px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        padding: 40px 28px;
    }
    
    .category-title {
        font-size: 1.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ==================== 选中样式 ==================== */
::selection {
    background: var(--primary-color);
    color: #fff;
}