/* Blog Widget Styles */
.xtrain-blog-widget {
    padding: 40px 0;
    direction: ltr; /* Default LTR */
}

body.rtl .xtrain-blog-widget {
    direction: rtl;
}

.xtrain-blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.xtrain-blog-title-area h2 {
    font-size: 32px;
    margin: 0;
    font-weight: 700;
    color: #333;
}

.xtrain-blog-title-area {
    text-align: left;
}

body.rtl .xtrain-blog-title-area {
    text-align: right;
}

.xtrain-blog-title-area .xtrain-blog-subtitle {
    font-size: 18px;
    color: #777;
    margin: 5px 0 0;
}

.xtrain-blog-nav {
    display: flex;
    gap: 10px;
}

.xtrain-blog-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s ease;
}

.xtrain-blog-nav-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.xtrain-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.xtrain-blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.xtrain-blog-card:hover {
    transform: translateY(-5px);
}

.xtrain-blog-thumb {
    height: 250px;
    overflow: hidden;
}

.xtrain-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xtrain-blog-content {
    padding: 20px;
    text-align: left;
}

.xtrain-blog-card-title {
    font-size: 20px;
    margin: 0 0 10px;
    font-weight: 600;
}

.xtrain-blog-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.xtrain-blog-card-title a:hover {
    color: #000;
}

.xtrain-blog-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.xtrain-blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #999;
}

.xtrain-blog-category {
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
    color: #333;
}

.xtrain-blog-footer {
    text-align: center;
    margin-top: 40px;
}

.xtrain-blog-view-all {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #333;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.xtrain-blog-view-all:hover {
    background: #333;
    color: #fff;
}

/* RTL Adjustments */
body.rtl .xtrain-blog-content {
    text-align: right;
}

body.rtl .xtrain-blog-header {
    flex-direction: row; /* Default row in RTL puts content at Start (Right) and nav at End (Left) */
}

body.rtl .xtrain-blog-nav-btn i {
    transform: scaleX(-1);
}

@media (max-width: 991px) {
    .xtrain-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .xtrain-blog-title-area h2 {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .xtrain-blog-widget {
        padding: 30px 15px;
    }
    .xtrain-blog-grid {
        grid-template-columns: 1fr;
    }
    .xtrain-blog-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        gap: 15px;
        margin-bottom: 25px;
    }
    .xtrain-blog-title-area h2 {
        font-size: 24px;
    }
    .xtrain-blog-thumb {
        height: 200px;
    }
}
