.custom-post-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
}

.post-image img:hover {
    transform: scale(1.05);
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.5em;
    margin: 0 0 10px;
    line-height: 1.3;
}

.post-title a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

.post-title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.post-excerpt {
    font-size: 1em;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 10px;
}

.read-more {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.pagination {
    text-align: center;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #f1f5f9;
    color: #1e3a8a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
}

.pagination a:hover {
    background-color: #22c55e;
    color: #ffffff;
}

.pagination .current {
    background-color: #1e3a8a;
    color: #ffffff;
    font-weight: 600;
}

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

@media (max-width: 600px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    .post-image img {
        height: 150px;
    }
    .post-title {
        font-size: 1.3em;
    }
}

/* Style the pagination container */
.custom-post-list .pagination {
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
}

/* Style the unordered list to display horizontally */
.custom-post-list .pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Style individual list items */
.custom-post-list .pagination li {
    display: inline-block;
    margin: 0 5px;
}

/* Style pagination links */
.custom-post-list .pagination li a,
.custom-post-list .pagination li span {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

/* Style current page */
.custom-post-list .pagination li .current {
    background-color: #0073aa; /* WordPress blue for active page */
    color: #fff;
    border-color: #0073aa;
}

/* Style hover effect for links */
.custom-post-list .pagination li a:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* Style prev/next arrows */
.custom-post-list .pagination li .prev,
.custom-post-list .pagination li .next {
    font-weight: bold;
}

/* Optional: Responsive adjustments */
@media (max-width: 600px) {
    .custom-post-list .pagination li {
        margin: 5px 3px;
    }
    .custom-post-list .pagination li a,
    .custom-post-list .pagination li span {
        padding: 6px 10px;
        font-size: 14px;
    }
}