/* ======================================================
CHM BLOG GRID SYSTEM
Scoped to .chm-blog-grid
====================================================== */

/* Featured and Regular Post Layout */
@media (min-width: 1024px) {
    .chm-blog-grid .featured-posts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .chm-blog-grid .featured-posts .column.featured-post {
        grid-column: 1 / 2;
        grid-row: span 2;
        display: flex;
        flex-direction: column;
    }

    .chm-blog-grid .featured-posts .column.featured-post .post-thumbnail img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 10px;
    }

    .chm-blog-grid .featured-posts .column.featured-post .post-title {
        font-size: 1.5rem;
        font-weight: bold;
        color: #33414A;
        margin-top: 10px;
    }

    .chm-blog-grid .featured-posts .column.featured-post .post-category {
        font-size: 14px;
        color: #b57356;
        padding-bottom: 5px;
    }

    .chm-blog-grid .featured-posts .author-info {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-top: auto;
        padding-top: 10px !important;
    }

    .chm-blog-grid .featured-posts .author-avatar img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        margin-right: 10px;
    }

    .chm-blog-grid .featured-posts .author-details {
        display: flex;
        flex-direction: column;
    }

    .chm-blog-grid .featured-posts .author-name {
        font-size: 14px;
        font-weight: bold;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .chm-blog-grid .featured-posts .post-date {
        font-size: 12px;
        color: #888;
    }

    .chm-blog-grid .featured-posts .column.regular-post {
        grid-column: 2 / 3;
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-bottom: 20px;
        align-items: flex-start;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-thumbnail img {
        width: 100%;
        max-width: 250px;
        height: auto;
        object-fit: cover;
        border-radius: 10px;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-info {
        order: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex-grow: 1;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-thumbnail {
        order: 2;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        flex-shrink: 0;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-title {
        font-size: 1.25rem;
        font-weight: bold;
        color: #33414A;
        margin-bottom: 2px;
        padding-bottom: 2px;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-category {
        font-size: 14px;
        line-height: 1.24em;
        color: #b57356;
        margin-bottom: 2px;
        padding-bottom: 2px;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-excerpt {
        font-size: 14px;
        color: #555;
        margin-bottom: 10px;
    }

    .chm-blog-grid .featured-posts .column.regular-post .author-info {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-top: auto;
        padding-top: 10px !important;
    }

    .chm-blog-grid .featured-posts .column.regular-post .author-avatar img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
    }

    .chm-blog-grid .featured-posts .column.regular-post .author-name {
        font-size: 14px;
        font-weight: bold;
    }

    .chm-blog-grid .featured-posts .column.regular-post .post-date {
        font-size: 12px;
        color: #888;
    }
}

@media (min-width: 1024px) {
    .chm-blog-grid .regular-posts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .chm-blog-grid .regular-posts .column {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .chm-blog-grid .regular-posts .column .post-thumbnail img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        border-radius: 10px;
    }

    .chm-blog-grid .regular-posts .author-info {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding-top: 10px !important;
    }

    .chm-blog-grid .regular-posts .author-info .author-details .author-name {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .chm-blog-grid .regular-posts .column .post-category {
        padding-bottom: 0;
        line-height: 1.5em;
    }

    .chm-blog-grid .regular-posts .author-avatar img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
    }

    .chm-blog-grid .regular-posts .column .author-details .post-date {
        color: #888 !important;
    }

    .chm-blog-grid .regular-posts .post-title {
        font-size: 1.25rem;
        color: #33414A;
        margin-top: 5px;
        padding-bottom: 5px;
    }

    .chm-blog-grid .regular-posts .post-excerpt {
        font-size: 14px;
        margin-top: 5px;
    }
}

@media (max-width: 1024px) {
    .chm-blog-grid .featured-posts {
        display: block;
    }

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

    .chm-blog-grid .featured-posts .column.regular-post .post-thumbnail img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 1023px) {
    .chm-blog-grid .featured-posts .column {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
        padding-bottom: 40px;
    }

    .chm-blog-grid .regular-posts .column {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .chm-blog-grid .featured-posts .column .post-thumbnail img,
    .chm-blog-grid .regular-posts .column .post-thumbnail img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 10px;
    }

    .chm-blog-grid .featured-posts .column .post-info,
    .chm-blog-grid .regular-posts .column .post-info {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-top: 10px;
    }

    .chm-blog-grid .featured-posts .column .author-name,
    .chm-blog-grid .regular-posts .column .author-name {
        font-size: 14px;
        font-weight: bold;
        padding-bottom: 0;
    }

    .chm-blog-grid .featured-posts .column .post-title,
    .chm-blog-grid .regular-posts .column .post-title {
        font-size: 1.25rem;
        font-weight: bold;
        color: #33414A;
        margin-bottom: 5px;
    }

    .chm-blog-grid .featured-posts .column .post-category,
    .chm-blog-grid .regular-posts .column .post-category {
        font-size: 14px;
        color: #b57356;
        margin-bottom: 5px;
    }

    .chm-blog-grid .featured-posts .column .post-excerpt,
    .chm-blog-grid .regular-posts .column .post-excerpt {
        font-size: 14px;
        color: #555;
        margin-bottom: 10px;
    }

    .chm-blog-grid .featured-posts .column .author-info,
    .chm-blog-grid .regular-posts .column .author-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-top: 10px;
    }

    .chm-blog-grid .featured-posts .column .author-avatar img,
    .chm-blog-grid .regular-posts .column .author-avatar img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
    }

    .chm-blog-grid .featured-posts .column .author-name,
    .chm-blog-grid .regular-posts .column .author-name {
        font-size: 14px;
        font-weight: bold;
    }

    .chm-blog-grid .featured-posts .column .post-date,
    .chm-blog-grid .regular-posts .column .post-date {
        font-size: 12px;
        color: #888;
    }
}

@media (min-width: 1024px) {
    .chm-blog-grid .desktop-category-list {
        list-style-type: none;
        padding: 0;
        margin: 0 0 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .chm-blog-grid .desktop-category-list li {
        display: inline;
    }

	.chm-blog-grid .category-link {
  	 	text-decoration: none;
   		padding: 10px 20px;
    	background-color: #7BAD4E;
    	color: #ffffff;
    	border-radius: 5px;
    	font-size: 16px;
    	font-weight: bold;
    	display: inline-block;
    	transition: background-color 0.3s ease;
	}

    .chm-blog-grid .category-link:hover {
    	background-color: #000000;
    	color: #ffffff;
	}

	.chm-blog-grid .category-link.active {
    	background-color: #000000;
    	color: #ffffff;
	}
    .chm-blog-grid .category-dropdown {
        display: none;
    }
}

@media (max-width: 1024px) {
    .chm-blog-grid .desktop-category-list {
        display: none;
    }

    .chm-blog-grid .category-dropdown {
        display: block;
        padding: 10px;
        width: 100%;
        background-color: #b57356;
        color: white;
        border-radius: 5px;
        font-size: 16px;
        margin-bottom: 20px;
        border: none;
    }

    .chm-blog-grid .category-dropdown option {
        font-size: 16px;
        color: #33414A;
        background-color: #fff;
    }

    .chm-blog-grid .category-dropdown:focus {
        outline: none;
        background-color: #e2e2e2;
    }
}

.chm-blog-grid #load-more {
    background-color: #7BAD4E;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    margin: 20px auto;
    display: block;
    text-align: center;
}

.chm-blog-grid #load-more:hover {
    background-color: #000000;
    color: #ffffff;
}

.chm-blog-grid #load-more:disabled {
    background-color: #000000;
    cursor: not-allowed;
}

.chm-blog-grid .custom-post-grid .post-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chm-blog-grid .custom-post-grid .post-title {
    font-size: 1.25rem;
    color: #33414A;
    margin-top: 10px;
}

.chm-blog-grid .custom-post-grid .post-excerpt {
    font-size: 14px;
    color: #555;
}

.chm-blog-grid .custom-post-grid .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.chm-blog-grid .regular-posts .post-category a,
.chm-blog-grid .regular-posts a.read-more,
.chm-blog-grid .regular-posts a[href*="read-more"] {
    color: #7BAD4E;
    text-decoration: none;
}

.chm-blog-grid .regular-posts .post-category a:hover,
.chm-blog-grid .regular-posts a.read-more:hover {
    color: #000000;
    text-decoration: underline;
}

.chm-blog-grid .featured-posts .post-category a,
.chm-blog-grid .featured-posts a.read-more {
    color: #7BAD4E;
    text-decoration: none;
}

.chm-blog-grid .featured-posts .post-category a:hover,
.chm-blog-grid .featured-posts a.read-more:hover {
    color: #000000;
    text-decoration: underline;
}

.chm-blog-grid .pagination {
    margin-top: 30px;
}

.chm-blog-grid .category-description {
    margin-bottom: 25px;
}

.chm-blog-grid .no-more {
    text-align: center;
    margin-top: 20px;
    color: #555;
}
