/* 文章页面专用样式 - articles.css */

/* 文章分类导航 */
.article-categories {
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-tab {
    padding: 0.8rem 2rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: #333;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-tab:hover {
    color: var(--secondary-color);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color));
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(173, 216, 230, 0.3);
}

/* 文章网格布局 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 文章卡片样式 */
.article-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    box-shadow: 0 8px 25px rgba(119, 136, 153, 0.15);
}

.article-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-grow: 1;
}

.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-excerpt {
    color: var(--light-text);
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(173, 216, 230, 0.05);
    margin-top: auto;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--light-text);
}

.article-author {
    font-weight: 500;
}

.article-date {
    color: var(--light-text);
}

.meta-separator {
    color: var(--border-color);
}

/* 加载更多按钮 */
.load-more-section {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(173, 216, 230, 0.3);
}

/* 文章详情页样式 */

/* 文章内容 */
.article-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
    color: #333;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 28%);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--dark-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.6rem;
}

.article-content h3 {
    font-size: 1.3rem;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--light-text);
    background: rgba(173, 216, 230, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.article-content code {
    background: rgba(119, 136, 153, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.article-content pre {
    background: rgba(119, 136, 153, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.article-content th {
    background: rgba(173, 216, 230, 0.1);
    font-weight: 600;
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgb(255 255 255 / 90%));
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(24, 24, 24, 0.16);
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.breadcrumb a:hover {
    background: rgba(173, 216, 230, 0.15);
    color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(173, 216, 230, 0.2);
}

.breadcrumb a:active {
    transform: translateY(0);
}

.breadcrumb-separator {
    margin: 0 0.8rem;
    color: #bdc3c7;
    font-weight: 400;
    font-size: 1rem;
    user-select: none;
}

.breadcrumb span:last-child {
    color: var(--primary-color);
    font-weight: 600;
}

/* 移动端响应式样式 */

/* 平板端 - 中等屏幕 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .category-tabs {
        gap: 0.8rem;
    }
    
    .category-tab {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .article-card-title {
        font-size: 0.95rem;
    }
    
    .article-card-excerpt {
        font-size: 0.8rem;
    }
}

/* 移动端 - 小屏幕 (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-tabs {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .category-tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 200px;
        text-align: center;
    }
    
    /* 移动端列表样式优化 */
    .article-card {
        border-radius: 12px;
        margin-bottom: 0.5rem;
    }
    
    .article-card-header {
        padding: 1.2rem;
    }
    
    .article-card-title {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 0.8rem;
    }
    
    .article-card-excerpt {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .article-card-footer {
        padding: 0.8rem 1.2rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
    }
    
    .load-more-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* 超小屏幕 - 手机端 (479px以下) */
@media (max-width: 479px) {
    .container {
        padding: 0 1rem;
    }
    
    .page-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .category-tabs {
        flex-direction: column;
        gap: 0.4rem;
        margin-bottom: 1.5rem;
    }
    
    .category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: 180px;
        text-align: center;
        border-radius: 20px;
    }
    
    /* 手机端列表样式 - 更紧凑的设计 */
    .article-card {
        border-radius: 10px;
        margin-bottom: 0.4rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .article-card-header {
        padding: 1rem;
    }
    
    .article-card-title {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 0.6rem;
        font-weight: 600;
    }
    
    .article-card-excerpt {
        font-size: 0.8rem;
        line-height: 1.5;
        color: #666;
    }
    
    .article-card-footer {
        padding: 0.6rem 1rem;
        background: rgba(173, 216, 230, 0.03);
    }
    
    .article-meta {
        font-size: 0.75rem;
        gap: 0.3rem;
    }
    
    .article-author {
        font-weight: 500;
    }
    
    .load-more-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        border-radius: 20px;
        width: 100%;
        max-width: 200px;
    }
    
    /* 面包屑导航移动端优化 */
    .breadcrumb {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
        margin: 0.5rem 0;
        border-radius: 25px;
    }
    
    .breadcrumb a {
        padding: 0.3rem 0.6rem;
    }
    
    .breadcrumb-separator {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }
}