
.card-img-top {
    height: 200px; 
    width: 100%;
    object-fit: cover;
    object-position: center; 
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4; 
    margin-bottom: 0.5rem; 
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 1rem; 
}

.card-body {
    display: flex;
    flex-direction: column;
    min-height: 150px; 
}

.card-body .d-flex.justify-content-between {
    margin-top: auto; 
}

#news-list.row {
    display: flex;
    flex-wrap: wrap;
}

.card {
    display: flex;
    flex-direction: column;
}

.card-body {
    flex-grow: 1; 
}

.post-card {  
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;  
}
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#news-list.posts-loaded .post-card {
    opacity: 1;  
}

.post-card {
    border: 1px solid #dee2e6; /* Viền mỏng, màu xám Bootstrap (thay border-0) */
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075), 
                0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* Shadow mạnh hơn shadow-sm: Offset nhẹ + blur rộng cho chiều sâu */
    transition: all 0.3s ease-in-out; /* Smooth hover */
    background: white; /* Đảm bảo nền trắng nếu background trang không phải */
    border-radius: 0.375rem; /* Bo góc nhẹ, khớp Bootstrap card */
}

.post-card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1), 
                0 1rem 2rem rgba(0, 0, 0, 0.2); /* Nổi hơn khi hover: Tăng offset và blur */
    transform: translateY(-2px); /* Nâng card lên 2px khi hover */
    border-color: #adb5bd; /* Viền đậm hơn */
}

/* Tăng gutter giữa các col để tách biệt hơn (nếu g-4 chưa đủ) */
#news-list .col-md-6 {
    padding: 0.75rem; /* Thêm padding nếu cần space quanh card */
}

/* Đảm bảo img không bị ảnh hưởng shadow */
.post-card .card-img-top {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    /* Giữ nguyên height/object-fit từ CSS trước */
}

.news-tabs {
  justify-content: center;
  gap: 0.5rem;
}

.news-tabs .tab {
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  background-color: #fff;
  color: #333;
  font-weight: 600;
  transition: all 0.2s ease;
}

.news-tabs .tab:hover {
  background-color: #f8f9fa;
  color: #dc3545; /* màu đỏ của theme */
  border-color: #dc3545;
}

.news-tabs .tab.active {
  background-color: #dc3545;
  color: #fff;
  border-color: #dc3545;
  box-shadow: 0 0 6px rgba(220, 53, 69, 0.4);
}
