/* ============================================================
   Blog listing + blog detail styles (scoped — no global overrides)
   ============================================================ */

/* ---------- Blog listing grid ---------- */
.blog-listing {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 40px 15px 60px;
}

.blog-card {
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 0.4rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: #ea7600;
    transition: width 0.4s ease;
}

.blog-card:hover:after {
    width: 100%;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.blog-card a.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-img {
    height: 240px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.blog-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-content .category {
    display: inline-block;
    font-size: 13px;
    color: #ea7600;
    background: #fff5eb;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-weight: 500;
    width: fit-content;
}

.blog-content h3 {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
    color: #343f52;
    margin: 0 0 12px;
}

.blog-content p {
    font-size: 15px;
    line-height: 1.65;
    color: #60697f;
    margin-bottom: 24px;
    flex: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f1f1f1;
}

.blog-footer .blog-date {
    color: #959ca9;
}

.blog-footer .read-more {
    color: #ea7600;
    text-decoration: none;
    font-weight: 500;
    transition: letter-spacing 0.3s;
}

.blog-footer .read-more span {
    margin-left: 6px;
    color: #ea7600;
}

.blog-card:hover .read-more {
    letter-spacing: 0.3px;
}

@media (max-width: 992px) {
    .blog-listing {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-listing {
        grid-template-columns: 1fr;
        padding: 30px 15px 50px;
    }

    .blog-content h3 {
        font-size: 20px;
    }

    .blog-img {
        height: 200px;
    }
}

/* ---------- Blog detail layout ---------- */
.blog-details-section {
    padding: 50px 0 70px;
}

.blog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 45px;
    align-items: start;
}

/* Sidebar */
.blog-sidebar .sidebar-box {
    border: 1px solid #eee;
    border-radius: 0.4rem;
    padding: 25px;
    margin-bottom: 28px;
    background: #fff;
    box-shadow: 0 0 0.75rem rgba(30, 34, 40, 0.04);
}

.blog-sidebar .sidebar-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: #343f52;
    margin: 0 0 18px;
}

.blog-sidebar .sidebar-box h3:after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    background: #ea7600;
    margin-top: 10px;
}

.blog-sidebar .search-box {
    display: flex;
    gap: 0;
}

.blog-sidebar .search-box input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 0.4rem 0 0 0.4rem;
    font-size: 14px;
    outline: none;
}

.blog-sidebar .search-box input:focus {
    border-color: #ea7600;
}

.blog-sidebar .search-box button {
    background: #ea7600;
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 0 0.4rem 0.4rem 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.blog-sidebar .search-box button:hover {
    background: #d06800;
}

.blog-sidebar .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar .category-list li {
    padding: 11px 0;
    border-bottom: 1px solid #eee;
}

.blog-sidebar .category-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-sidebar .category-list a {
    color: #60697f;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.blog-sidebar .category-list a:hover {
    color: #ea7600;
}

.blog-sidebar .recent-post {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.blog-sidebar .recent-post:last-child {
    margin-bottom: 0;
}

.blog-sidebar .recent-post img {
    width: 72px;
    height: 64px;
    object-fit: cover;
    border-radius: 0.3rem;
    flex-shrink: 0;
}

.blog-sidebar .recent-post a {
    font-size: 14px;
    color: #343f52;
    text-decoration: none;
    line-height: 1.45;
    font-weight: 500;
}

.blog-sidebar .recent-post a:hover {
    color: #ea7600;
}

/* Main article content */
.blog-main {
    background: #fff;
    min-width: 0;
}

.blog-main .featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 0.4rem;
    margin-bottom: 28px;
}

.blog-main .blog-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    margin-bottom: 18px;
    font-size: 14px;
    color: #959ca9;
}

.blog-main .blog-meta-bar .category {
    display: inline-block;
    font-size: 13px;
    color: #ea7600;
    background: #fff5eb;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.blog-main h2.post-title {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
    color: #343f52;
    margin: 0 0 22px;
}

.blog-main h3 {
    font-size: 24px;
    font-weight: 700;
    color: #343f52;
    margin: 36px 0 14px;
}

.blog-main p {
    font-size: 16px;
    line-height: 1.8;
    color: #60697f;
    margin-bottom: 16px;
    text-align: justify;
}

.blog-main ul,
.blog-main ol {
    margin: 0 0 20px;
    padding-left: 1.4rem;
    color: #60697f;
}

.blog-main li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.7;
}

.blog-main .content-image {
    width: 100%;
    border-radius: 0.4rem;
    margin: 28px 0;
}

.blog-main .share-box {
    border-top: 1px solid #e7e9ec;
    padding-top: 22px;
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #60697f;
}

.blog-main .share-box a {
    color: #ea7600;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 500;
}

.blog-main .share-box a:hover {
    text-decoration: underline;
}

.blog-main .back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    color: #0032a0;
    font-weight: 500;
    text-decoration: none;
}

.blog-main .back-to-blog:hover {
    color: #ea7600;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .blog-sidebar {
        order: 2;
    }

    .blog-main {
        order: 1;
    }

    .blog-main .featured-image {
        height: 280px;
    }

    .blog-main h2.post-title {
        font-size: 26px;
    }

    .blog-main h3 {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .blog-details-section {
        padding: 36px 0 50px;
    }

    .blog-main .featured-image {
        height: 220px;
    }

    .blog-main h2.post-title {
        font-size: 22px;
    }
}
