/**
 * Luftride 博客页面样式
 */

/* ========== 博客 Banner ========== */

.blog-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('../img/LuftrideBlog.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    margin-top: 70px;
}

.blog-banner h1 {
    font-family: 'ArchivoBlack', Arial, sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-banner p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ========== 博客列表页 ========== */

.blog-page {
    padding: 80px 0;
    background: #ffffff;
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* 主内容区 */
.blog-main {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.blog-header {
    margin-bottom: 40px;
}

.blog-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 700;
}

.blog-header p {
    color: #999;
    font-size: 1rem;
}

/* 博客网格 - 2 列布局 */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* 博客卡片 - LogRocket 风格 */
.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.blog-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
    display: block;
    width: 100%;
    height: 300px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    align-items: center;
}

.blog-category {
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0;
    font-size: 0.85rem;
}

.blog-date {
    color: #999;
    font-size: 0.85rem;
}

.blog-read-time {
    color: #999;
    font-size: 0.85rem;
}

.blog-card-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.5;
    flex-grow: 1;
    font-weight: 600;
}

.blog-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #666;
}

.blog-card-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.blog-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-author-name {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.blog-read-more {
    color: #4d4d4d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.blog-read-more:hover {
    color: #3063b1;
}

/* 侧边栏 */
.blog-sidebar {
    background: transparent;
    padding: 0;
    border-radius: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
    overflow: hidden;
    width: 280px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #333;
    border-bottom: none;
    padding-bottom: 0;
    font-weight: 600;
}

/* 搜索框 */
.blog-search {
    margin-bottom: 25px;
}

.blog-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: #f9f9f9;
    color: #666;
}

.blog-search input::placeholder {
    color: #999;
}

.blog-search input:focus {
    outline: none;
    border-color: #999;
    background: #ffffff;
}

/* 分类列表 */
#blog-categories {
    list-style: none;
    padding: 0;
}

#blog-categories li {
    margin-bottom: 10px;
}

#blog-categories a {
    display: block;
    padding: 6px 0;
    color: #666;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

#blog-categories a:hover,
#blog-categories a.active {
    background: transparent;
    color: #333;
    border-left-color: #2c6fab;
    font-weight: 500;
}

/* 推荐文章 */
.featured-post-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.featured-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.featured-post-item a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.featured-post-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-post-item h4 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.featured-post-item a:hover h4 {
    color: #e74c3c;
}

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

.page-link {
    padding: 8px 15px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.page-link.active {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    pointer-events: none;
}

.page-ellipsis {
    padding: 8px 15px;
    color: #999;
}

/* 加载和错误状态 */
.loading,
.error,
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.error {
    color: #e74c3c;
}

/* ========== 博客详情页 ========== */

.blog-detail-page {
    padding: 60px 0;
    background: #f5f5f5;
}

.blog-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 面包屑 */
.blog-breadcrumb {
    margin-bottom: 30px;
    color: #666;
    font-size: 0.9rem;
}

.blog-breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

/* 文章内容 */
.blog-detail-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
}

.blog-detail-header {
    margin-bottom: 30px;
}

#blog-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.3;
}

#blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 0.95rem;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

#blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-author {
    font-weight: 600;
    color: #e74c3c;
}

/* 封面图 */
#blog-cover {
    margin-bottom: 30px;
}

#blog-cover img {
    width: 100%;
    height: auto;
    border-radius: 0px;
}

/* 文章内容 */
#blog-content {
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

#blog-content h2 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

#blog-content h3 {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #333;
}

#blog-content p {
    margin-bottom: 15px;
}

#blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

#blog-content ul,
#blog-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

#blog-content li {
    margin-bottom: 8px;
}

#blog-content blockquote {
    border-left: 4px solid #e74c3c;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

#blog-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#blog-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 20px 0;
}

#blog-content pre code {
    background: none;
    padding: 0;
}

/* 标签 */
#blog-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 作者信息 */
.author-card {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h3 {
    margin-bottom: 10px;
    color: #333;
}

.author-details p {
    color: #666;
    line-height: 1.6;
}

/* 相关文章 */
#related-posts {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

#related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-post-item a {
    display: block;
    text-decoration: none;
    color: #333;
}

.related-post-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-post-item h4 {
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-post-item a:hover h4 {
    color: #e74c3c;
}

/* 未找到页面 */
.not-found {
    text-align: center;
    padding: 60px 20px;
}

.not-found h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.not-found p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.not-found .btn {
    display: inline-block;
    padding: 12px 30px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.not-found .btn:hover {
    background: #c0392b;
}

/* ========== 响应式设计 ========== */

@media (max-width: 1200px) {
    .blog-banner h1 {
        font-size: 2.5rem;
    }

    .blog-banner p {
        font-size: 1.1rem;
    }

    .blog-container {
        grid-template-columns: 250px 1fr;
        gap: 60px;
        padding: 0 40px;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 30px;
    }

    .blog-sidebar {
        position: static;
        order: -1;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-banner {
        padding: 80px 0 40px;
    }

    .blog-banner h1 {
        font-size: 2rem;
    }

    .blog-banner p {
        font-size: 1rem;
    }

    .blog-container {
        padding: 0 20px;
        gap: 30px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    #blog-title {
        font-size: 2rem;
    }

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

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

    .blog-detail-content {
        padding: 20px;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
    }

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

    #blog-meta {
        flex-direction: column;
        gap: 10px;
    }

    .featured-posts-section h2,
    .all-posts-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-banner {
        padding: 60px 0 30px;
        margin-top: 60px;
    }

    .blog-banner h1 {
        font-size: 1.5rem;
    }

    .blog-banner p {
        font-size: 0.95rem;
    }

    .blog-page,
    .blog-detail-page {
        padding: 30px 0;
    }

    .blog-container {
        padding: 0 15px;
        gap: 20px;
    }

    .blog-main,
    .blog-sidebar {
        padding: 20px;
    }

    .blog-header h1 {
        font-size: 1.5rem;
    }

    #blog-title {
        font-size: 1.5rem;
    }

    .blog-card-title {
        font-size: 1.1rem;
    }

    .featured-posts-section h2,
    .all-posts-section h2 {
        font-size: 1.3rem;
    }

    .featured-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}