/* Advanced Blog Filter Pro - Main Styles */

.abf-pro-wrapper {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --primary-color: #1a5f7a;
    --accent-color: #2980b9;
    --text-dark: #2c3e50;
    --border-light: #ecf0f1;
}

.abf-pro-wrapper[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Filter Sidebar */
.abf-pro-filters {
    flex: 0 0 280px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.abf-pro-filter-header h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1a5f7a;
    padding-bottom: 15px;
    border-bottom: 3px solid #2980b9;
}

.abf-pro-filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.abf-pro-filter-section:last-of-type {
    border-bottom: none;
}

.abf-pro-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
}

.abf-pro-filter-icon {
    font-size: 18px;
}

/* Category List */
.abf-pro-categories-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.abf-pro-category-item {
    margin-bottom: 6px;
}

.abf-pro-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.abf-pro-category-label:hover {
    color: #2980b9;
}

.abf-pro-category-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: #2980b9;
}

.abf-pro-category-name {
    flex: 1;
}

.abf-pro-category-count {
    color: #999;
    font-size: 12px;
    font-weight: 500;
}

.abf-pro-depth-1 {
    margin-left: 20px;
}

.abf-pro-depth-2 {
    margin-left: 40px;
}

.abf-pro-depth-3 {
    margin-left: 60px;
}

.abf-pro-wrapper[dir="rtl"] .abf-pro-depth-1 {
    margin-left: 0;
    margin-right: 20px;
}

.abf-pro-wrapper[dir="rtl"] .abf-pro-depth-2 {
    margin-left: 0;
    margin-right: 40px;
}

.abf-pro-wrapper[dir="rtl"] .abf-pro-depth-3 {
    margin-left: 0;
    margin-right: 60px;
}

/* Select Dropdown */
.abf-pro-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.abf-pro-select:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.15);
}

/* Action Buttons */
.abf-pro-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.abf-pro-btn {
    flex: 1;
    min-width: 110px;
    padding: 12px 16px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.abf-pro-btn-primary {
    background: #2980b9;
    color: white;
    font-weight: 600;
}

.abf-pro-btn-primary:hover {
    background: #1a5f7a;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.35);
}

.abf-pro-btn-secondary {
    background: #ecf0f1;
    color: #333;
    border: 1px solid #bdc3c7;
}

.abf-pro-btn-secondary:hover {
    background: #dfe6e9;
    border-color: #95a5a6;
}

/* Results Wrapper */
.abf-pro-results-wrapper {
    flex: 1;
}

.abf-pro-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
    transition: opacity 0.3s ease;
}

.abf-pro-posts-grid.abf-pro-cols-1 {
    grid-template-columns: 1fr;
}

.abf-pro-posts-grid.abf-pro-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.abf-pro-posts-grid.abf-pro-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Post Item */
.abf-pro-post-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.abf-pro-post-item:hover {
    box-shadow: 0 10px 24px rgba(41, 128, 185, 0.15);
    transform: translateY(-3px);
    border-color: #d0e8f2;
}

.abf-pro-post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
}

.abf-pro-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.abf-pro-post-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.abf-pro-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.abf-pro-post-title a:hover {
    color: #2980b9;
}

.abf-pro-post-meta {
    margin-bottom: 12px;
    font-size: 12px;
    color: #999;
}

.abf-pro-post-date {
    display: inline-block;
}

.abf-pro-post-excerpt {
    margin: 0 0 15px;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    flex: 1;
}

.abf-pro-read-more {
    display: inline-block;
    color: #2980b9;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.abf-pro-read-more:hover {
    color: #1a5f7a;
    padding-right: 4px;
}

.abf-pro-wrapper[dir="rtl"] .abf-pro-read-more:hover {
    padding-right: 0;
    padding-left: 4px;
}

/* No Posts Message */
.abf-pro-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.abf-pro-no-posts p {
    margin: 0;
    font-size: 16px;
    color: #999;
}

/* Pagination */
.abf-pro-pagination {
    margin-top: 30px;
}

.abf-pro-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.abf-pro-page-btn {
    padding: 10px 18px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #333;
}

.abf-pro-page-btn:hover {
    background: #2980b9;
    color: white;
    border-color: #2980b9;
}

.abf-pro-page-info {
    color: #666;
    font-weight: 500;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .abf-pro-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .abf-pro-filters {
        flex: 1;
        position: relative;
        top: 0;
    }

    .abf-pro-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .abf-pro-posts-grid.abf-pro-cols-1 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .abf-pro-wrapper {
        display: block !important;
    }

    .abf-pro-filters {
        display: none;
        width: 100%;
        margin-bottom: 20px;
    }

    .abf-pro-filters.mobile-visible {
        display: block;
    }

    .abf-pro-posts-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .abf-pro-posts-grid.abf-pro-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .abf-pro-posts-grid.abf-pro-cols-2 {
        grid-template-columns: 1fr !important;
    }

    .abf-pro-posts-grid.abf-pro-cols-1 {
        grid-template-columns: 1fr !important;
    }

    .abf-pro-filter-actions {
        flex-direction: column;
    }

    .abf-pro-btn {
        width: 100%;
        min-width: auto;
    }

    .abf-pro-filter-label {
        flex-wrap: wrap;
    }

    .abf-pro-categories-list {
        max-height: 300px;
    }

    .abf-pro-post-image {
        height: 160px;
    }

    .abf-pro-post-content {
        padding: 15px;
    }

    .abf-pro-post-title {
        font-size: 15px;
    }

    .abf-pro-post-excerpt {
        font-size: 12px;
    }
}

/* Scrollbar Styling */
.abf-pro-categories-list::-webkit-scrollbar {
    width: 6px;
}

.abf-pro-categories-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.abf-pro-categories-list::-webkit-scrollbar-thumb {
    background: #2980b9;
    border-radius: 10px;
}

.abf-pro-categories-list::-webkit-scrollbar-thumb:hover {
    background: #1a5f7a;
}

/* Loading State */
.abf-pro-posts-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accessibility */
.abf-pro-category-label:focus-within input[type="checkbox"],
.abf-pro-select:focus {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}
