/* =========================================
   STYLE CHUYÊN MỤC CÔNG NGHỆ (BREADCRUMB & LƯỚI BÀI VIẾT)
   ========================================= */
.breadcrumb {
    margin-top: 20px;
    color: #666;
}
.breadcrumb a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s;
}
.breadcrumb a:hover {
    color: #d32f2f;
}

.category-title {
    color: #d32f2f;
    border-left: 5px solid #d32f2f;
    padding-left: 15px;
    margin: 30px 0;
    font-size: 24px;
    text-transform: uppercase;
}

/* Khung bọc ngoài dạng lưới (Grid) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Mặc định máy tính: 3 cột đều nhau */
    gap: 20px;
    margin-bottom: 50px;
}

/* Định dạng cho từng ô bài báo */
.news-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-tag {
    display: inline-block;
    background: #f1eaea;
    color: #d32f2f;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #222;
    line-height: 1.4;
    transition: color 0.3s;
}

.news-card:hover .card-title {
    color: #d32f2f; 
}

.card-summary {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* =========================================
   ĐỊNH DẠNG KHUNG BÀI BÁO TO (TIN NỔI BẬT)
   ========================================= */
.featured-card {
    grid-column: span 2; /* Mặc định máy tính: Chiếm 2 cột */
    grid-row: span 2;    /* Chiếm 2 hàng */
    display: flex;
    flex-direction: column;
}

.featured-card .card-img {
    height: 380px; 
    object-fit: cover;
}

.featured-card .card-title {
    font-size: 26px; 
    margin-bottom: 15px;
}

.featured-card .card-summary {
    font-size: 16px;
    line-height: 1.6;
}

.featured-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* =========================================
   RESPONSIVE (TỰ ĐỘNG THU GỌN THEO MÀN HÌNH)
   ========================================= */

/* Màn hình Máy tính bảng (từ 769px đến 992px) */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* Giảm từ 3 cột xuống 2 cột */
    }
    .featured-card {
        grid-column: span 2; /* Bài to vẫn chiếm 2 cột ngang */
        grid-row: auto;
    }
}

/* Màn hình Điện thoại (dưới 768px) */
@media (max-width: 768px) {
    .category-title {
        font-size: 20px;
        margin: 20px 0;
    }

    .news-grid {
        grid-template-columns: 1fr; /* ÉP VỀ 1 CỘT DUY NHẤT XẾP DỌC */
        gap: 15px;
    }

    /* Quan trọng: Hủy bỏ việc chiếm 2 cột của bài nổi bật */
    .featured-card {
        grid-column: 1 / -1; 
        grid-row: auto;
    }

    .featured-card .card-img {
        height: 250px; /* Hạ chiều cao ảnh bài to trên điện thoại */
    }
    
    .featured-card .card-title {
        font-size: 20px;
        line-height: 1.4;
    }

    .featured-card .card-summary {
        font-size: 14px;
    }
}