/* =========================
   BLOG ARCHIVE + DETAILS
   ========================= */

/* Page Title */
.blog-page-title {
    text-align: center;
    padding: 30px 0 20px;
}
.blog-page-title h1 {
    font-size: 36px;
    font-weight: 900;
    color: #111;
    font-family: var(--font-heading);
}
.blog-page-title p {
    color: #888;
    font-size: 16px;
    margin-top: 8px;
}

/* Layout */
.blog-layout {
    display: flex;
    gap: 35px;
    margin-top: 10px;
}
.blog-main {
    flex: 1;
    min-width: 0;
}

/* Search Bar */
.blog-search-bar {
    display: flex;
    margin-bottom: 24px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #eee;
    transition: .3s;
}
.blog-search-bar:focus-within {
    border-color: #ffc8a0;
    box-shadow: 0 0 0 4px rgba(255, 77, 0, .06);
}
.blog-search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 15px;
    outline: none;
    font-family: var(--font-body);
}
.blog-search-bar button {
    padding: 15px 28px;
    background: var(--color-primary);
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
    font-size: 14px;
    letter-spacing: .5px;
}
.blog-search-bar button:hover {
    background: var(--color-primary-dark);
}

/* Category Tabs */
.blog-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.blog-cat-btn {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    transition: .25s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}
.blog-cat-btn:hover {
    border-color: #ffc8a0;
    color: var(--color-primary);
    background: #fffdf9;
}
.blog-cat-btn.active-cat {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(255, 77, 0, .25);
}

/* Article Cards */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.article-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    gap: 24px;
    padding: 20px;
    transition: .3s;
    border: 1px solid #f2f2f2;
}
.article-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
    transform: translateY(-3px);
    border-color: #ffe0ce;
}
.article-img-link {
    flex-shrink: 0;
    text-decoration: none;
    display: block;
}
.article-img {
    width: 260px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s ease;
}
.article-card:hover .article-img {
    transform: scale(1.04);
}
.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #888;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.article-category-tag {
    background: #fff3ec;
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    display: inline-block;
    width: fit-content;
    text-decoration: none;
}
.article-content h3 {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #111;
}
.article-content h3 a {
    color: #111;
    text-decoration: none;
}
.article-content h3 a:hover {
    color: var(--color-primary);
}
.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-read-more {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}
.article-read-more:hover {
    color: var(--color-primary-dark);
    gap: 8px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
}
.no-results .icon { font-size: 50px; margin-bottom: 12px; }
.no-results h3 { font-size: 18px; font-weight: 800; }
.no-results p { color: #888; font-size: 14px; margin-top: 6px; }

/* Pagination */
.blog-pagination { margin-top: 35px; }
.blog-pagination ul {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; list-style: none; padding: 0; flex-wrap: wrap;
}
.blog-pagination ul li { margin: 0; }
.blog-pagination ul li .page-numbers {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: 2px solid #e8e8e8; background: white;
    font-weight: 700; font-size: 14px; color: #555;
    transition: .25s; text-decoration: none;
}
.blog-pagination ul li .page-numbers:hover {
    border-color: #ffc8a0; color: var(--color-primary); background: #fffdf9;
}
.blog-pagination ul li .page-numbers.current {
    background: var(--color-primary); color: white;
    border-color: var(--color-primary);
    box-shadow: 0 3px 12px rgba(255, 77, 0, .2);
}
.blog-pagination ul li .page-numbers.dots {
    border: none; width: auto; color: #bbb; font-size: 18px;
}

/* Sidebar (shared) */
.blog-sidebar,
.article-sidebar {
    flex: 0 0 310px;
    display: flex; flex-direction: column; gap: 24px;
    align-self: flex-start; position: sticky; top: 120px;
}
.sidebar-card {
    background: white; border-radius: 16px;
    padding: 20px; border: 1px solid #f2f2f2;
}
.sidebar-card h3 {
    font-size: 16px; font-weight: 800; margin-bottom: 14px;
    color: #222; display: flex; align-items: center; gap: 6px;
}
.popular-post, .related-post {
    display: flex; gap: 14px; padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer; transition: .2s; text-decoration: none; color: inherit;
}
.popular-post:hover, .related-post:hover {
    background: #fffdf9; margin: 0 -8px;
    padding-left: 8px; padding-right: 8px; border-radius: 10px;
}
.popular-post:last-child, .related-post:last-child { border-bottom: none; }
.popular-post-img, .related-post-img {
    width: 70px; height: 70px; border-radius: 10px;
    flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.popular-post-img img, .related-post-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.popular-post-content, .related-post-content {
    display: flex; flex-direction: column; justify-content: center;
}
.popular-post-content h4, .related-post-content h4 {
    font-size: 13px; font-weight: 700; line-height: 1.3; color: #333;
}
.popular-post-content .post-date, .related-post-content .post-date {
    font-size: 11px; color: #aaa; margin-top: 4px;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    background: #f5f5f5; padding: 7px 13px; border-radius: 20px;
    font-size: 11px; font-weight: 600; color: #666;
    cursor: pointer; transition: .2s; text-decoration: none;
}
.tag-cloud a:hover { background: #fff3ec; color: var(--color-primary); }

/* =========================
   SINGLE POST
   ========================= */
.article-layout {
    display: flex; gap: 35px; margin-top: 24px;
}
.article-main {
    flex: 1; min-width: 0;
    background: white; border-radius: 20px;
    padding: 30px 36px;
}

/* Header */
.article-header { margin-bottom: 24px; }
.article-header .article-category-tag {
    display: inline-block;
    background: #fff3ec; color: var(--color-primary);
    padding: 6px 16px; border-radius: 20px;
    font-weight: 700; font-size: 12px;
    text-decoration: none; margin-bottom: 8px;
}
.article-header h1 {
    font-size: 32px; font-weight: 900; line-height: 1.25;
    color: #111; margin-bottom: 14px;
}
.article-meta-row {
    display: flex; align-items: center; gap: 18px;
    flex-wrap: wrap; font-size: 13px; color: #888;
}
.article-meta-row .meta-item {
    display: flex; align-items: center; gap: 5px;
}
.article-meta-row .author-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
}

/* Featured Image */
.article-featured-img {
    width: 100%; border-radius: 16px; margin-bottom: 24px;
    overflow: hidden; transition: transform .4s ease;
}
.article-featured-img:hover { transform: scale(1.02); }
.article-featured-img img {
    width: 100%; height: auto; display: block;
}

/* Article Body */
.article-body {
    font-size: 16px; color: #444; line-height: 1.85;
}
.article-body h2 {
    font-size: 22px; font-weight: 800; color: #111;
    margin: 28px 0 14px;
}
.article-body h3 {
    font-size: 18px; font-weight: 700; color: #333;
    margin: 22px 0 10px;
}
.article-body p { margin-bottom: 14px; }
.article-body ul, .article-body ol { margin: 12px 0 18px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--color-primary); text-decoration: underline; }
.article-body blockquote {
    border-left: 4px solid var(--color-primary);
    background: #fff9f5; padding: 16px 22px;
    margin: 20px 0; border-radius: 0 12px 12px 0;
    font-style: italic; color: #555;
}
.article-body .highlight-box {
    background: #fff3ec; border: 2px solid #ffc8a0;
    padding: 18px 22px; border-radius: 14px; margin: 18px 0;
}
.article-body .highlight-box strong { color: var(--color-primary); }
.article-body img {
    max-width: 100%; border-radius: 12px; margin: 16px 0;
}

/* Share Bar */
.share-bar {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-top: 24px; padding-top: 20px;
    border-top: 1px solid #eee;
}
.share-label { font-size: 13px; font-weight: 600; color: #555; margin-right: 4px; }
.share-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid #e8e8e8; background: white;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 13px;
    transition: .25s; color: #666; text-decoration: none;
}
.share-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Author Card */
.author-card {
    display: flex; gap: 18px;
    background: #fafafa; border-radius: 16px;
    padding: 22px; margin-top: 20px;
}
.author-avatar-lg {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 900; font-size: 28px; flex-shrink: 0;
}
.author-info { flex: 1; min-width: 150px; }
.author-name { font-size: 17px; font-weight: 800; color: #222; margin-bottom: 2px; }
.author-role { font-size: 12px; color: #888; margin-bottom: 6px; }
.author-bio { font-size: 13px; color: #666; line-height: 1.5; }

/* Tags */
.article-tags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.article-tag {
    background: #f5f5f5; padding: 5px 12px; border-radius: 14px;
    font-size: 12px; color: #666;
}

/* Comments */
.comments-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid #eee; }

/* Related Bottom */
.related-bottom {
    margin-top: 28px; background: white; border-radius: 20px;
    padding: 30px 36px;
}
.related-bottom h3 {
    font-size: 20px; font-weight: 900; margin-bottom: 18px; color: #111;
}
.related-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.related-card {
    background: #fafafa; border-radius: 14px; overflow: hidden;
    cursor: pointer; transition: .3s; text-decoration: none; color: inherit; display: block;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}
.related-card-img {
    width: 100%; height: 130px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    transition: transform .3s;
}
.related-card:hover .related-card-img { transform: scale(1.06); }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-content { padding: 14px; }
.related-card-content h4 {
    font-size: 14px; font-weight: 700; line-height: 1.3; color: #222;
}
.related-card-content .card-date {
    font-size: 11px; color: #aaa; margin-top: 4px;
}

/* TOC List (sidebar) */
.toc-list {
    list-style: none; padding: 0; margin: 0;
}
.toc-list li {
    padding: 8px 0; border-bottom: 1px solid #f5f5f5;
    font-size: 13px; color: #555; cursor: pointer; transition: .2s;
}
.toc-list li:hover { color: var(--color-primary); padding-left: 4px; }

/* Responsive */
@media (max-width: 900px) {
    .blog-layout, .article-layout {
        flex-direction: column;
    }
    .blog-sidebar, .article-sidebar {
        flex: 0 0 auto; position: static; order: -1;
    }
    .article-card {
        flex-direction: column; gap: 15px; padding: 15px;
    }
    .article-img, .article-img-link { width: 100%; }
    .article-img { height: 160px; }
    .article-content h3 { font-size: 17px; }
    .blog-page-title h1 { font-size: 28px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-featured-img { height: auto; }
    .article-header h1 { font-size: 26px; }
    .article-main { padding: 20px; }
    .related-bottom { padding: 20px; }
}
@media (max-width: 600px) {
    .article-img { height: 130px; }
    .blog-cat-btn { padding: 7px 14px; font-size: 11px; }
    .blog-pagination ul li .page-numbers {
        width: 34px; height: 34px; font-size: 12px;
    }
    .article-featured-img { height: auto; }
    .article-header h1 { font-size: 21px; }
    .article-body { font-size: 14px; }
    .article-body h2 { font-size: 18px; }
    .related-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .related-card-img { height: 100px; }
    .author-card { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}