/* Import Google Fonts - Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* News Card Styles - Override main.scss */
.news-card-block {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 370px);
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.news-card-item-cds {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 11px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    width: 370px;
    min-height: 500px;
    height: fit-content;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.news-card-item-cds img {
    width: 100%;
    aspect-ratio: unset; /* Bỏ tỷ lệ khung hình tự động */
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    /* Đảm bảo ảnh không bị co */
    height: 100%;
}

.news-card-item-cds:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #1a4d7a;
}

.news-card-item-cds > a {
    display: block;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    flex-shrink: 0;
}

.news-card-item-cds:hover .news-card-image {
    transform: scale(1.05);
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    border-radius: 11px 11px 0 0;
}

.news-card-content-cds {
    padding: 15px 15px 15px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: transparent !important;
    background-color: transparent !important;
    text-align: left !important;
}

.news-card-title-cds {
    margin-bottom: 5px;
    flex: 1;
}

.news-card-title-cds a {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 500;
    font-style: normal;
    color: #1a1a1a;
    line-height: 100%;
    text-align: justify;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.news-card-title-cds a:hover {
    color: #3B84D9;
    text-decoration: none;
}

.news-card-summary-cds {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    color: #666666;
    line-height: 100%;
    text-align: justify;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.news-card-summary-cds:hover {
    /* Bỏ giới hạn số dòng */
    -webkit-line-clamp: unset;

    /* Đảm bảo nội dung hiển thị hết */
    overflow: visible;

    /* (Tùy chọn) Đổi con trỏ chuột thành hình bàn tay để user biết có tương tác */
    cursor: pointer;
}

.news-card-date {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #999999;
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.news-card-date::before {
    content: '🕒';
    margin-right: 6px;
    font-size: 14px;
}

/* Pagination Styles */
.news-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 20px 0;
}

.news-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.news-pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.news-pagination-btn:hover {
    background: #f5f5f5;
    border-color: #1a4d7a;
    color: #1a4d7a;
    text-decoration: none;
}

.news-pagination-btn.active {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    font-weight: 600;
}

.news-pagination-btn.active:hover {
    background: #c82333;
    border-color: #c82333;
    color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
    .news-card-grid {
        grid-template-columns: repeat(auto-fill, 370px);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .news-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-card-item-cds {
        width: 100%;
        max-width: 370px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .news-card-grid {
        grid-template-columns: repeat(auto-fill, 370px);
        gap: 20px;
    }

    .news-card-item-cds {
        width: 370px;
    }

    .news-card-title a {
        font-size: 18px;
    }

    .news-card-summary {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .news-card-item-cds {
        width: 100%;
        max-width: 370px;
        margin: 0 auto;
    }

    .news-card-item-cds > a {
        height: 180px;
    }
}