﻿/*Css Form đăng ký*/
.consult-form {
    position: absolute;
    right: 2%;
    top: 2%;
    width: 480px;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    border: 1px solid rgba(24,120,231,0.2);
    font-family: 'Segoe UI', Roboto, sans-serif;
    overflow-y: auto;
    box-sizing: border-box;
    z-index: 10;
    /* Thêm transform-origin để scale từ góc trên bên phải */
    transform-origin: top right;
    /* Animation cho scale mượt mà */
    transition: transform 0.3s ease;
}
/* Scale theo tỷ lệ màn hình - TỰ ĐỘNG ADAPTIVE */
@media (max-width: 1600px) {
    .consult-form {
        transform: scale(0.95);
    }
}

@media (max-width: 1400px) {
    .consult-form {
        transform: scale(0.9);
    }
}

@media (max-width: 1200px) {
    .consult-form {
        transform: scale(0.85);
        right: 1%;
    }
}

@media (max-width: 1100px) {
    .consult-form {
        transform: scale(0.8);
        right: 0.5%;
    }
}
/* Scale cho các màn hình nhỏ hơn */
@media (max-width: 992px) {
    .consult-form {
        width: 440px;
        padding: 14px 18px;
        transform: scale(0.95); /* Scale nhẹ cho tablet */
    }

    .form-grid {
        gap: 10px 8px;
    }
}

@media (max-width: 768px) {
    .consult-form {
        position: relative;
        width: 92%;
        margin: 10px auto;
        padding: 12px 16px;
        transform: scale(1); /* Bỏ scale khi chuyển sang mobile layout */
        right: auto;
        top: auto;
        transform-origin: center; /* Đổi transform-origin cho mobile */
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .consult-form {
        width: 94%;
        padding: 10px 14px;
        transform: scale(1); /* Giữ nguyên kích thước */
    }
    /* Scale nhẹ cho mobile rất nhỏ */
    @media (max-width: 380px) {
        .consult-form {
            transform: scale(0.95);
            width: 96%;
        }
    }

    @media (max-width: 320px) {
        .consult-form {
            transform: scale(0.9);
            width: 98%;
        }
    }

    .submit-btn {
        font-size: 0.85rem;
    }
}
/* Scale theo chiều cao màn hình (cho các màn hình ngắn) */
@media (max-height: 800px) {
    .consult-form {
        max-height: 85vh;
        overflow-y: auto;
        transform: scale(0.95);
    }
}

@media (max-height: 700px) {
    .consult-form {
        transform: scale(0.9);
        max-height: 80vh;
    }
}

@media (max-height: 600px) {
    .consult-form {
        transform: scale(0.85);
        max-height: 75vh;
    }
}
/* Kết hợp cả chiều rộng và chiều cao */
@media (max-width: 1200px) and (max-height: 700px) {
    .consult-form {
        transform: scale(0.8);
    }
}
/* TITLE */
.consult-form h3 {
    color: #1878e7;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6f0ff;
}
/* GRID */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 8px;
}
/* FORM GROUP */
.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group input,
    .form-group select {
        padding: 8px 12px; /* Giảm 10px xuống 8px (giảm 2px mỗi bên) */
        border-radius: 6px;
        border: 1px solid #1878e7;
        font-size: 0.95rem;
        box-sizing: border-box;
        height: 36px; /* Thêm chiều cao cố định*/
        line-height: 20px; /* Căn giữa text theo chiều dọc */
    }

    .form-group select {
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231878e7' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 10px 8px;
    }
        /* Focus state */
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #1878e7;
            box-shadow: 0 0 0 3px rgba(24,120,231,0.15);
        }
        /* Placeholder */
        .form-group input::placeholder,
        .form-group select:invalid {
            color: black;
        }
        /* 👉 HIỆU ỨNG KHI RÊ CHUỘT (HOVER) */
        .form-group input:hover,
        .form-group select:hover {
            border-color: blue;
            background-color: #f8fbff;
            box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.15);
            cursor: text; /* thể hiện rõ là ô nhập chữ */
        }
/* Full width */
.full-width {
    grid-column: 1 / -1;
}
/* CONSENT SECTION */
.consent-section {
    background: #f9fbff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.consent-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #1878e7;
    margin-top: 3px;
}

.consent-text {
    font-size: 0.85rem;
    color: #2c3e50;
    line-height: 1.4;
}
/* Links */
.consent-links {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
}

    .consent-links a {
        color: #1878e7;
        text-decoration: none;
    }

        .consent-links a:hover {
            color: #0d5bb5;
            text-decoration: underline;
        }
/* SUBMIT BUTTON */
.submit-group {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.submit-btn {
    background: #1878e7;
    color: white;
    font-weight: 700;
    border: none;
    padding: 8px 20px; /* Giảm 10px xuống 8px (giảm 2px mỗi bên) */
    border-radius: 6px;
    font-size: 0.9rem;
    width: 50%;
    min-width: 180px;
    max-width: 200px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 36px; /* Giảm từ 42px xuống 36px (-6px, nhưng giảm tổng thể 10px với padding) */
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 20px; /* Căn giữa text theo chiều dọc */
}

    .submit-btn:hover:not(:disabled) {
        background: #0d5bb5;
        transform: translateY(-1px);
    }

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
/* ERROR & SUCCESS */
.error-message {
    color: #ff4757;
    font-size: 0.75rem;
    margin-top: 3px;
    padding: 4px 6px;
    background: rgba(255, 71, 87, 0.08);
    border-radius: 4px;
    border-left: 2px solid #ff4757;
    display: none;
}

    .error-message.show {
        display: block;
    }

.success-message {
    color: #2ecc71;
    font-size: 0.8rem;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(46, 204, 113, 0.08);
    border-radius: 4px;
    text-align: center;
    display: none;
}

    .success-message.show {
        display: block;
    }
/*Hết CSS Đăng ký chính (Default)*/

/* ===== POPUP CHI TIẾT CHÍNH SÁCH ===== */
.privacy-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    color: white;
}

    .privacy-details-popup.show {
        display: block;
    }

.details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.details-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.details-header {
    background: linear-gradient(135deg, #1878e7, #0d5bb5);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .details-header h3 {
        color: white !important;
        margin: 0;
        font-size: 1.3rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .details-header h3 i {
            font-size: 1.2rem;
        }

.btn-close-details {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

    .btn-close-details:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.details-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.legal-info p {
    margin-bottom: 20px;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-points {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.point {
    display: flex;
    gap: 15px;
}

    .point i {
        color: #1878e7;
        font-size: 1.2rem;
        margin-top: 5px;
        flex-shrink: 0;
    }

    .point div {
        flex: 1;
    }

    .point strong {
        color: #1878e7;
        display: block;
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .point ul {
        margin: 0;
        padding-left: 20px;
        list-style-type: none;
    }

        .point ul li {
            position: relative;
            padding-left: 15px;
            margin-bottom: 6px;
            color: #555;
            font-size: 0.9rem;
            line-height: 1.4;
        }

            .point ul li:before {
                content: "•";
                position: absolute;
                left: 0;
                color: #1878e7;
                font-weight: bold;
            }

.legal-link {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

    .legal-link a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #1878e7;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: color 0.2s ease;
    }

        .legal-link a:hover {
            color: #0d5bb5;
            text-decoration: underline;
        }

.details-footer {
    padding: 20px 25px;
    background: #f9fbff;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.btn-understood {
    background: #1878e7;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

    .btn-understood:hover {
        background: #0d5bb5;
        transform: translateY(-1px);
    }
/* Responsive cho Popup */
@media (max-width: 768px) {
    .details-container {
        width: 95%;
        max-height: 85vh;
    }

    .details-header {
        padding: 15px 20px;
    }

        .details-header h3 {
            font-size: 1.15rem;
        }

    .details-content {
        padding: 20px;
    }

    .info-points {
        gap: 20px;
    }

    .point {
        flex-direction: column;
        gap: 10px;
    }

        .point i {
            align-self: flex-start;
        }
}

@media (max-width: 480px) {
    .details-container {
        width: 98%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .details-header {
        padding: 12px 15px;
    }

        .details-header h3 {
            font-size: 1.05rem;
        }

    .details-content {
        padding: 15px;
    }

    .details-footer {
        padding: 15px;
    }

    .btn-understood {
        padding: 8px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
}
/* Simple Consent Section Styling */
.simple-consent-section {
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
}

    .checkbox-item input[type="checkbox"] {
        display: none;
    }

.custom-checkbox {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #1878e7;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

    .custom-checkbox i {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 0.7rem;
        color: white;
        opacity: 0;
    }

.checkbox-item input[type="checkbox"]:checked + label .custom-checkbox {
    background: #1878e7; /*Màu nền checkbox*/
}

    .checkbox-item input[type="checkbox"]:checked + label .custom-checkbox i {
        opacity: 1;
    }

.checkbox-content {
    display: flex;
    flex-direction: column;
}

.checkbox-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.checkbox-desc {
    color: #666;
    font-size: 0.8rem;
}

.checkbox-item label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.consent-links {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    padding-left: 28px;
}

.details-link, .change-link {
    display: inline-flex;
    align-items: flex-end;
    gap: 5px;
    color: #1878e7;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

    .details-link:hover, .change-link:hover {
        color: #0d5bb5;
        text-decoration: underline;
    }

    .details-link i, .change-link i {
        font-size: 0.8rem;
    }
/*Hết Popup chi tiết chính sách bảo mật thông tin cá nhân*/
/*Chữ Chớp nháy chi tiết*/
/*CSS chính MasterPage*/
.blue-card {
    width: 100%;
    padding: 18px 24px;
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.5;
    background: linear-gradient(180deg, #6faee3, #3f87c5);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

    .blue-card.small {
        min-height: 90px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .blue-card.large {
        min-height: 80px;
        font-size: 1.15rem;
        font-weight: 500;
    }
/*Hết chữ Chớp nháy chi tiết*/

/*body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f8f9fa;
    color: #222;
}

/* Header */
header {
    background: #1878e7;
    color: #fff;
    padding: 0 0 10px 0;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 100px 0 100px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 123, 255, 0.45));
}

    .logo:hover {
        transform: scale(1.08);
        filter: drop-shadow(0 8px 20px rgba(0, 123, 255, 0.65));
    }


.header-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    flex: 1;
    padding-left: 30px;
}


.school-code {
    background: #ff3366;
    color: white;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 6px;
    margin-top: 3px;
}

    .school-code:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(255, 51, 102, 0.4);
        background: #ff1a5c;
        color: white;
    }

/* Banner */
.banner {
    position: relative;
    width: 100%;
    height: 380px;
    background: #dce9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.banner-content {
    position: absolute;
    left: 7%;
    top: 30%;
    color: #fff;
    text-shadow: 2px 2px 8px #222;
}

    .banner-content h1 {
        font-size: 2.2rem;
        font-weight: 700;
        margin-bottom: 12px;
    }

.btn-main {
    background: #1878e7;
    color: #fff;
    padding: 10px 24px;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
/* Menu */
.main-menu {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.menu-btn {
    background: linear-gradient(90deg, #0069ff, #2c8bff);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 115, 255, 0.35);
}

    .menu-btn:hover {
        background: #0056d4;
        transform: translateY(-3px);
    }

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #ffffff;
    min-width: 240px;
    top: 48px;
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 10px 24px rgba(0, 60, 145, 0.18);
    border: 1px solid #d7e7ff;
    z-index: 200;
}

    .dropdown-content a {
        display: block;
        padding: 12px 18px;
        color: #0056b3;
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        transition: 0.25s ease;
    }

        .dropdown-content a:hover {
            background: #007bff;
            color: #ffffff;
        }

.dropdown.show .dropdown-content {
    display: block;
}

/*Xổ xuống menu phiên bản Mobile*/
@media (max-width: 668px) {

    .dropdown-content-mobile {
        display: block !important;
        position: static !important;
        max-height: 0;
        overflow: hidden;
        background: #fff;
        border: 1px solid #e0e0e0;
        margin-top: 0px;
        border-radius: 8px;
        transition: max-height 0.35s ease;
    }

    .dropdown-mobile.active .dropdown-content-mobile {
        max-height: 480px; /* 🔥 chuẩn – không dư */
    }
}
/*Hết expand mobile*/


/* News Section */
.news-section {
    background: #fff;
    margin: 40px 0;
    padding: 24px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.06);
}

    .news-section h2 {
        color: #e60023;
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

.news-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.news-main {
    flex: 2;
    display: flex;
    flex-direction: column;
}

    .news-main img {
        width: 100%;
        border-radius: 10px;
    }

.news-main-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
}

.btn-view-all {
    margin-top: 14px;
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: 0.25s;
}

    .btn-view-all:hover {
        background: #005ecb;
        transform: translateY(-2px);
    }

.news-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-side-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    transition: 0.25s ease;
}

    .news-side-item img {
        width: 85px;
        height: 55px;
        object-fit: cover;
        border-radius: 6px;
    }

    .news-side-item strong {
        font-size: 15px;
        line-height: 1.3;
        display: block;
    }

    .news-side-item span {
        font-size: 13px;
        color: #666;
        margin-top: 4px;
        display: block;
    }

    .news-side-item:hover strong {
        color: #007bff;
    }
/*CSS Phân trang*/
.pagination {
    text-align: center;
    margin-top: 28px;
}

    .pagination a {
        display: inline-block;
        padding: 7px 14px;
        margin: 0 4px;
        border-radius: 6px;
        text-decoration: none;
        color: #007bff;
        border: 1px solid #c9dffc;
        font-size: 14px;
        transition: 0.25s;
    }

        .pagination a:hover, .pagination a.active {
            background: #007bff;
            color: #fff;
        }
/*Hết phân trang*/
/* Majors Section */
.majors-section {
    background: #fff0f2;
    margin: 0 0 30px 0;
    padding: 28px 40px 22px 40px;
    border-radius: 10px;
}

    .majors-section h2 {
        text-align: center;
        font-size: 26px;
        margin-bottom: 28px;
        color: #003f9e;
        font-weight: 700;
    }

.majors-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    padding: 0 20px;
}

.major-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: 0.35s ease;
    cursor: pointer;
    position: relative;
}

/* QUAN TRỌNG: Thêm overflow: hidden để ẩn phần ảnh phóng to */
.image-wrapper {
    overflow: hidden;
    position: relative;
}

    .image-wrapper img {
        width: 100%;
        height: 170px;
        object-fit: cover;
        transition: transform 0.35s ease;
        display: block;
    }

    /* ĐÚNG: Chỉ phóng to khi hover vào image-wrapper */
    .image-wrapper:hover img {
        transform: scale(1.08);
    }

.major-info {
    padding: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 1;
}

    /* Khi hover vào toàn bộ major-info */
    .major-info:hover {
        background-color: #f5f9ff;
        box-shadow: inset 0 0 0 1px #e0edff;
    }

        /* Khi hover vào major-info, tất cả p bên trong đổi màu */
        .major-info:hover p {
            color: #666; /* Màu chung cho tất cả p khi hover major-info */
        }

        /* Khi hover vào major-info, strong (dòng đầu) cũng đổi màu */
        .major-info:hover strong {
            color: #003399; /* Màu xanh đậm hơn khi hover major-info */
        }

    .major-info:active {
        background-color: #e8f1ff;
        transform: translateY(1px);
    }

    .major-info strong {
        font-size: 17px;
        color: blue;
        display: block;
        margin-bottom: 6px;
        transition: color 0.3s ease, background-color 0.3s ease;
        padding: 2px 4px;
        border-radius: 3px;
    }

        /* Khi hover trực tiếp vào strong (dòng đầu) */
        .major-info strong:hover {
            color: #cc0000 !important; /* Màu đỏ khi hover trực tiếp */
            background-color: #ffe6e6;
            font-weight: 600;
        }

    .major-info p {
        font-size: 14px;
        color: #444;
        transition: all 0.3s ease;
        margin-bottom: 5px;
        padding: 2px 4px;
        border-radius: 3px;
    }

        /* QUAN TRỌNG: Khi hover vào chính thẻ p, nó đổi màu khác và ghi đè màu từ .major-info:hover p */
        .major-info p:hover {
            color: blue !important; /* Màu nổi bật hơn khi hover trực tiếp */
            background-color: #e6f2ff;
            font-weight: 500;
        }



.major-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 22px rgba(0, 90, 180, 0.25);
}

.major-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,123,255,0.05), rgba(0,123,255,0.12));
    opacity: 0;
    transition: 0.35s ease;
}

.major-card:hover::after {
    opacity: 1;
}

/* Events Section */
.events-section {
    background: #fff;
    margin: 24px 0;
    padding: 22px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.05);
}

    .events-section h2 {
        text-align: center;
        font-size: 26px;
        margin-bottom: 28px;
        color: #003f9e;
        font-weight: 700;
    }

.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    padding: 0 20px;
}

.event-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.09);
    transition: 0.35s ease;
    cursor: pointer;
    position: relative;
}

    .event-card img {
        width: 100%;
        height: 165px;
        object-fit: cover;
        transition: 0.35s ease;
    }

    .event-card:hover img {
        transform: scale(1.08);
    }

.event-info {
    padding: 14px 16px;
}

    .event-info strong {
        font-size: 17px;
        color: #003f9e;
        display: block;
        margin-bottom: 6px;
    }

    .event-info p {
        font-size: 14px;
        color: #444;
        line-height: 1.45;
    }

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,108,218,0.25);
}

.event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,145,255,0.1), rgba(0,145,255,0.18));
    opacity: 0;
    transition: 0.35s ease;
}

.event-card:hover::after {
    opacity: 1;
}

/* Hiệu ứng logo chạy ngang (công ty đồng hành) */
.partners-section {
    text-align: center;
    margin: 50px 0;
}

    .partners-section h2 {
        font-size: 28px;
        margin-bottom: 20px;
        font-weight: bold;
    }

.partners-wrapper {
    width: 100%;
    padding: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.partners-list {
    display: flex;
    gap: 30px; /* Tăng khoảng cách giữa các ảnh */
    align-items: center;
    animation: scrollPartners 25s linear infinite;
    padding: 10px 0;
    flex-shrink: 0;
    will-change: transform; /* Tối ưu hiệu suất animation */
}

    .partners-list img {
        height: auto; /* Bỏ chiều cao cố định */
        max-height: 80px; /* Chỉ giới hạn chiều cao tối đa */
        width: auto; /* Chiều rộng tự động theo tỷ lệ thực */
        max-width: 180px; /* Giới hạn chiều rộng tối đa */
        object-fit: contain; /* Giữ tỷ lệ ảnh */
        transition: all 0.4s ease;
        cursor: pointer;
        filter: none; /* LOẠI BỎ hiệu ứng grayscale */
        opacity: 1; /* Đảm bảo ảnh sáng rõ */
    }

        /* Hiệu ứng khi hover */
        .partners-list img:hover {
            transform: scale(1.15);
            filter: brightness(1.05) drop-shadow(0 5px 15px rgba(0,0,0,0.15));
        }

.partners-wrapper:hover .partners-list {
    animation-play-state: paused;
}

/* Animation chính xác */
@keyframes scrollPartners {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-100% - 60px)); /* Tính toán chính xác với gap */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .partners-list {
        gap: 40px;
    }

        .partners-list img {
            max-height: 60px;
            max-width: 140px;
        }

    @keyframes scrollPartners {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-100% - 40px));
        }
    }
}

/* Footer */
.footer {
    background: #eef4fc;
    padding-top: 50px;
    color: #000;
    font-size: 15px;
}

.footer-container {
    width: 100%;
    /*margin: auto;*/
    display: grid;
    /* Tỷ lệ tương ứng: 30:23:14:33 ≈ 3:2.3:1.4:3.3 */
    grid-template-columns: 50% 30% 20%;
    gap: 5px;
    padding: 0 30px 50px;
    box-sizing: border-box;
}

.footer-column {
    line-height: 1.75;
    min-width: 0; /* Quan trọng: cho phép text wrap */
}

    /* Cột 1 (địa chỉ) - rộng nhất */
    .footer-column:nth-child(1) {
        max-width: 100%;
    }

    /* Cột 2 (liên hệ) - vừa */
    .footer-column:nth-child(2) {
        max-width: 100%;
    }

    /* Cột 3 (liên kết) - hẹp nhất */
    .footer-column:nth-child(3) {
        max-width: 100%;
    }

    /* Cột 4 (MXH) - vừa */
    .footer-column:nth-child(4) {
        max-width: 100%;
    }

    .footer-column strong {
        font-size: 16px;
        color: #003a9b;
        display: block;
        margin-bottom: 12px;
    }

    .footer-column a {
        text-decoration: none;
        color: #000;
        transition: .3s;
        display: block;
        margin: 6px 0;
    }

        .footer-column a:hover {
            color: #0066ff;
            transform: translateX(4px);
        }

.social-icons {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 15px;
}

    .social-icons a {
        display: inline-block;
        transition: all 0.3s ease;
    }

    .social-icons img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 8px;
        transition: all 0.35s ease;
        filter: brightness(0.8);
        cursor: pointer;
        border: 2px solid transparent;
    }

        .social-icons img:hover {
            transform: scale(1.15) translateY(-2px);
            filter: brightness(1);
            box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
            border-color: #0066ff;
        }

.footer-bottom {
    background: #0066ff;
    text-align: center;
    padding: 14px 0;
    color: white;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên tablet */
    }

    .footer-column:nth-child(1),
    .footer-column:nth-child(2),
    .footer-column:nth-child(3),
    .footer-column:nth-child(4) {
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; /* 1 cột trên mobile */
        gap: 30px;
        padding: 0 20px 40px;
    }

    .footer {
        padding-top: 40px;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .header-top, .banner, .news-section, .majors-section, .events-section, .partners-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .banner-img {
        width: 100%;
    }

    .main-menu {
        flex-direction: column;
        gap: 8px;
    }

    .majors-list, .events-list, .partners-list {
        flex-direction: column;
        gap: 14px;
    }

    .major-card, .event-card {
        width: 100%;
    }

    .footer-container {
        display: grid;
        /* Tự động co giãn hoàn toàn theo nội dung */
        grid-template-columns: repeat(4, auto);
        gap: 30px;
        justify-content: space-between;
    }

    /* Đảm bảo các cột không bị tràn */
    .footer-column {
        min-width: 0;
        max-width: 300px;
    }

        /* Cột đầu tiên (nhiều text nhất) được ưu tiên rộng hơn */
        .footer-column:first-child {
            max-width: 350px;
        }

        /* Cột thứ 3 (ít text nhất) hẹp hơn */
        .footer-column:nth-child(3) {
            max-width: 200px;
        }
}

@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons img {
        margin: 8px;
    }
}


/*CSS cho mobile*/

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-top {
        flex-direction: column;
        padding: 10px 20px;
        text-align: center;
        gap: 15px;
    }

    .header-title {
        color: white;
        font-size: calc(0.5rem + 0.5vw); /* Tự động thay đổi theo chiều rộng viewport */
        flex: 1;
        padding-left: 10px;
    }
    /*lớn nhỏ logo mobile*/
    .logo {
        width: 100px;
        height: 160px;
        order: 0;
    }

    .header-code {
        order: 3;
        margin-top: 10px;
    }

    /* Banner Mobile - FIXED LAYOUT */
    .banner {
        height: auto;
        flex-direction: column;
        position: relative;
        padding-bottom: 0;
    }

    .banner-img {
        height: 200px;
        object-fit: cover;
    }

    .banner-content {
        position: relative;
        left: 0;
        top: 0;
        text-align: center;
        padding: 20px 15px;
        background: rgba(24, 120, 231, 0.9);
        width: 100%;
        border-radius: 0;
        margin-bottom: 0;
    }

        .banner-content h1 {
            font-size: 1.4rem;
            margin-bottom: 15px;
            text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        }

    .boxaydung {
        color: white;
        font-size: calc(0.5rem + 0.5vw); /* Tự động thay đổi theo chiều rộng viewport */
        flex: 1;
        padding-left: 10px;
    }


    /* FORM ĐĂNG KÝ TƯ VẤN - FIXED POSITION */
    .consult-form {
        position: relative;
        right: 0;
        top: 0;
        width: 90%;
        margin: 0 auto;
        padding: 20px;
        background: rgba(255,255,255,0.95);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 10px;
        transform: translateY(-20px);
        z-index: 10;
    }

    /* Menu Mobile */
    .main-menu {
        flex-direction: column;
        gap: 8px;
        padding: 25px 15px 15px;
        margin: 0;
        background: #fff;
        border-radius: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .menu-btn {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 15px;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #e0e0e0;
        margin-top: 5px;
        border-radius: 8px;
        overflow: hidden;
    }

        .dropdown-content a {
            padding: 12px 15px;
            font-size: 14px;
            border-bottom: 1px solid #f5f5f5;
        }

            .dropdown-content a:last-child {
                border-bottom: none;
            }

    /* News Section Mobile */
    .news-section {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .news-container {
        flex-direction: column;
        gap: 20px;
    }

    .news-side-item {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

        .news-side-item img {
            width: 80px !important;
            height: 60px;
            margin-bottom: 0;
            flex-shrink: 0;
        }
    /*Nút X trang chi tiết chính sách*/
    .close-x {
        color: #1878e7;
        font-size: 22px;
        font-weight: bold;
        cursor: pointer;
        line-height: 1;
        transition: color 0.2s ease, transform 0.2s ease;
    }

        .close-x:hover {
            color: #0d5bb5;
            transform: rotate(90deg);
        }


    /* Majors Section Mobile */
    .majors-section {
        padding: 20px 15px;
    }

    .majors-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }

    .major-card {
        margin-bottom: 0;
    }

    /* Events Section Mobile */
    .events-section {
        padding: 20px 15px;
    }

    .events-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
    }

    /* Partners Section Mobile */
    .partners-section {
        margin: 30px 0;
        padding: 0 15px;
    }

    .partners-list {
        gap: 25px;
    }

        .partners-list img {
            height: 60px;
        }

    /* Footer Mobile */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px 30px;
        text-align: center;
    }

    .footer-column {
        width: 100% !important;
    }

    .social-icons {
        justify-content: center;
        margin-top: 15px;
    }

    /* Pagination Mobile */
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

        .pagination a {
            padding: 8px 12px;
            font-size: 13px;
        }
}

@media (max-width: 480px) {
    /* Small Mobile */
    .header-title {
        font-size: 0.95rem;
    }

    .banner {
        height: auto;
    }

    .banner-img {
        height: 180px;
    }

    .banner-content h1 {
        font-size: 1.2rem;
    }

    .btn-main {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .consult-form {
        width: 95%;
        padding: 15px;
        transform: translateY(-15px);
    }

        .consult-form h3 {
            font-size: 1.1rem;
            margin-bottom: 10px;
        }

    .news-section h2,
    .majors-section h2,
    .events-section h2 {
        font-size: 1.3rem;
    }

    .partners-list img {
        height: 50px;
    }

    .footer {
        padding-top: 30px;
    }

    .main-menu {
        padding: 20px 10px 10px;
    }

    .menu-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* ===== TOUCH FRIENDLY FOR MOBILE ===== */
@media (hover: none) {
    .menu-btn:hover,
    .btn-main:hover,
    .btn-view-all:hover,
    .major-card:hover,
    .event-card:hover {
        transform: none;
    }

    .dropdown-content {
        display: none;
    }

    .dropdown.show .dropdown-content {
        display: block;
    }
}

/* ===== MOBILE MENU IMPROVEMENTS ===== */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
    }

    /* Improved dropdown animation */
    .dropdown-content {
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }

    .dropdown.show .dropdown-content {
        max-height: 400px;
    }
}

/* ===== IMPROVED MOBILE LAYOUT ===== */
@media (max-width: 768px) {
    /* Better spacing */
    section {
        margin: 15px 0;
    }

    /* Improved typography for mobile */
    h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    /* Better touch targets */
    .menu-btn,
    .btn-main,
    .btn-view-all,
    .pagination a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Improved images for mobile */
    .major-card img,
    .event-card img,
    .news-main img {
        height: 150px;
    }

    /* Better form inputs for mobile */
    .consult-form input {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        margin-bottom: 10px;
    }

    /* Form button styling */
    .consult-form button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        color: white;
    }
}

/* ===== FIX Z-INDEX ISSUES ===== */
@media (max-width: 768px) {
    .banner {
        z-index: 1;
    }

    .consult-form {
        z-index: 2;
    }

    .main-menu {
        z-index: 3;
        position: relative;
    }
}
/* ===== MOBILE HEADER HORIZONTAL LAYOUT ===== */
@media (max-width: 768px) {
    .header-top {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        gap: 15px;
        flex-wrap: nowrap;
    }


    .header-title {
        flex: 1;
        text-align: center;
        font-size: 0.9rem;
        line-height: 1.3;
        padding-left: 0;
        margin: 0;
    }

    .header-code {
        flex-shrink: 0;
        text-align: center;
        padding: 8px 10px;
    }

        .header-code span {
            font-size: 0.75rem;
            display: block;
            margin-bottom: 4px;
        }

    .school-code {
        padding: 4px 10px;
        font-size: 0.85rem;
        margin-top: 2px;
    }
}

/* ===== SMALL MOBILE OPTIMIZATION ===== */
@media (max-width: 480px) {
    .header-top {
        padding: 10px 12px;
        gap: 12px;
    }



    .header-title {
        font-size: 0.8rem;
        line-height: 1.25;
    }

    .header-code {
        padding: 6px 8px;
    }

        .header-code span {
            font-size: 0.7rem;
        }

    .school-code {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 360px) {
    .header-top {
        padding: 8px 10px;
        gap: 10px;
    }



    .header-title {
        font-size: 0.75rem;
    }

    .header-code {
        padding: 5px 6px;
    }

        .header-code span {
            font-size: 0.65rem;
        }

    .school-code {
        padding: 2px 6px;
        font-size: 0.75rem;
    }
}

/* ===== TABLET OPTIMIZATION ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-top {
        padding: 1px 60px 0 60px;
    }

    .header-title {
        font-size: 1.2rem;
    }
}
/* ===== MOBILE PARTNERS CAROUSEL - HORIZONTAL FIX ===== */
@media (max-width: 768px) {
    .partners-section {
        margin: 30px 0;
        padding: 0 15px;
        overflow: hidden;
    }

    .partners-wrapper {
        overflow: hidden;
        position: relative;
        width: 100%;
        margin-top: 20px;
    }

    .partners-list {
        display: flex;
        flex-direction: row; /* Đảm bảo theo chiều ngang */
        flex-wrap: nowrap; /* Không xuống dòng */
        gap: 25px;
        align-items: center;
        animation: scrollPartnersMobile 20s linear infinite;
        padding: 10px 0;
        width: max-content; /* Chiều rộng tự động theo nội dung */
    }

        .partners-list a {
            display: inline-block;
            flex-shrink: 0; /* Không bị co lại */
        }

        .partners-list img {
            height: 50px;
            width: auto;
            flex-shrink: 0;
            transition: transform 0.3s ease, filter 0.3s ease;
        }

    /* Pause on hover */
    .partners-wrapper:hover .partners-list {
        animation-play-state: paused;
    }

    /* Hover effect */
    .partners-list img:hover {
        transform: scale(1.15);
        filter: brightness(1.2);
    }
}

/* ===== SMALL MOBILE OPTIMIZATION ===== */
@media (max-width: 480px) {
    .partners-section {
        margin: 25px 0;
        padding: 0 12px;
    }

    .partners-list {
        gap: 20px;
        animation-duration: 18s;
    }

        .partners-list img {
            height: 45px;
        }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 360px) {
    .partners-list {
        gap: 15px;
        animation-duration: 16s;
    }

        .partners-list img {
            height: 40px;
        }
}

/* ===== KEYFRAMES FOR MOBILE ===== */
@keyframes scrollPartnersMobile {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ===== ENHANCED VISUALS FOR MOBILE ===== */
@media (max-width: 768px) {
    .partners-list img {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background: #fff;
        padding: 5px;
    }
}

.btn-main {
    background: #1878e7;
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

    /* Hiệu ứng hover cho desktop */
    .btn-main:hover {
        background: #145cb3;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(24, 120, 231, 0.4);
    }

/* Hiệu ứng cho mobile (touch devices) */
@media (max-width: 768px) {
    .btn-main {
        width: 90%;
        max-width: 280px;
        padding: 14px 32px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin: 15px auto;
    }

        /* Hiệu ứng khi chạm trên mobile */
        .btn-main:active {
            background: #0f4a8f;
            transform: scale(0.98);
            box-shadow: 0 3px 8px rgba(24, 120, 231, 0.3);
        }

        /* Hiệu ứng ripple cho mobile */
        .btn-main::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.3s, height 0.3s;
        }

        .btn-main:active::after {
            width: 100px;
            height: 100px;
        }
}

/* Hiệu ứng cho tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .btn-main {
        padding: 13px 26px;
        font-size: 1.05rem;
    }
}

/* Đảm bảo nút luôn căn giữa */
.banner-content {
    text-align: center;
}

/* Thêm hiệu ứng loading khi click */
.btn-main.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .btn-main.loading::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid transparent;
        border-top: 2px solid #fff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/*Hết Mobile*/
/*Hiển thị báo lỗi trên form đăng ký tư vấn */
.field-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.25rem;
}

.success-message {
    color: #065f46;
    font-size: 0.875rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 0.375rem;
    text-align: center;
}

.hidden {
    display: none;
}

.border-red-500 {
    border-color: #ef4444 !important;
}

.bg-red-50 {
    background-color: #fef2f2 !important;
}

.border-green-500 {
    border-color: #10b981 !important;
}

.bg-green-50 {
    background-color: #ecfdf5 !important;
}

.input-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.consult-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fa-spinner {
    margin-right: 0.5rem;
}
/*Hết báo lỗi*/

/*Chọn ngành quan tâm*/

/* Thêm CSS cho modal và toast */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
}

    .close:hover {
        color: #dc2626;
    }

.form-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1100;
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/*Hết chọn ngành quan tâm*/


/* ===== Thanh liên hệ cuối trang ===== */
.contact-bar {
    position: fixed;
    right: 12px; /* Áp sát lề phải */
    bottom: 5%; /* Cách đáy trang */
    display: flex;
    flex-direction: column; /* XẾP DỌC */
    align-items: flex-end; /* Canh phải */
    gap: 10px; /* Khoảng cách nút trên – dưới */
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.35s ease;
}
    /* Ẩn khi cần */
    .contact-bar.hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(20px);
    }
    /* ===== Nút chung ===== */
    .contact-bar a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 50px; /* kích thước nút zalo, điện thoại */
        padding: 15px 20px;
        border-radius: 999px;
        font-weight: 600;
        font-size: 14px;
        color: #ffffff;
        text-decoration: none;
        white-space: nowrap;
        box-shadow: 0 10px 22px rgba(0,0,0,0.25);
        animation: shake 1.3s infinite;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 8px;
        position: relative;
        overflow: hidden;
    }

        /* Hiệu ứng hover chung */
        .contact-bar a:hover {
            transform: translateX(-8px) scale(1.08);
            box-shadow: 0 16px 36px rgba(0,0,0,0.35);
            animation-play-state: paused; /* Dừng animation khi hover */
        }

        /* Hiệu ứng overlay khi hover */
        .contact-bar a::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.6s ease;
        }

        .contact-bar a:hover::before {
            left: 100%;
        }

/* ===== Nút Đăng ký ngay ===== */
.contact-register {
    background: linear-gradient(135deg, #ff3366, #ff1a5c);
    animation: pulse 1.5s infinite, float 3s ease-in-out infinite;
}

    .contact-register::before {
        content: "📝";
        font-size: 16px;
        margin-right: 5px;
        transition: transform 0.3s ease;
    }

    .contact-register:hover::before {
        transform: rotate(15deg) scale(1.2);
    }

    /* Hiệu ứng đặc biệt cho nút đăng ký khi hover */
    .contact-register:hover {
        /*background: linear-gradient(135deg, #ff1a5c, #e6004c);*/
        background: linear-gradient(135deg, #1877f2, #25d366);
        box-shadow: 0 12px 30px rgba(255, 51, 102, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.8);
    }

/* ===== Zalo ===== */
.contact-zalo {
    background: #0068ff;
}

    .contact-zalo img {
        width: 12px;
        height: 12px;
        transition: all 0.3s ease;
        filter: brightness(1);
    }

    .contact-zalo:hover {
        background: linear-gradient(135deg, #005ce6, #0047b3);
    }

        .contact-zalo:hover img {
            transform: rotate(10deg) scale(1.3);
            filter: brightness(1.2) drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
        }

/* ===== Gọi điện ===== */
.contact-phone {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

    .contact-phone::before {
        content: "📞";
        font-size: 16px;
        margin-right: 5px;
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .contact-phone:hover {
        background: linear-gradient(135deg, #1877f2, #25d366);
    }

        .contact-phone:hover::before {
            transform: translateY(-2px) rotate(-15deg);
            animation: ring 0.5s ease;
        }

/* ===== Hiệu ứng rung ===== */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }

    100% {
        transform: translateX(0);
    }
}

/* ===== Hiệu ứng nhấp nháy cho nút đăng ký ===== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 51, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0);
    }
}

/* ===== Hiệu ứng nổi lên ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ===== Hiệu ứng chuông reo ===== */
@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

/* ===== Hiệu ứng text glow khi hover ===== */
.contact-bar a:hover {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

/* ===== Hiệu ứng riêng cho từng nút khi hover ===== */
.contact-register:hover {
    letter-spacing: 1px;
    padding: 15px 22px;
}

.contact-zalo:hover {
    letter-spacing: 0.8px;
}

.contact-phone:hover {
    letter-spacing: 0.8px;
}

/* ===== Responsive cho mobile ===== */
@media (max-width: 768px) {
    .contact-bar {
        right: 8px;
        bottom: 10%;
        gap: 8px;
    }

        .contact-bar a {
            padding: 12px 16px;
            font-size: 13px;
            min-width: 45px;
        }

            .contact-bar a:hover {
                transform: translateX(-4px) scale(1.05);
            }

    /* Giảm hiệu ứng trên mobile để tiết kiệm pin */
    .contact-register {
        animation: pulse 2s infinite;
    }
}

/*Nội dung Heaad chính (Trên cùng)*/
/* ===== HEADER CHÍNH ===== */
.header-top {
    background-color: #1878e7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 4vw, 40px);
    gap: 24px;
    border-radius: 10px;
    padding: 6px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* ================== CỘT TRÁI ================== */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.logo {
    height: clamp(100px, 9vw, 1300px);
    width: auto;
}

.school-text {
    line-height: 1.3;
    white-space: nowrap;
}

.ministry {
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 900;
}

.school-name {
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 700;
    text-transform: uppercase;
}
/* ================== CỘT GIỮA ================== */
.header-center {
    flex: 1;
    text-align: center;
    font-weight: 800;
    color: #ffeb3b;
    line-height: 1.35;
    font-size: clamp(16px, 1.8vw, 22px);
    white-space: nowrap; /* ❗ KHÔNG RỚT DÒNG */
}
/* ================== CỘT PHẢI ================== */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

/* KHUNG MÃ TRƯỜNG */
.school-code-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 6px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-align: center;
}

.code-label {
    font-size: 13px;
    font-weight: 600;
    color: #1878e7;
    back
}

.school-code {
    font-size: clamp(13px, 2.2vw, 17px);
    font-weight: 900;
    background-color: red;
    color: white;
    letter-spacing: 2px;
    border-radius: 5px;
    padding: 2px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-align: center;
}

/* ĐỊA CHỈ */
.address {
    font-size: clamp(16px, 1.1vw, 17px);
    line-height: 1.4;
    text-align: center;
    max-width: 450px;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 992px) {
    .header-center {
        white-space: normal; /* cho phép xuống dòng có kiểm soát */
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 12px;
    }

    .school-text {
        white-space: normal;
        text-align: left;
    }

    .header-center {
        text-align: center;
    }
}
/* ===== HIỆU ỨNG ÁNH SÁNG LƯỚT QUA HEADER ===== */
.header-top {
    position: relative;
    overflow: hidden;
}

    /* DẢI ÁNH SÁNG */
    .header-top::after {
        content: "";
        position: absolute;
        top: 0;
        left: -120%;
        width: 60%;
        height: 100%;
        background: linear-gradient( 120deg, transparent, rgba(255, 255, 255, 0.28), transparent );
        pointer-events: none;
    }

    /* CHỈ KHI CÒN CHUỘT → CHẠY VÔ HẠN */
    .header-top:hover::after {
        animation: headerLightSweep 1.6s linear infinite;
    }

/* KEYFRAMES */
@keyframes headerLightSweep {
    from {
        left: -120%;
    }

    to {
        left: 120%;
    }
}
/*Hết nội dung Heaad chính (Trên cùng)*/

/* Ẩn thanh modern-scroll-nav trên mobile (Thanh trượt điều hướng mới)*/
@media (max-width: 768px) {
    .modern-scroll-nav {
        display: none !important;
    }
}
/* Ẩn thanh modern-scroll-nav trên mobile (Thanh truy cập nhanh ngang)*/
@media (max-width: 768px) {
    .info-cards {
        display: none !important;
    }
}