/* Custom Post Filter Styles */
.custom-post-filter {
    /* max-width: 1200px;
    margin: 0 auto;
    padding: 20px; */
}

.top-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
    justify-content: space-between;
}

.top-bar h3 {
    flex-grow: 1;
    align-self: center;
    margin-bottom: 0 !important;
}

.top-bar  div.filter-bar {
    flex-grow: 3;
    align-self: center;
}


.filter-bar {
    display: flex;
    gap: 20px;
    /* margin-bottom: 20px; */
    flex-wrap: wrap;
    background: #fff;
    /* padding: 10px; */
    border-radius: 50px;
    /* filter: drop-shadow(0px 2px 1px #000); */
}

.top-bar .view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    transition: color 0.3s;
    flex-grow: 1;
    justify-content: end;
}
.top-bar .view-all-link a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(0, 0, 0, 0.5);
}
.post-card-title {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.category-filter {
    flex: 1;
}

.search-filter {
    flex: 3;
}

.category-filter label,
.search-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#category-select,
#search-posts {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #000;
    border-radius: 30px;
    transition: border-color 0.3s;
    line-height: 1;
}

#category-select:focus,
#search-posts:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.search-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin: 0;
    padding: 0;
    list-style: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.posts-display {
    display: grid;
   grid-template-columns: repeat(3, 1fr); 
    gap: 25px;
    margin-bottom: 40px;
}

.post-item.card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 10px;
}

.post-item.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-item .post-image {
    overflow: hidden;
    height: 300px;
}

.post-item .post-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s;
    border-radius: 16px;
}

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

.post-badge {
    display: inline-block;
    background: rgba(233, 186, 60, 0.2);
    color: #000;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #000;
}

.post-item .post-content {
    padding: 10px 0 0 0;
}

.post-item .post-content h2 {
    margin: 10px 0;
    font-size: 20px;
    line-height: 1.4;
}

.post-item .post-content h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-item .post-content h2 a:hover {
    color: #0073aa;
}

.post-item .post-date {
    font-size: 14px;
}

.post-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
}

.loading,
.error,
.no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.error {
    color: #d63638;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 40px;
    margin-bottom: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-link:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-link.prev-page,
.page-link.next-page {
    padding: 10px 20px;
    font-weight: 600;
}

.page-link svg {
    width: 20px;
    height: 20px;
}

.page-numbers {
    display: flex;
    gap: 6px;
    align-items: center;
}

.page-number {
    min-width: 40px;
    justify-content: center;
    padding: 10px 14px;
}

.page-number.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.page-number.active:hover {
    background: #000;
    color: #fff;
    transform: none;
}

.page-dots {
    padding: 0 8px;
    color: #666;
    font-weight: 600;
}

/* Skeleton Loader Styles */
.post-item.skeleton {
    pointer-events: none;
}

.skeleton-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    height: 300px;
    border-radius: 16px;
}

.skeleton-badge {
    display: inline-block;
    width: 80px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 30px;
}

.skeleton-date {
    display: inline-block;
    width: 100px;
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin: 10px 0;
}

.skeleton-title.short {
    width: 70%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* .filter-bar {
        flex-direction: column;
    } */

    .posts-display {
        grid-template-columns: 1fr;
    }

    .category-filter,
    .search-filter {
        min-width: 100%;
    }

    .pagination {
        gap: 6px;
    }

    .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .page-link.prev-page,
    .page-link.next-page {
        padding: 8px 14px;
    }

    .page-number {
        min-width: 36px;
        padding: 8px 10px;
    }

    .page-dots {
        padding: 0 4px;
    }
}