.bai-viet-category {
    background: #f7f8fb;
}

.bai-viet-category .ai-template-category__hero {
    min-height: 430px;
}

.bai-viet-category__grid .ai-template-card h3 {
    min-height: 0;
}

.bai-viet-category__card img {
    aspect-ratio: 4 / 3;
}

.bai-viet-category__empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 240px;
    text-align: center;
    color: #667085;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
}

.bai-viet-category__empty i {
    font-size: 34px;
    color: #1f7a8c;
}

.bai-viet-category__empty h2 {
    margin: 0;
    color: #111827;
    font-size: 22px;
}

.bai-viet-category__featured {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bai-viet-category__featured-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.bai-viet-category__featured-card:hover {
    border-color: #b8ccff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
    transform: translateY(-2px);
}

.bai-viet-category__featured-card > a {
    background: #f2f4f7;
    display: block;
}

.bai-viet-category__featured-card img {
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    width: 100%;
}

.bai-viet-category__featured-card div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.bai-viet-category__featured-card span {
    align-self: flex-start;
    background: #eef4ff;
    border-radius: 999px;
    color: #155eef;
    font-size: 12px;
    font-weight: 850;
    padding: 5px 10px;
}

.bai-viet-category__featured-card h3 {
    color: #101828;
    display: -webkit-box;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    min-height: calc(17px * 1.35 * 2);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bai-viet-category__featured-card h3 a {
    color: inherit;
    text-decoration: none;
}

.bai-viet-category__featured-card p {
    color: #475467;
    display: -webkit-box;
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
    min-height: calc(14px * 1.55 * 3);
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.bai-viet-category__featured-card footer {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: auto;
}

.bai-viet-category__featured-card footer strong {
    align-items: center;
    color: #f79009;
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    gap: 5px;
}

.bai-viet-category__featured-card footer a {
    align-items: center;
    border: 1px solid #155eef;
    border-radius: 6px;
    color: #155eef;
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    text-decoration: none;
    white-space: nowrap;
}

.bai-viet-category__latest {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.bai-viet-category__post {
    display: grid;
    gap: 10px;
    padding: 12px;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bai-viet-category__post:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.bai-viet-category__post img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 6px;
}

.bai-viet-category__post span {
    color: #1f7a8c;
    font-size: 13px;
    font-weight: 700;
}

.bai-viet-category__post strong {
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
}

.bai-viet-category__load-more {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 22px;
}

.bai-viet-category__load-more button {
    align-items: center;
    background: #155eef;
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
}

.bai-viet-category__load-more button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.bai-viet-category__load-more button i {
    display: none;
}

.bai-viet-category__load-more button.is-loading i {
    display: inline-block;
    animation: ai-template-spin 1s linear infinite;
}

.bai-viet-category__load-more p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.bai-viet-category__sentinel {
    height: 1px;
}

@media (max-width: 900px) {
    .bai-viet-category__featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bai-viet-category__latest {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bai-viet-category__featured {
        grid-template-columns: 1fr;
    }

    .bai-viet-category__latest {
        grid-template-columns: 1fr;
    }
}
