﻿/* Grid cha */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
    align-items: stretch; /* luôn kéo cao bằng nhau */
}

/* Card */
.news-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* ảnh trên - content dưới */
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .news-item:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    }

/* Hình ảnh */
.news-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .5s ease;
    }

.news-item:hover .news-image img {
    transform: scale(1.08);
}

/* Nội dung */
.news-content {
    flex: 1; /* kéo full chiều cao */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* đẩy read-more xuống cuối */
    padding: 15px 18px;
}

    /* Tiêu đề */
    .news-content .title {
        font-size: 1.15rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }

        .news-content .title a {
            text-decoration: none;
            color: #002d5b;
            font-weight: bold;
            transition: color 0.3s ease;
        }

            .news-content .title a:hover {
                color: #1976d2;
            }

    /* Tóm tắt */
    .news-content .summary {
        flex-grow: 1; /* chiếm không gian linh hoạt */
        font-size: 0.95rem;
        color: #555;
        margin-bottom: 12px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* số dòng */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Ngày đăng */
    .news-content .date {
        font-size: 0.85rem;
        color: #888;
        margin-bottom: 15px;
    }

    /* Read More */
    .news-content .more {
        margin-top: auto; /* ép xuống dưới cùng */
    }

    .news-content .read-more {
        color: var(--main-color, #002d5b);
        font-weight: bold;
        text-decoration: none;
        display: inline-block;
        position: relative;
        transition: color 0.3s ease;
    }

        .news-content .read-more:hover {
            color: #1976d2;
        }

        .news-content .read-more::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: currentColor;
            transition: width 0.3s ease;
        }

        .news-content .read-more:hover::after {
            width: 100%;
        }
		
.read-more {
            position: relative;
            display: inline-block;
            font-weight: bold;
            font-size: 1rem;
            text-decoration: none;
            padding: 2px 6px;
            color: #fff; /* fallback */
            background: linear-gradient( 120deg, #ff6ec4, #7873f5, #4ade80, #facc15, #f87171, #60a5fa, #ff6ec4 );
            background-size: 300% 300%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: glow-spin 4s linear infinite;
            transition: transform .3s ease;
        }

            .read-more:hover {
                transform: scale(1.08);
            }

        /* Keyframes ánh sáng xoắn */
        @keyframes glow-spin {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

/* Responsive */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-image {
        height: 200px;
    }
}

/*tIÊU ĐỀ*/
.title-always {
    position: relative;
    display: inline-block;
    color: #002d5b; /* màu chữ */
    cursor: pointer;
    transition: color 0.3s;
    font-weight: bold;
}

    /* Hover đổi màu chữ */
    .title-always:hover {
        color: #ff6600;
    }

    /* Ký hiệu luôn hiển thị */
    .title-always::after {
        content: "★★★★★"; /* ký hiệu đẹp, có thể đổi thành ▬, ✦, ★ ... */
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: -20px; /* khoảng cách từ chữ */
        font-size: 20px;
        color: #ff6600;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    /* Hover animation nhẹ */
    .title-always:hover::after {
        transform: translateX(-50%) translateY(-5px) scale(1.2);
        color: #ffd700; /* đổi màu ký hiệu khi hover nếu muốn */
    }


/*Nut */

.btn-group {
    display: flex;
    justify-content: center; /* căn giữa ngang */
    gap: 20px; /* khoảng cách giữa các nút */
    margin: 50px 0; /* khoảng cách trên dưới trang */
}
.btn-category {
    padding: 5px 14px;
    color: #fff;
    border-radius: 10px;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none; /* bỏ gạch chân */
    display: inline-block; /* để a trông giống button */
}

    /* Nút 1 */
    .btn-category.btn1 {
        background: #ff6600; /* cam */
    }

        .btn-category.btn1:hover {
            background: #002d5b; /* xanh navy */
        }

    /* Nút 2 */
    .btn-category.btn2 {
        background: #28a745; /* xanh lá */
    }

        .btn-category.btn2:hover {
            background: #1e7e34; /* xanh lá đậm */
        }

    /* Nút 3 */
    .btn-category.btn3 {
        background: #007bff; /* xanh dương */
    }

        .btn-category.btn3:hover {
            background: #0056b3; /* xanh dương đậm */
        }
/*Phan Trang*/
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

    .pagination a, .pagination .aspNetLinkButton {
        padding: 8px 14px;
        background: #f5f5f5;
        color: var(--main-color);
        border-radius: 6px;
        text-decoration: none;
        transition: 0.3s;
    }

        .pagination a:hover, .pagination .aspNetLinkButton:hover {
            background: var(--accent-color);
            color: #fff;
        }

    .pagination .active {
        background: var(--main-color);
        color: #fff !important;
    }


    /*NewsDetails*/

.news-section-detail {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 16px;
}

.news-detail {
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Tiêu đề */
.news-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Ngày đăng */
.news-meta {
    margin-bottom: 20px;
}

.news-date {
    font-size: 0.95rem;
    color: #777;
    font-style: italic;
}

/* Ảnh */
.news-image.detail {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 450px; /* 👉 tăng chiều cao khung ở đây */
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

    .news-image.detail img {
        width: 100%;
        height: 100%; /* ảnh lấp đầy khung */
        object-fit: cover; /* cắt cho vừa khung, không méo */
        display: block;
        transition: transform 0.35s ease, box-shadow 0.35s ease;
    }

        .news-image.detail img:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 28px rgba(0,0,0,0.25);
        }
@media (max-width: 992px) {
    .news-image.detail {
        height: 450px; /* tablet */
    }
}

@media (max-width: 768px) {
    .news-image.detail {
        height: 300px; /* mobile ngang */
    }
}

@media (max-width: 480px) {
    .news-image.detail {
        height: 220px; /* mobile dọc */
    }
}


/* Khối Tin liên quan */
.related-section {
    margin: 40px 0;
}

.related-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--main-color, #002d5b);
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
}

    .related-title::before {
        content: "";
        position: absolute;
        left: 0;
        top: 6px;
        width: 5px;
        height: 80%;
        background: var(--accent-color, #ff6600);
        border-radius: 3px;
    }

.related-news-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Tablet */
@media (max-width: 991px) {
    .related-news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 575px) {
    .related-news-list {
        grid-template-columns: 1fr;
    }
}

.related-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.35s ease;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

    .related-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .related-item a {
        color: inherit;
        text-decoration: none;
        display: block;
    }

.img-box {
    overflow: hidden;
    max-height: 300px;
}

.related-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-item:hover img {
    transform: scale(1.1);
}

.related-title-item {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 12px;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-item:hover .related-title-item {
    color: var(--accent-color, #ff6600);
}

.related-item .date {
    font-size: 0.85rem;
    color: #777;
    margin: 0 12px 15px;
}

/*Img*/


