/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Inter", system-ui, sans-serif;
    background: #f7f8fa;
    color: #1a1a1a;
    line-height: 1.6;
}

/* CONTAINER */
.blog {
    padding: 4rem 1rem;
}
.blog a{
    text-decoration: none;
}
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* SEARCH BAR */
.blog-search {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}
.search-box {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    font-size: 16px;
    outline: none;
}
.search-box button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}
.search-box button:hover {
    background: #1e40af;
}

/* GRID */
.blog-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}



/* card */
/* ARTICLE CARD - minimal horizontal layout */
/* ARTICLE CARD - clean, structured horizontal layout */
.post-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.post-card a {
    text-decoration: none;
}

/* Thumbnail */
.post-thumb {
    width: 250px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    border-radius: 12px;
}
.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

/* Content area */
.post-body {
    flex: 1;
    display: flex
;
    flex-direction: column;
    justify-content: space-between;
    height: 148px;
}

/* Top: Category tag */
.post-header {
    margin-bottom: 0.4rem;
}
.post-category {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 500;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Title */
.post-title a {
    display: inline-block;
    color: #111827;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0.5rem 0;
    transition: color 0.2s;
}
.post-title a:hover {
    color: #2563eb;
}

/* Bottom: author + date */
.post-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 14px;
    color: #6b7280;
}
.post-author {
    color: #2563eb;
    font-weight: 500;
}
.post-date {
    color: #9ca3af;
    font-size: 13px;
}
.dot {
    color: #d1d5db;
    font-weight: bold;
}

/* RESPONSIVENESS */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    .post-thumb {
        width: 100%;
        height: 200px;
    }
    .post-body {
        padding: 0.8rem 0 0;
    }
    .post-footer {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* card */

/* SIDEBAR */
.sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.sidebar-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 1rem;
}
.sidebar-list {
    list-style: none;
}
.sidebar-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
}
.sidebar-list li a {
    color: #111;
    transition: color 0.2s;
}
.sidebar-list li a:hover {
    color: #2563eb;
}
.sidebar-list li span {
    font-size: 13px;
    color: #666;
}
.sidebar-tags a {
    display: inline-block;
    margin: 5px;
    padding: 5px 10px;
    background: #f3f4f6;
    color: #2563eb;
    border-radius: 4px;
    font-size: 13px;
}
.sidebar-tags a:hover {
    background: #e0e7ff;
}
.sidebar-popular li {
    margin-bottom: 0.8rem;
}
.sidebar-popular a {
    color: #111;
    font-weight: 500;
}
.sidebar-popular small {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

/* NO ARTICLES */
.no-articles {
    background: #fffbe6;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    color: #8a6d3b;
}

/* PAGINATION */
.pagination-container {
    margin-top: 2rem;
    text-align: center;
}

/* RESPONSIVENESS */
@media (max-width: 600px) {
    .post-image {
        height: 200px;
    }
    .post-content {
        padding: 1rem;
    }
    .sidebar {
        position: static;
    }
}



/* details */
/* BLOG DETAIL LAYOUT */





/* === BLOG DETAIL PAGE (Enhanced Hierarchy & Aesthetic) === */

/* MAIN LAYOUT */






/* === HEADER === */
.article-header {
    margin-bottom: 2rem;
}

.article-category {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.article-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 1.2rem 0 0.8rem;
}

.article-meta {
    font-size: 15px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-author {
    color: #2563eb;
    font-weight: 500;
}

.dot {
    color: #d1d5db;
}

/* === FEATURE IMAGE === */
.article-image {
    width: 100%;
    height: 411px;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 0 20px 0;
    position: relative;
    background: #f9fafb;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.article-image:hover img {
    transform: scale(1.03);
}

/* === CONTENT BODY === */
.article-content {
    /* color: #1f2937;
    line-height: 1.85;
    font-size: 17px;
    letter-spacing: 0.1px; */
    /* border: 1px solid rgb(232, 232, 232); */
    border-top: 1px solid whitesmoke;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2, .article-content h3 {
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content h2 {
    font-size: 1.6rem;
}

.article-content h3 {
    font-size: 1.3rem;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-left: 4px solid #2563eb;
    color: #374151;
    font-style: italic;
    border-radius: 6px;
}

/* === TAGS === */
.article-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.article-tags a {
    display: inline-block;
    background: #f3f4f6;
    color: #2563eb;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 6px;
    margin-right: 8px;
    margin-bottom: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.article-tags a:hover {
    background: #e0e7ff;
}

/* === COMMENTS SECTION === */
.comments-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comments-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.comment {
    background: #f9fafb;
    padding: 1rem 1.3rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 26%);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.comment-header strong {
    font-size: 15px;
    color: #111827;
}

.comment-time {
    font-size: 13px;
    color: #9ca3af;
}

.comment-text {
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

/* === COMMENT FORM === */
.comment-form {
    margin-top: 2.5rem;
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.comment-form h4 {
    margin-bottom: 1rem;
    color: #111827;
    font-size: 1.2rem;
    font-weight: 600;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    outline: none;
}

.comment-form button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.comment-form button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* === SIDEBAR === */
.blog-sidebar {
    position: relative;
    top: 20px;
}

.blog-sidebar .card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.blog-sidebar .card-header {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 1rem;
    font-size: 15px;
}

.blog-sidebar .list-group-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #1f2937;
}

.blog-sidebar .list-group-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-sidebar .list-group-item a:hover {
    color: #2563eb;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .blog-container {
        flex-direction: column;
    }
    .blog-main {
        padding: 1.5rem;
    }
    .article-image {
        height: 320px;
    }
}


.toast-message {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #111827;
    color: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s ease forwards;
    z-index: 9999;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-message.hide {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}


/* PAGINATION */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.pagination-info {
    color: #555;
    font-size: 14px;
}

.pagination-info span {
    font-weight: 600;
    color: #111;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.page-btn,
.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-btn:hover,
.page-number:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.page-number.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
    cursor: default;
}

.page-btn.disabled {
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }
}
