/* Post Grid Filter Styles */
.epgf-wrapper {
    position: relative;
    width: 100%;
}

/* Filter Styles */
.epgf-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.epgf-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.epgf-filter-group label {
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.epgf-filter-group select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.3s;
}

.epgf-filter-group select:hover,
.epgf-filter-group select:focus {
    border-color: #999;
    outline: none;
}

/* Button Style Filters */
.epgf-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.epgf-filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.epgf-filter-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.epgf-filter-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* Loading Spinner */
.epgf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

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

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

/* Posts Grid */
.epgf-posts-grid {
    display: grid;
    margin-bottom: 30px;
    transition: opacity 0.3s ease;
}

/* Post Item */
.epgf-post-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

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

.epgf-post-thumbnail {
    position: relative;
    overflow: hidden;
}

.epgf-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.epgf-post-item:hover .epgf-post-thumbnail img {
    transform: scale(1.05);
}

.epgf-post-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Meta Information */
.epgf-post-meta {
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.epgf-post-meta > span {
    display: inline-flex;
    align-items: center;
}

.epgf-post-categories {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.epgf-post-categories a {
    color: #3498db;
    text-decoration: none;
    margin-right: 8px;
    font-weight: 600;
}

.epgf-post-categories a:hover {
    color: #2980b9;
}

.epgf-post-date,
.epgf-post-author {
    color: #999;
}

.epgf-post-author a {
    color: #666;
    text-decoration: none;
    margin-left: 4px;
}

.epgf-post-author a:hover {
    color: #3498db;
}

/* Title */
.epgf-post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.epgf-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.epgf-post-title a:hover {
    color: #3498db;
}

/* Excerpt */
.epgf-post-excerpt {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Read More Link */
.epgf-post-read-more {
    margin-top: auto;
}

.epgf-read-more-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.epgf-read-more-link:hover {
    color: #2980b9;
}

/* No Posts / Error */
.epgf-no-posts,
.epgf-error {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Pagination */
.epgf-pagination {
    text-align: center;
    margin-top: 30px;
}

.epgf-load-more {
    padding: 12px 32px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.epgf-load-more:hover {
    background: #2980b9;
}

.epgf-load-more:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .epgf-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .epgf-filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .epgf-filter-group select {
        width: 100%;
    }
    
    .epgf-filter-buttons {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .epgf-filter-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
