/* ===== GLOBAL STYLES & LAYOUT ===== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fb;
}

.container {
    /* Giúp căn giữa nội dung chính */
    max-width: 1200px;
}

section {
    padding: 40px 0;
    background-color: #fff;
    /* Đảm bảo các section có nền trắng */
}

.tintuc-sukien {
    background-color: #fff;
}

/* Dùng cho các tiêu đề lớn của section */
.section-title-box {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #f57224;
    /* Đường kẻ dưới nổi bật */
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.section-title-box h4 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.section-title-box i {
    color: #f57224;
    /* Màu icon theo màu chủ đạo */
}

.btn-outline-primary {
    color: #f57224;
    border-color: #f57224;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: #f57224;
    border-color: #f57224;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 114, 36, 0.3);
}

/* ===== SLIDER ===== */
.slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.slider {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.slider img {
    width: 100%;
    flex-shrink: 0;
    max-height: 500px;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    color: #f57224;
    /* Màu icon mặc định */
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: rgba(245, 114, 36, 0.9);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

@media (max-width: 768px) {
    .slider img {
        max-height: 280px;
    }

    .section-title-box h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .slider img {
        max-height: 220px;
    }

    .section-title-box h4 {
        font-size: 1.3rem;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ===== TUYỂN SINH ===== */
.tuyensinh-grid-section {
    background: linear-gradient(180deg, #fff 0%, #f7f7f7 100%);
    padding: 50px 0;
}

.tuyensinh-grid-section h3 {
    color: #333;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.card-box {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.card-box p {
    background: #f57224;
    color: #fff;
    margin: 0;
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.col-custom {
    flex: 0 0 25%;
    max-width: 25%;
}

@media (max-width: 991px) {
    .col-custom {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }
}

@media (max-width: 767px) {
    .col-custom {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 480px) {
    .col-custom {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===== TIN TỨC & THÔNG BÁO ===== */
.news-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
    position: relative;
    /* Thêm position relative cho thẻ bao */
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.post-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 12px;
    color: #fff;
    border-radius: 4px;
    z-index: 10;
}

.label-tintuc {
    background: #0d6efd;
}

.label-thongbao {
    background: #f57224;
}

.news-img {
    position: relative;
    overflow: hidden;
    height: 200px;
    /* Đặt chiều cao cố định */
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
    /* Zoom ảnh khi hover */
}

.news-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 1.15rem;
    /* Tăng nhẹ font size */
    font-weight: 700;
    color: #333;
    /* Giới hạn số dòng cho tiêu đề */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc {
    font-size: 14px;
    color: #555;
    margin-top: 8px;
    /* Tăng nhẹ margin top */
    flex-grow: 1;
    /* Giới hạn số dòng cho mô tả */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 0.9rem;
}

.cta-link {
    font-size: 14px;
    font-weight: 600;
    color: #f57224;
    transition: 0.2s;
}

.cta-link:hover {
    color: #d45a1d;
}

/* ===== NÚT MẠNG XÃ HỘI NỔI ===== */
.social-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.social-floating a {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.social-floating a:hover {
    transform: scale(1.1);
}

.social-floating img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ===================================== */
/* ===== BỔ SUNG: MODAL THÔNG BÁO ===== */
/* ===================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    /* Ban đầu ẩn */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content-custom {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
    animation: modalPopUp 0.3s ease-out forwards;
}

@keyframes modalPopUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content-custom h3 {
    color: #f57224;
    font-size: 1.8rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-content-custom p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 25px;
    text-align: left;
    /* Căn lề trái nội dung */
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-button-primary {
    background-color: #f57224;
    color: white;
    flex-grow: 1;
    /* Choán chỗ đều hơn */
}

.modal-button-primary:hover {
    background-color: #d45a1d;
    transform: translateY(-1px);
}

.modal-button-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    flex-grow: 1;
    /* Choán chỗ đều hơn */
}

.modal-button-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .modal-content-custom {
        padding: 20px;
    }

    .modal-content-custom h3 {
        font-size: 1.5rem;
    }

    .modal-buttons {
        flex-direction: column;
        /* Xếp chồng nút trên màn hình nhỏ */
        gap: 10px;
    }
}
