* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f4f8fc;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
header {
    background-color: #064579;
    color: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    position: relative;
    display: flex;
    flex-wrap: nowrap;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 75px;
    height: 75px;
    margin-bottom: -75px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
    margin-left: 90px;
}

.slogan {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-left: 90px;
}

.hamburger {
    display: block;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hamburger:hover {
    color: #fcb54a;
}

.main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 20%;
    height: 100%;
    background-color: #064579;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    margin-left: 0;
}

.main-nav.active {
        left: 0;
    }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    padding: 20px;
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #f7a01a;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 6px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    width: 360px;
    max-width: 100%;
    margin-left: auto;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 6px;
    min-width: 0;
}

.search-bar button {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #064579;
    cursor: pointer;
}

.search-bar button:hover {
    color: #f7a01a;
}

.search-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

.search-bar input:focus {
    outline: none;
    box-shadow: none;
}

/* ===== OVERLAYS ===== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* ===== MAIN CONTENT ===== */
main {
    flex-grow: 1;
}

.hero-section {
    background-color: #e3f0ff;
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    text-align: left;
    flex-wrap: wrap;
}

.hero-content {
    max-width: 40%;
}

.hero-content h1 {
    font-size: 3rem;
    color: #064579;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
}

.cta-buttons button {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-primary {
    background-color: #f7a01a;
    color: white;
}

.cta-primary:hover {
    background-color: #e08e0b;
    transform: translateY(-2px);
}

.cta-secondary {
    background-color: #064579;
    color: white;
}

.cta-secondary:hover {
    background-color: #043b66;
    transform: translateY(-2px);
}

.hero-image {
    max-width: calc(100vw - 65%);
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

/* ===== COURSES SECTION ===== */
.section-courses {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-courses h2 {
    font-size: 2.2rem;
    color: #064579;
    text-align: center;
    margin-bottom: 40px;
}

.carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 50px;
    overflow: hidden;
}

.carousel-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.course-card {
    flex: 0 0 calc(100% / 3 - 20px);
    margin: 0 10px;
    max-width: calc(100% / 3 - 20px);
    box-sizing: border-box;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    cursor: grab;
}

.course-card:active {
    cursor: grabbing;
}

.course-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.course-card h3 {
    font-size: 1.3rem;
    color: #064579;
    margin-bottom: 10px;
}

.course-card .description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-detail {
    background-color: #f7a01a;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: auto;
}

.btn-detail:hover {
    background-color: #e08e0b;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #064579;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
}

.carousel-button:hover {
    background-color: #043b66;
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

/* ===== BENEFITS SECTION ===== */
.section-benefits {
    padding: 60px 20px;
    background-color: #e3f0ff;
    text-align: center;
}

.section-benefits h2 {
    font-size: 2.2rem;
    color: #064579;
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-item {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.benefit-item i {
    color: #f7a01a;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.benefit-item:hover i {
    transform: scale(1.1);
}

.benefit-item h3 {
    font-size: 1.4rem;
    color: #064579;
    margin-bottom: 15px;
}

.benefit-item p {
    font-size: 1rem;
    color: #555;
}

/* ===== FOOTER ===== */
footer {
    background-color: #064579;
    color: white;
    padding: 20px 32px;
    text-align: center;
    margin-top: auto;
}

/* ===== LINKS ===== */
a {
    color: #064579;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #064579;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.notification.success {
    background-color: #4CAF50;
}

.notification.error {
    background-color: #dc3545;
}

/* ===== CONFIRMATION & ALERT BOXES ===== */
.confirmation-overlay, .alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.confirmation-box, .alert-box {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
}

.confirmation-box.show, .alert-box.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.confirmation-box.hide, .alert-box.hide {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
}

.confirmation-box h3, .alert-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.confirmation-box p, .alert-box p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 25px;
}

.confirmation-box h3 {
    color: #064579;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.button-group button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 100px;
}

.button-group .confirm-button {
    background-color: #f7a01a;
    color: white;
}

.button-group .confirm-button:hover {
    background-color: #e08e0b;
    transform: translateY(-1px);
}

.button-group .cancel-button, .alert-ok-button {
    background-color: #064579;
    color: white;
}

.button-group .cancel-button:hover, .alert-ok-button:hover {
    background-color: #043b66;
    transform: translateY(-1px);
}

/* Alert box specific styles */
.alert-box.success h3 { color: #4CAF50; }
.alert-box.error h3 { color: #dc3545; }
.alert-box.warning h3 { color: #f7a01a; }
.alert-box.info h3 { color: #007bff; }

.alert-box.error .alert-ok-button {
    background-color: #dc3545;
}

.alert-box.error .alert-ok-button:hover {
    background-color: #c82333;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #cce0f7;
    text-align: center;
}

table th {
    background-color: #e3eefe;
    color: #005fa3;
    font-weight: 700;
}

table tr:nth-child(even) td {
    background-color: #f8f9fc;
}

table tr:hover td {
    background-color: #eef2ff;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    header {
        padding: 10px 20px 25px;
        justify-content: center;
    }

    .header-left, .search-bar {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .search-bar {
        order: 3;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
    }

    .hero-content, .hero-image {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-image img {
        max-width: 100%;
        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .cta-buttons button {
        width: 100%;
    }

    .section-courses {
        padding: 40px 0;
    }

    .course-card {
        flex: 0 0 calc(100% / 2 - 20px);
        max-width: calc(100% / 2 - 20px);
    }

    .section-benefits {
        padding: 40px 20px;
    }

    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .main-nav {
        width: 60%;
    }

    .carousel-wrapper {
        padding: 0 20px;
    }

    .carousel-button {
        padding: 8px 16px;
        font-size: 1rem;
    }
}

/* Mobile search specific */
@media (max-width: 767px) {
    .search-bar {
        width: 100%;
        max-width: 100%;
        margin: 10px 0 0 0;
        border-radius: 20px;
        display: none;
    }

    .search-bar.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .search-bar input {
        font-size: 0.95rem;
        padding: 8px 6px;
    }

    .search-bar button {
        font-size: 1.15rem;
        color: #064579;
    }

    .search-toggle {
        display: block;
        position: absolute;
        right: 15%;
        top: 15%;
        z-index: 1002;
    }

    header.search-open .header-left,
    header.search-open .hamburger,
    header.search-open .search-toggle,
    header.search-open .logo,
    header.search-open .slogan {
        display: none !important;
    }
}

/* Small screen adjustments */
@media (max-width: 450px) {
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }

    .course-card {
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.notification.error {
    background-color: #dc3545;
}

.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Nền đen mờ hơn một chút */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Cao hơn cả overlay cho mobile nav */
    opacity: 1;
}

/* Hộp thông báo chính */
.confirmation-box {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 90%;
    text-align: center;
    
    /* Thiết lập chuyển động ban đầu (Ẩn) */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
}

/* Hiệu ứng hiện (Show) */
.confirmation-box.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Hiệu ứng ẩn (Hide) */
.confirmation-box.hide {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
}

.confirmation-box h3 {
    font-size: 1.5rem;
    color: #064579; /* Màu xanh đậm */
    margin-bottom: 15px;
}

.confirmation-box p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 25px;
}

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

.confirmation-buttons button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 100px;
}

/* Nút Đồng ý (Confirm - True) */
.confirmation-buttons .confirm-button {
    background-color: #f7a01a; /* Màu cam chính */
    color: white;
}

.confirmation-buttons .confirm-button:hover {
    background-color: #e08e0b;
    transform: translateY(-1px);
}

/* Nút Hủy (Cancel - False) */
.confirmation-buttons .cancel-button {
    background-color: #6c757d; /* Màu xám trung tính */
    color: white;
}

.confirmation-buttons .cancel-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Responsive adjustment for small screens */
@media (max-width: 450px) {
    .confirmation-buttons {
        flex-direction: column;
    }
    .confirmation-buttons button {
        width: 100%;
    }
}

.alert-box {
    padding-bottom: 20px; /* Thêm padding dưới cho nút */
}

/* Định dạng các loại thông báo */
.alert-box.success h3 {
    color: #4CAF50; /* Xanh lá */
}

.alert-box.error h3 {
    color: #dc3545; /* Đỏ */
}

.alert-box.warning h3 {
    color: #f7a01a; /* Cam của bạn */
}

.alert-box.info h3 {
    color: #007bff; /* Xanh dương */
}

.alert-button-container {
    margin-top: 20px;
}

.alert-ok-button {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    min-width: 120px;
    background-color: #064579; /* Màu xanh chính */
    color: white;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.alert-ok-button:hover {
    background-color: #043b66;
    transform: translateY(-1px);
}

/* Thêm màu cho nút OK tùy theo type (tùy chọn) */
.alert-box.error .alert-ok-button {
    background-color: #dc3545;
}
.alert-box.error .alert-ok-button:hover {
    background-color: #c82333;
}