.blog-page {
    padding-top: 24px;
}

.blog-categories {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 28px;
    padding-bottom: 4px;
}

.blog-category {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 18px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1.167rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-category:hover,
.blog-category.is-active {
    background: var(--primary-color);
    color: var(--text-color-primary-bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 20px;
}

.blog-card {
    height: 100%;
    background: #fff;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.blog-card-link:hover {
    color: inherit;
}

.blog-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--secondary-color-alt5);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 14px;
}

.blog-card-date,
.blog-article-date {
    color: var(--secondary-color-alt6);
    font-size: 1rem;
    margin-bottom: 6px;
}

.blog-card-title {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link:hover .blog-card-title {
    color: var(--primary-color);
    filter: brightness(80%);
}

.blog-card-desc {
    margin: 0 0 12px;
    color: var(--secondary-color-alt11);
    font-size: 1.083rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--secondary-color-alt4);
    background: #fff;
    color: var(--secondary-color-alt3);
    font-size: 0.95rem;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 0;
}

.blog-badge.is-category {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

a.blog-badge.is-category:hover {
    background: var(--primary-color);
    color: var(--text-color-primary-bg);
}

.blog-badge.is-more {
    border-color: transparent;
    color: var(--secondary-color-alt6);
}

.blog-card-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 1.083rem;
    font-weight: 500;
}

.blog-arrow {
    display: block;
}

html[dir="rtl"] .blog-arrow,
.rtl .blog-arrow {
    transform: scaleX(-1);
}

.blog-count-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--secondary-color-alt6);
    font-size: 1.167rem;
}

.blog-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary-color);
    color: var(--text-color-primary-bg);
    font-size: 1rem;
    line-height: 1;
}

.blog-empty {
    color: var(--secondary-color-alt6);
    font-size: 1.167rem;
    margin: 12px 0 32px;
}

.blog-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
    background: var(--secondary-color-alt5);
    margin-bottom: 24px;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-article-meta,
.blog-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.blog-article-footer {
    margin-top: 28px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color-alt4);
}

.blog-article-footer .blog-badges {
    margin-bottom: 0;
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 14px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--secondary-color-alt3);
}

.blog-share-btn:hover,
.blog-share-btn.is-copied {
    color: var(--primary-color);
}

.blog-related {
    padding-top: 10px;
}

.blog-posts-slider .blog-slide {
    padding-left: 15px;
    padding-right: 15px;
}

.blog-posts-slider .blog-card {
    max-width: none;
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-cover {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .blog-posts-slider .blog-slide {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 24px;
    }

    .blog-article-meta,
    .blog-article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
