/* ============================================
   昆明绿萝通悟心理咨询中心 - 主样式文件
   专业心理咨询网站配色方案
   ============================================ */

/* CSS变量定义 */
:root {
    /* 主题色彩 - 保持原配色 */
    --primary: hsl(126, 15%, 60%);
    --primary-light: hsl(126, 15%, 70%);
    --primary-dark: hsl(126, 15%, 50%);
    --primary-bg: hsl(126, 15%, 60%, 0.08);

    /* 中性色彩 */
    --background: hsl(40, 20%, 97%);
    --foreground: hsl(0, 0%, 29%);
    --card: hsl(40, 25%, 99%);
    --card-foreground: hsl(0, 0%, 29%);
    --muted: hsl(40, 10%, 94%);
    --muted-foreground: hsl(0, 0%, 45%);
    --border: hsl(40, 15%, 88%);
    --accent: hsl(40, 15%, 92%);

    /* 功能色彩 */
    --success: #6AAF8B;
    --warning: #E8B46A;
    --error: #D4726A;

    /* 间距 */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* 字体 */
    --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;
}

/* 全局重置 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

button {
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   布局容器
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

/* ============================================
   Header 导航栏
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    display: flex;
    align-items: center;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
    flex-shrink: 0;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* 桌面端导航 */
.nav-desktop {
    display: none;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--foreground);
    background-color: var(--accent);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-bg);
}

/* 移动端菜单按钮 */
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--foreground);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

.menu-btn:hover {
    background-color: var(--accent);
}

.menu-btn svg {
    width: 24px;
    height: 24px;
}

/* 移动端导航菜单 */
.nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background);
    z-index: 99;
    padding: var(--spacing-md);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-mobile.active {
    display: block !important;
}

.nav-mobile .nav-link {
    display: block;
    padding: var(--spacing-md);
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
}

.nav-mobile .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-bg);
}

/* 桌面端显示导航 */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }

    .menu-btn {
        display: none;
    }

    .nav-mobile {
        display: none !important;
    }
}

/* ============================================
   Hero 幻灯片区域
   ============================================ */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(255, 255, 255, 0.5) 100%);
}

.slider-container {
    position: relative;
    width: 100%;
    height: 350px;
}

@media (min-width: 768px) {
    .slider-container {
        height: 400px;
    }
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide .container {
    position: relative;
    z-index: 2;
}

.slide-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.slide-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-lg);
    color: var(--foreground);
}

@media (min-width: 768px) {
    .slide-content h1 {
        font-size: 2.25rem;
    }
}

.slide-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: var(--muted-foreground);
}

@media (min-width: 768px) {
    .slide-content p {
        font-size: 1.125rem;
    }
}

/* 幻灯片切换按钮 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.slider-btn:hover {
    opacity: 1;
    color: var(--primary);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

@media (min-width: 768px) {
    .slider-btn {
        display: flex;
    }
}

/* 指示器 */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

.dot.active {
    background: var(--primary);
    transform: scale(1.2);
}


/* ============================================
   按钮样式
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.625rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: #fff;
    border-color: #fff;
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* ============================================
   区块标题
   ============================================ */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-card {
    background-color: var(--card);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    position: relative;
    padding-left: var(--spacing-md);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 2px;
}

.section-desc {
    color: var(--muted-foreground);
    margin-top: var(--spacing-xs);
    padding-left: var(--spacing-md);
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9375rem;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.section-link:hover {
    color: var(--primary-dark);
}

.section-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.section-link:hover svg {
    transform: translateX(4px);
}

/* ============================================
   卡片网格
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   文章卡片
   ============================================ */
.article-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    color: inherit;
}

.article-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: var(--muted);
    transition: transform 0.3s ease;
}

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

.article-card-body {
    padding: var(--spacing-lg);
}

.article-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-desc {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-date {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin-top: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ============================================
   特色卡片（带图标）
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: var(--primary);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--foreground);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}


/* ============================================
   Footer 页脚
   ============================================ */
.footer {
    background-color: #2D3436;
    color: #fff;
    padding: 0;
}

.footer .container {
    padding: var(--spacing-2xl) var(--spacing-md);
}

@media (min-width: 768px) {
    .footer .container {
        padding: var(--spacing-3xl) var(--spacing-xl);
    }
}

/* 中间内容区域 */
.footer-content {
    padding-bottom: var(--spacing-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.2fr 1fr 1fr 1.5fr;
        gap: var(--spacing-2xl);
    }
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: #fff;
}

.footer-col p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0 0 var(--spacing-md);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-col ul a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-tags span {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm) !important;
}

.contact-info svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-light);
}

/* 底部版权 */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-filing {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-filing a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.footer-filing a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-cert {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 1024px) {
    .footer-cert {
        justify-content: flex-start;
    }
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 链接区域 */
.footer-title {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-md);
    color: #fff;
    position: relative;
    padding-bottom: var(--spacing-sm);
    text-align: center;
}

@media (min-width: 1024px) {
    .footer-title {
        text-align: left;
    }
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background-color: var(--primary-light);
}

@media (min-width: 1024px) {
    .footer-title::after {
        left: 0;
        transform: none;
    }
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
}

@media (min-width: 1024px) {
    .footer-links {
        align-items: flex-start;
    }
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    padding: 6px 0;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

/* 联系方式列表 */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

@media (min-width: 1024px) {
    .footer-contact-list {
        align-items: flex-start;
    }
}

.footer-contact-list p {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

.footer-contact-list svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--primary-light);
    width: 14px;
    height: 14px;
}

/* 底部版权 */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-lg) 0;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-bottom-links a {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom-links span {
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   文章详情页
   ============================================ */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

@media (min-width: 768px) {
    .article-detail {
        padding: var(--spacing-3xl) var(--spacing-xl);
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-xl);
    transition: color 0.2s ease;
}

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

.back-link svg {
    width: 16px;
    height: 16px;
}

.article-detail-header {
    margin-bottom: var(--spacing-xl);
}

.article-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--spacing-md);
    color: var(--foreground);
}

@media (min-width: 768px) {
    .article-detail-title {
        font-size: 2rem;
    }
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--muted-foreground);
    font-size: 0.9375rem;
}

.article-detail-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-xl);
    background-color: var(--muted);
}

.article-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--foreground);
}

.article-detail-content p {
    margin-bottom: var(--spacing-lg);
}

.article-detail-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    color: var(--foreground);
    padding-left: var(--spacing-md);
    border-left: 4px solid var(--primary);
}

.article-detail-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    color: var(--foreground);
}

.article-detail-content ul,
.article-detail-content ol {
    padding-left: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.article-detail-content li {
    margin-bottom: var(--spacing-sm);
}

.article-detail-content strong {
    color: var(--foreground);
    font-weight: 600;
}

/* Markdown渲染内容样式 */
.article-detail-content blockquote {
    border-left: 4px solid var(--primary);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    background: var(--primary-bg);
    color: var(--text-muted);
    font-style: italic;
}

.article-detail-content code {
    background: #f4f4f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-detail-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.article-detail-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-lg) 0;
}

.article-detail-content th,
.article-detail-content td {
    border: 1px solid var(--border);
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
}

.article-detail-content th {
    background: var(--primary-bg);
    font-weight: 600;
}

.article-detail-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--spacing-2xl) 0;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* ============================================
   列表页 Hero
   ============================================ */
.page-hero {
    background-color: var(--primary-bg);
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--foreground);
}

.page-hero p {
    color: var(--muted-foreground);
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .page-hero {
        padding: var(--spacing-3xl) 0;
    }

    .page-hero h1 {
        font-size: 2rem;
    }
}

/* ============================================
   工具类
   ============================================ */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--muted-foreground);
}

.bg-muted {
    background-color: var(--muted);
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-6 { margin-top: var(--spacing-xl); }
.mt-8 { margin-top: var(--spacing-2xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-6 { margin-bottom: var(--spacing-xl); }
.mb-8 { margin-bottom: var(--spacing-2xl); }

/* ============================================
   动画效果
   ============================================ */

/* 淡入上移 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 淡入 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 缩放淡入 */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 从左滑入 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 从右滑入 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 应用动画的类 */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-zoomIn {
    animation: zoomIn 0.5s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease forwards;
}

/* 延迟动画 */
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }
.delay-5 { animation-delay: 0.5s; opacity: 0; }
.delay-6 { animation-delay: 0.6s; opacity: 0; }

/* 页面加载动画 */
.page-loading {
    animation: fadeIn 0.8s ease;
}

/* Hero区域动画 */
.hero-slider {
    animation: fadeIn 1s ease;
}

.slide-content h1 {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.slide-content p {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

/* 特色卡片悬停效果 */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* 文章卡片悬停效果 */
.article-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

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

.article-card-img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 按钮动画 */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 140, 126, 0.4);
}

/* 导航链接动画 */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* Logo动画 */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(10deg) scale(1.1);
}

/* 区块标题动画 */
.section-title {
    position: relative;
}

.section-title::before {
    transition: height 0.3s ease;
}

.section-header:hover .section-title::before {
    height: 28px;
}

/* 链接箭头动画 */
.section-link svg {
    transition: transform 0.3s ease;
}

.section-link:hover svg {
    transform: translateX(5px);
}

/* Footer链接动画 */
.footer-col ul a {
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-col ul a:hover {
    padding-left: 8px;
    color: #fff;
}

/* 返回顶部按钮动画 */
.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 幻灯片指示器动画 */
.dot {
    transition: all 0.3s ease;
}

.dot.active {
    transform: scale(1.3);
}

/* 图片懒加载效果 */
img {
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 滚动进度指示器 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* 页面过渡效果 */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* 移动端菜单动画 */
.nav-mobile {
    transition: opacity 0.3s ease;
}

.nav-mobile.active .nav-link {
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
}

.nav-mobile.active .nav-link:nth-child(1) { animation-delay: 0.05s; }
.nav-mobile.active .nav-link:nth-child(2) { animation-delay: 0.1s; }
.nav-mobile.active .nav-link:nth-child(3) { animation-delay: 0.15s; }
.nav-mobile.active .nav-link:nth-child(4) { animation-delay: 0.2s; }
.nav-mobile.active .nav-link:nth-child(5) { animation-delay: 0.25s; }
.nav-mobile.active .nav-link:nth-child(6) { animation-delay: 0.3s; }
.nav-mobile.active .nav-link:nth-child(7) { animation-delay: 0.35s; }
.nav-mobile.active .nav-link:nth-child(8) { animation-delay: 0.4s; }

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   返回顶部按钮样式（JS动态添加）
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ============================================
   分页样式
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: var(--spacing-xs);
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

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

@media (max-width: 640px) {
    .pagination {
        gap: var(--spacing-sm);
    }

    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    .header,
    .footer,
    .menu-btn,
    .nav-mobile,
    .back-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    .article-detail {
        max-width: 100%;
        padding: 0;
    }
}
