/* Blog Listing Styles */
#blog-listing {
    padding: 4rem 0;
    background: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Loading and Error States */
.loading-state,
.error-state {
    text-align: center;
    padding: 3rem;
}

.loading-state .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #ff6900;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.error-state i {
    font-size: 2rem;
    color: #ff6900;
    margin-bottom: 1rem;
}

.error-state p {
    margin-bottom: 1.5rem;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #ff6900;
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.blog-card-title {
    font-size: 1.3rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card-excerpt {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-card .button {
    display: inline-block;
    padding: 1rem 1.5rem;
    background: #000000;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.blog-card .button:hover {
    background: #e55d00;
}

/* Category Filter */
.category-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-filter span {
    font-weight: 500;
}

.category-filter select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* No Articles Message */
.no-articles {
    text-align: center;
    grid-column: 1 / -1;
    padding: 2rem;
    color: #666;
}

/* RTL Support */
html[dir="rtl"] .section-header,
html[dir="rtl"] .no-articles {
    text-align: right;
}

html[dir="rtl"] .blog-card-meta {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .section-header h1 {
        font-size: 2rem;
    }
}