/* ===========================================
BLOG PAGE
============================================== */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.blog-header h4 {
    font-size: clamp(1.75rem, 2rem, 2rem);
    font-weight: 400;
    color: var(--jdg-white);
    line-height: 1.25;
}

.view-toggle .btn {
    background: #1a1a1a;
    border: 1px solid #222;
    color: #aaa;
    margin-left: 6px;
}

.view-toggle .btn.active {
    background: var(--jdg-btn-gradient);
    color: var(--jdg-white);
}

/* BLOG CARD */
.blog-card {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    gap: 10px;
    display: grid;
}

.blog-card img {
    width: 100%;
    height: 433px;
    object-fit: cover;
    border-radius: 20px;
}

.blog-content {
    padding: 18px;
    background: #0000004f;
    color: var(--jdg-white);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.blog-meta {
    color: var(--jdg-white);
    margin-bottom: 6px;
    display: block;
    font-family: var(--jdg-heading-font-family);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 100%;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.blog-content h5 {
    font-family: var(--jdg-heading-font-family);
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 30px;
}

/* LIST VIEW */
.list-view-active .blog-card img {
    height: 591px;
}

.list-view-active .blog-content h5 {
    font-size: 18px;
}

/* SIDEBAR */
.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-box {
    background: #0000004f;
    color: var(--jdg-white);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.sidebar-box h6 {
    font-size: 14px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
}

.sidebar-box input {
    background: #0b0b0b;
    border: 1px solid #222;
    color: #fff;
}

/* RECENT POST */
.recent-post {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.recent-post img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
}

.recent-post span {
    font-family: var(--jdg-extra-font-family);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 100%;
    text-transform: uppercase;
    color: var(--jdg-gray);
}

.recent-post p {
    font-family: var(--jdg-heading-font-family);
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 20px;
    color: var(--jdg-white);
}

/* TAGS */
.tags li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
}

/* PAGINATION */
.pagination .page-link {
    background: #111;
    border: 1px solid #222;
    color: #aaa;
}

.pagination .active .page-link {
    background: #fff;
    color: #000;
}

.hide-sidebar {
    display: none !important;
}

/* =====================================================
   LIST VIEW STYLES
   ===================================================== */
#blogContainer.list-view .blog-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

#blogContainer.list-view .blog-card:hover {
    transform: translateX(5px);
}

#blogContainer.list-view .blog-card img {
    width: 300px;
    min-width: 300px;
    height: 223px;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
}

#blogContainer.list-view .blog-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px 30px;
    flex: 1;
}

/* LIST VIEW - Title: 2 Lines Max with ... */
#blogContainer.list-view .blog-content h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 2);
    margin: 0;
    font-size: 1.3rem;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 72%;
}

#blogContainer.list-view .blog-content h5 a {
    color: #fff;
    text-decoration: none;
}

/* LIST VIEW - Excerpt: 3 Lines Max with ... */
#blogContainer.list-view .blog-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    max-height: calc(1.6em * 3);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-top: 12px;
    margin-bottom: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 99%;
}

/* =====================================================
   RESPONSIVE - SIDE BY SIDE ON ALL SCREENS
   ===================================================== */
@media (max-width: 992px) {
    #blogContainer.list-view .blog-card img {
        width: 220px;
        min-width: 220px;
        height: 160px;
    }

    #blogContainer.list-view .blog-content {
        padding: 15px 20px;
    }

    #blogContainer.list-view .blog-content h5 {
        font-size: 1.1rem;
    }

    #blogContainer.list-view .blog-excerpt {
        -webkit-line-clamp: 2;
        max-height: calc(1.6em * 2);
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* ✅ KEEP SIDE BY SIDE - Don't change to column */
    #blogContainer.list-view .blog-card {
        flex-direction: row; /* Keep horizontal */
    }

    #blogContainer.list-view .blog-card img {
        width: 140px;
        min-width: 140px;
        height: 137px;
        border-radius: 12px 0 0 12px;
    }

    #blogContainer.list-view .blog-content {
        padding: 12px 15px;
    }

    #blogContainer.list-view .blog-content h5 {
        font-size: 1rem;
        -webkit-line-clamp: 2;
        max-height: calc(1.4em * 2);
    }

    #blogContainer.list-view .blog-meta {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }

    #blogContainer.list-view .blog-excerpt {
        -webkit-line-clamp: 2;
        max-height: calc(1.5em * 2);
        font-size: 0.85rem;
        margin-top: 8px;
        line-height: 1.5;
    }
}

@media (max-width: 576px) {
    #blogContainer.list-view .blog-card img {
        width: 110px;
        min-width: 110px;
        height: 100px;
    }

    #blogContainer.list-view .blog-content {
        padding: 10px 12px;
    }

    #blogContainer.list-view .blog-content h5 {
        font-size: 0.9rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        max-height: calc(1.3em * 2);
    }

    #blogContainer.list-view .blog-meta {
        font-size: 0.7rem;
    }

    /* Hide excerpt on very small screens to save space */
    #blogContainer.list-view .blog-excerpt {
        display: none;
    }
}

@media (max-width: 400px) {
    #blogContainer.list-view .blog-card img {
        width: 90px;
        min-width: 90px;
        height: 80px;
    }

    #blogContainer.list-view .blog-content h5 {
        font-size: 0.85rem;
    }
}