/* Main wrapper */
.abp-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Category filters */
.abp-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
    padding: 5px 0;
}

.abp-filter-btn {
    background: #f0f8ff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    font-size: 14px;
}

.abp-filter-btn:hover {
    background: #e0f0ff;
    transform: translateY(-1px);
}

.abp-filter-btn.active {
    background: #007bff;
    color: #fff;
}

/* Posts grid */
.abp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

.abp-posts-grid.loading {
    opacity: 0.5;
}

/* Post card */
.abp-post-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.abp-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.abp-post-thumbnail {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.abp-no-image {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abp-post-content {
    padding: 20px;
}

.abp-post-title {
    margin: 0 0 10px;
    font-size: 1.25em;
    color: #333;
    line-height: 1.4;
}

.abp-post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
}

.abp-post-date,
.abp-post-categories {
    display: inline-flex;
    align-items: center;
}

.abp-post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.abp-read-more-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.abp-read-more-btn:hover {
    background: #0056b3;
}

/* Pagination */
.abp-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.abp-pagination-info {
    color: #666;
    margin: 0 15px;
    font-size: 0.9em;
}

.abp-pagination-btn {
    min-width: 40px;
    height: 40px;
    border: none;
    background: #f0f8ff;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abp-pagination-btn:hover:not([disabled]) {
    background: #e0f0ff;
}

.abp-pagination-btn.active {
    background: #007bff;
    color: #fff;
}

.abp-pagination-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.abp-pagination-dots {
    color: #666;
    margin: 0 5px;
}

/* Loading spinner */
.abp-loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.abp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.abp-error {
    text-align: center;
    color: #dc3545;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* No posts message */
.abp-no-posts {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.1em;
}

/* Responsive design */
@media (max-width: 768px) {
    .abp-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .abp-post-thumbnail {
        height: 180px;
    }

    .abp-post-content {
        padding: 15px;
    }

    .abp-pagination-wrapper {
        gap: 5px;
    }

    .abp-pagination-btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .abp-wrapper {
        padding: 10px;
    }

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

    .abp-category-filters {
        justify-content: flex-start;
        padding: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}