/* Filter Container */
.blog-category-filter {
    background: #f8f9fa;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-header {
    margin-bottom: 1rem;
}

.filter-header h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.filter-description {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

/* Filter Form */
.category-filter-form {
    margin: 0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filter-column {
    flex: 1;
    min-width: 200px;
}

.filter-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

/* Form Controls */
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.65;
    cursor: not-allowed;
}

.form-select.loading {
    background-image: url("data:image/svg+xml,%3csvg width='12' height='12' viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='6' cy='6' r='5' fill='none' stroke='%236c757d' stroke-width='2' stroke-dasharray='15.708'%3e%3canimateTransform attributeName='transform' dur='2s' type='rotate' values='0 6 6;360 6 6' repeatCount='indefinite'/%3e%3c/circle%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #5a6268;
}

/* Results Section */
.filter-results {
    margin-top: 2rem;
}

.results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.results-header h4 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.results-count {
    color: #6c757d;
    font-weight: normal;
}

.selected-category {
    color: #495057;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.selected-category strong {
    color: #007bff;
}

/* Blog Post List */
.blog-post-list {
    display: grid;
    gap: 1.5rem;
}

.blog-post-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.15s ease-in-out;
}

.blog-post-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.post-header {
    margin-bottom: 1rem;
}

.post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.post-link {
    color: #007bff;
    text-decoration: none;
}

.post-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.post-date,
.post-authors {
    margin: 0;
}

.post-excerpt,
.post-teaser {
    margin-bottom: 1rem;
    color: #495057;
    line-height: 1.5;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.read-more-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

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

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #495057;
    background-color: #e9ecef;
    border-radius: 12px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-results-content h5 {
    color: #495057;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.no-results-message {
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

/* Error Messages */
.blog-filter-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

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

    .filter-column,
    .filter-actions {
        flex: none;
        width: 100%;
    }

    .filter-actions {
        margin-top: 1rem;
    }

    .blog-category-filter {
        padding: 1rem;
    }

    .blog-post-list {
        gap: 1rem;
    }

    .blog-post-item {
        padding: 1rem;
    }

    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .post-categories {
        order: -1;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .filter-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }

    .blog-category-filter {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
}
