/* Cấu hình danh sách tin tức */
.vca-news {
    --vca-primary: var(--vca-logo-blue, #00AEF0);
    --vca-active: var(--vca-primary);
    --vca-hover: var(--vca-primary);
    --vca-border: #DDDDDD;
    --vca-text: #222222;
    --vca-muted: #888888;
    --vca-orange: #F07800;

    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* Thanh tổng số và tìm kiếm */
.vca-news .vca-news-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 60px;
    padding: 0 0 25px;
    margin: 0;
    border-bottom: 2px solid #333333;
}

/* Tổng số bài viết */
.vca-news .vca-news-total {
    color: #444444;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.vca-news .vca-news-total strong {
    color: var(--vca-orange);
    font-weight: 700;
}

/* Form tìm kiếm */
.vca-news .vca-news-search {
    display: flex;
    align-items: stretch;
    width: 285px;
    max-width: 100%;
    height: 42px;
    margin: 0 !important;
    padding: 0;
}

.vca-news .vca-news-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0 !important;
    padding: 0 12px;
    border: 1px solid var(--vca-border);
    border-right: 0;
    border-radius: 0;
    background-color: #FFFFFF;
    box-shadow: none !important;
    color: var(--vca-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s ease;
}

.vca-news .vca-news-search input:focus {
    border-color: var(--vca-primary);
}

.vca-news .vca-news-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 42px;
    min-height: 0;
    min-width: 92px;
    margin: 0 !important;
    padding: 0 15px;
    border: 1px solid var(--vca-primary);
    border-radius: 0;
    background-color: var(--vca-primary);
    color: #FFFFFF;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease;
}

.vca-news .vca-news-search button:is(:hover, :focus-visible, :active) {
    background-color: var(--vca-hover);
    border-color: var(--vca-hover);
    color: #FFFFFF;
    box-shadow: none !important;
}

/* Kết quả tìm kiếm */
.vca-news .vca-news-search-result {
    padding: 15px;
    margin-top: 15px;
    background-color: #F0F8FC;
    color: #555555;
    font-size: 14px;
}

.vca-news .vca-news-search-result strong {
    color: var(--vca-active);
}

.vca-news .vca-news-search-result a {
    display: inline-block;
    margin-left: 10px;
    color: var(--vca-active);
    text-decoration: underline;
    transition: color 0.25s ease;
}

.vca-news .vca-news-search-result a:is(:hover, :focus-visible) {
    color: var(--vca-hover);
    text-decoration: underline;
}

/* Danh sách bài viết */
.vca-news .vca-news-list {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Từng hàng bài viết */
.vca-news .vca-news-item {
    display: grid;
    grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    width: 100%;
    margin: 0;
    padding: 30px 22px;
    border-bottom: 1px dashed var(--vca-border);
    background-color: #FFFFFF;
}

/* Khung ảnh đại diện */
.vca-news .vca-news-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border: 1px solid #E0E0E0;
    border-radius: 0;
    background-color: #F0F5F8;
}

/* Ảnh đại diện */
.vca-news .vca-news-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.vca-news .vca-news-image:hover img,
.vca-news .vca-news-item:hover .vca-news-image img {
    transform: scale(1.045);
}

/* Bài viết chưa có ảnh */
.vca-news .vca-news-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 12px;
    background-color: #EDF5F9;
    color: #7895A5;
    text-align: center;
}

.vca-news .vca-news-no-image span {
    font-size: 11px;
    line-height: 1.4;
}

/* Nội dung bài viết */
.vca-news .vca-news-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Tiêu đề bài viết */
.vca-news .vca-news-title {
    padding: 0;
    margin: 0 0 8px !important;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: 0;
}

.vca-news .vca-news-title a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--vca-text);
    text-decoration: none;
    transition: color 0.25s ease;
}

.vca-news .vca-news-title a:hover,
.vca-news .vca-news-title a:focus-visible,
.vca-news .vca-news-item:hover .vca-news-title a {
    color: var(--vca-hover);
    text-decoration: none;
}

/* Mô tả bài viết */
.vca-news .vca-news-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 13px;
    padding: 0;
    color: var(--vca-muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Tác giả, ngày đăng và lượt xem */
.vca-news .vca-news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin: 0;
    padding: 0;
    color: #888888;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.vca-news .vca-news-meta b {
    color: #555555;
    font-weight: 400;
}

.vca-news .vca-news-meta time {
    color: inherit;
}

/* Phân trang */
.vca-news .vca-news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin: 35px 0 0;
    padding: 0;
}

.vca-news .vca-news-pagination a,
.vca-news .vca-news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 0;
    padding: 0 8px;
    border: 1px solid var(--vca-border);
    border-radius: 0;
    background-color: #FFFFFF;
    color: #555555;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease;
}

.vca-news .vca-news-pagination a:is(:hover, :focus-visible, :active),
.vca-news .vca-news-pagination .is-active {
    border-color: var(--vca-active);
    background-color: var(--vca-active);
    color: #FFFFFF;
    box-shadow: none;
    text-decoration: none;
}

.vca-news .vca-news-pagination .vca-page-prev,
.vca-news .vca-news-pagination .vca-page-next {
    font-size: 23px;
}

.vca-news .vca-news-pagination .vca-page-dots {
    border: 0;
    background-color: transparent;
}

/* Không có bài viết */
.vca-news .vca-news-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 30px 15px;
    color: #888888;
    font-size: 16px;
    text-align: center;
}

/* Màn hình máy tính lớn */
@media only screen and (min-width: 1921px) {

    .vca-news .vca-news-item {
        grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
        gap: 35px;
    }
}

/* Tablet và máy tính nhỏ */
@media only screen and (max-width: 1199px) {

    .vca-news .vca-news-item {
        grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
        gap: 20px;
        padding: 25px 10px;
    }

    .vca-news .vca-news-title {
        font-size: 18px;
    }

    .vca-news .vca-news-excerpt {
        font-size: 15px;
    }

    .vca-news .vca-news-meta {
        font-size: 12px;
        gap: 5px 15px;
    }

    .vca-news .vca-news-search {
        width: 230px;
    }
}

/* Điện thoại */
@media only screen and (max-width: 849px) {

    .vca-news .vca-news-toolbar {
        gap: 12px;
        padding-bottom: 15px;
    }

    .vca-news .vca-news-total {
        font-size: 14px;
    }

    .vca-news .vca-news-item {
        grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
        gap: 15px;
        padding: 20px 0;
    }

    .vca-news .vca-news-title {
        font-size: 17px;
    }

    .vca-news .vca-news-title a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
    }

    .vca-news .vca-news-excerpt {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .vca-news .vca-news-meta {
        font-size: 12px;
        gap: 4px 12px;
    }
}

/* Điện thoại màn hình nhỏ */
@media only screen and (max-width: 549px) {

    .vca-news .vca-news-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .vca-news .vca-news-search {
        width: 100%;
    }

    .vca-news .vca-news-item {
        grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 18px 0;
    }

    .vca-news .vca-news-title {
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 6px !important;
    }

    .vca-news .vca-news-excerpt {
        font-size: 13px;
        line-height: 1.5;
        -webkit-line-clamp: 2;
    }

    .vca-news .vca-news-meta {
        font-size: 11px;
        gap: 3px 10px;
    }

    .vca-news .vca-news-pagination {
        margin-top: 25px;
    }

    .vca-news .vca-news-pagination a,
    .vca-news .vca-news-pagination span {
        min-width: 32px;
        height: 32px;
    }
}

/* Hạn chế chuyển động */
@media (prefers-reduced-motion: reduce) {

    .vca-news *,
    .vca-news *::before,
    .vca-news *::after {
        transition: none !important;
    }
}
