﻿
/* Tổng thể */
.home-container {
    background: linear-gradient(to bottom right, #f9fafb, #eef2f7);
    min-height: 100vh;
}

.home-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .home-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    }

.card-title {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Ảnh đại diện */
.anhdaidien-wrapper {
    width: 100%;
    text-align: center;
}

.anhdaidien-img {
    width: 100%;
    height: auto;
    max-height: 230px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Giới hạn nội dung tin nổi bật */
.tin-content {
    position: relative;
    max-height: 120px;
    overflow: hidden;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #374151;
}

    .tin-content::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 40px;
        background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    }

/* Nút xem chi tiết */
.btn-primary {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border: none;
    transition: opacity 0.2s ease-in-out;
}

    .btn-primary:hover {
        opacity: 0.85;
    }

.btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
}

    .btn-outline-primary:hover {
        background: #3b82f6;
        color: #fff;
    }
/* Tiêu đề từng khối nội dung */
.section-title {
    display: inline-block;
    text-align: center;
    padding: 0.6rem 1.2rem;
    margin: 0 auto 1.2rem auto;
    border: 2px solid #f7b267; 
    background-color: #fff7ed; 
    color: #0047ab; /* xanh dương đậm */
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Căn giữa khung tiêu đề trong cột */
.home-card .section-title {
    display: block;
    width: fit-content;
    margin: 0 auto 1.2rem auto; /* căn giữa theo chiều ngang */
}

/* Hiệu ứng khi rê chuột */
.section-title:hover {
    background-color: #ffe8d0;
    border-color: #f6a65b;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    transition: all 0.2s ease-in-out;
}

/* ====== Phần danh sách thông báo ====== */
.list-group-item {
    background-color: #C9F2F2; /* nền be sáng, ấm */
    color: #000000; /* đen */
    font-size: 0.75rem;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

    /* Khi rê chuột vào từng thông báo */
    .list-group-item:hover {
        background-color: #fff4e5; /* nền cam nhạt hơn khi hover */
        transform: translateX(4px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    /* Liên kết bên trong */
    .list-group-item a {
        color: #0047ab; /* xanh dương đậm */
        font-weight: 600;
        display: block;
        text-decoration: none;
        padding: 4px 2px;
    }

        /* Khi rê chuột vào liên kết */
        .list-group-item a:hover {
            color: #2563eb; /* xanh lam sáng hơn */
            text-decoration: underline;
        }

/* Loại bỏ đường viền gốc của Bootstrap list-group */
.list-group-flush > .list-group-item {
    border: none !important;
}

/* ====== BOX ỨNG DỤNG ====== */
.app-box {
    background: linear-gradient(135deg,#eff6ff,#dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
    transition: all .2s;
    color: #02107A; /* xanh đậm dễ đọc */
    font-weight: 600;
}

    .app-box:hover {
        background: #dbeafe;
        transform: translateY(-3px);
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    }

.app-link-box {
    text-decoration: none;
}

/* ⭐ Background chìm cho từng home-card */
.home-card {
    position: relative;
    overflow: hidden;
}

    .home-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('/image/hinhnen2.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.15; /* mức chìm - có thể chỉnh 0.1 → 0.3 */
        z-index: 0;
        filter: blur(1px); /* giúp chữ không bị rối */
    }

    /* đảm bảo nội dung nổi lên trên */
    .home-card > * {
        position: relative;
        z-index: 1;
    }
/* ===== TÊN VĂN BẢN: ƯU TIÊN NGANG, CHỈ XUỐNG DÒNG KHI THẬT SỰ DÀI ===== */
.vanban-ten {
    min-width: 300px;
    max-width: 720px;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Giữ cột hành động gọn không bị đẩy */
table td:last-child {
    white-space: nowrap;
}

/* Mobile: vẫn gọn */
@media (max-width: 768px) {
    .vanban-ten {
        min-width: 160px;
        max-width: 220px;
        font-size: 0.8rem;
    }
}

/* ====== TÔ MÀU THEO LOẠI VĂN BẢN ====== */
.vb-congvan {
    color: #1d4ed8; /* xanh dương */
    font-weight: 600;
}

.vb-thongbao {
    color: #b91c1c; /* đỏ */
    font-weight: 700;
}

.vb-quyetdinh {
    color: #065f46; /* xanh lá đậm */
    font-weight: 700;
}

.vb-kehoach {
    color: #92400e; /* cam nâu */
    font-weight: 600;
}
/* Item tin tức clickable */
.tin-item {
    transition: background 0.2s ease, transform 0.15s ease;
}

    .tin-item:hover {
        background: #fff4e5;
        transform: translateX(4px);
    }

/* Ảnh tiêu đề tin */
.tin-anh img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Ảnh mặc định khi không có ảnh */
.tin-anh-mac-dinh {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    border-radius: 6px;
    font-size: 1.2rem;
}

/* Tiêu đề tin: tối đa 2 dòng + ... */
.tin-tieude {
    line-height: 1.4;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ===== BĂNG RÔN KHẨU HIỆU ===== */
.banner-wrapper {
    position: relative;
    background: linear-gradient(90deg, #8b0000, #c40000, #8b0000);
    padding: 12px 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border: 2px solid #facc15;
}

/* ✅ LỚP CHỮ CHẠY */
.banner-inner {
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    z-index: 2;
}

.banner-text {
    display: inline-block;
    padding-left: 100%;
    font-size: 1.4rem;
    font-family: "Times New Roman", Times, serif;
    font-weight: 800;
    color: #FFD700;
    animation: chaykhauhieu 18s linear infinite;
    text-shadow: 1px 1px 2px #000, 0 0 6px #FFD700;
    letter-spacing: 1px;
}

/* ✅ HIỆU ỨNG CHỮ CHẠY */
@keyframes chaykhauhieu {
    from {
        transform: translateX(0%);
    }

    to {
        transform: translateX(-100%);
    }
}

/* ✅ ÁNH SÁNG CHẠY NGƯỢC CHIỀU CHỮ */
@keyframes lightSweep {
    from {
        left: 100%;
    }

    to {
        left: -40%;
    }
}

/* Ô nhập khẩu hiệu */
.banner-edit input {
    max-width: 720px;
}

.seo-h1 {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.visit-box {
    font-size: 14px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    width: 220px;
}