/* --- 1. Thiết lập Chung (Reset & Fonts) --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
:root {
--primary-color: #5b8cff;
    --secondary-color: #2ECC71;
    --text-color: #334155;
    --bg-body: #f4f7fa; /* ĐÂY LÀ MÀU NỀN DUY NHẤT CHO TOÀN BỘ WEB */
    --white: #ffffff;
    --padding-section: 90px 0;
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
    --border-radius-xl: 20px;
    --border-radius-lg: 12px;
    /* Thông số kính mờ */
    --glass-bg: rgba(255, 255, 255, 0.75); 
    --glass-border: rgba(255, 255, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: inherit; 
}

body {
    margin: 0;
    display: flex;
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    /* Nền Gradient mượt mà, chiều sâu như bầu trời */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed; /* Giữ nền cố định khi cuộn */
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    flex-direction: column;
    margin: 0;
}

body::before, body::after {
    display: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: var(--padding-section);
}

.bg-light {
    background-color: var(--light-bg);
    background-size: 20px 20px;
}

h2 {
    text-align: center;
    margin-bottom: 45px; 
    font-size: 2.4em;
    color: var(--text-color);
    font-weight: 900;
}

.course-card, 
.about-text, 
.teacher-card, 
.table-container, 
.test-container, 
.contact-flex > div
 {
    background: rgba(255, 255, 255, 0.7) !important; /* Độ trong suốt */
    backdrop-filter: blur(12px) saturate(180%); /* Hiệu ứng mờ chân thực */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4); /* Viền kính */
    border-radius: var(--border-radius-xl);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1); /* Đổ bóng nhẹ */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.usp-item:hover, 
.about-item:hover, 
.course-card:hover, 
.teacher-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
}

/* --- 2. HEADER & NAVIGATION --- */
header {
    background: #334155 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.header-logo-img {
    height: 40px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--white);
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

.cta-nav {
    background-color: var(--secondary-color);
    color: var(--white) !important;
    padding: 10px 22px;
    border-radius: var(--border-radius-lg); 
    font-weight: 700;
    display: inline-block;
}

.cta-nav:hover {
    background-color: #26a864;
}

.menu-toggle {
    color: var(--white); 
    font-size: 1.8em;
    cursor: pointer;
    transition: color 0.3s;
}

.menu-toggle:hover {
    color: var(--primary-color);
}

/* --- 3. HERO SECTION --- */
#hero {
    background:
                url('../images/Free\ \ Red\,\ Christmas\,\ Lantern\ Background\ Images\,\ Christmas\ Poster\ Background\ Photo\ Background\ PNG\ and\ Vectors.jpg') no-repeat center center/cover;
    padding: 100px 0;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    min-height: 800px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; 
    align-items: center;
    gap: 40px;
    min-height: 450px;
}

.hero-teacher-img {
    width: 200px;
    height: 200px; 
    border-radius: 50%;
    border: 5px solid var(--white);
    margin: 0 auto 20px auto;
    background: url('../images/avatar.jpg') no-repeat center center/cover;
}

.hero-content {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px); /* Làm mờ nhẹ nền phía sau */
    padding: 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

#hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: none;
    font-weight: 900;
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-color);
}

.hero-content .small-text {
    margin-top: 15px;
    font-size: 1em;
    font-style: italic;
    color: #6c757d;
}

.hero-image-col {
    content: '';
    width: 600px; 
    height: 600px;
    background: url('../images/test-of-english-as-a-foreign-language-toefl-learning-course-english-as-a-second-or-foreign-language-english-019e4ca1bb2e32ff139223afd5f5af80.png') no-repeat center center; 
    background-size: cover;

    z-index: 1;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 30px;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
    animation: floating 3s ease-in-out infinite;
}

.hero-image::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
    border-radius: 50%;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-card-body { padding: 20px; flex-grow: 1; }
.blog-category { color: #5b8cff; font-size: 0.8em; font-weight: bold; text-transform: uppercase; }
.blog-title { font-size: 1.2em; margin: 10px 0; color: #333; line-height: 1.4; }
.blog-time { color: #888; font-size: 0.8em; margin-bottom: 15px; }
.blog-excerpt { color: #666; font-size: 0.9em; line-height: 1.6; }
.btn-readmore { 
    display: inline-block; margin-top: 15px; color: #5b8cff; 
    text-decoration: none; font-weight: bold; font-size: 0.9em; 
}

.post-full-content img {
    max-width: 100%; /* Đảm bảo ảnh không to quá khung */
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    display: block;
}
.post-full-content iframe { /* Nếu bạn có chèn video youtube */
    width: 100%;
    height: 450px;
    border-radius: 10px;
}

#postModal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    overflow-y: auto;
}

.modal-container {
    background: white; 
    width: 95%; 
    max-width: 800px; 
    margin: 30px auto; /* Cách trên dưới 30px */
    border-radius: 15px; 
    position: relative; 
    padding: 30px;
    box-sizing: border-box;
}

/* Nút đóng modal */
.close-btn {
    position: sticky; /* Giữ nút đóng luôn ở trên khi cuộn */
    top: 0;
    float: right;
    font-size: 35px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

/* Tối ưu nội dung bên trong bài viết */
.post-full-content {
    line-height: 1.8;
    color: #333;
    word-wrap: break-word; /* Chống tràn chữ */
}

.post-full-content img {
    max-width: 100% !important; /* Quan trọng: Ảnh không bao giờ tràn màn hình */
    height: auto !important;
    border-radius: 10px;
    margin: 15px 0;
    display: block;
}

/* Các nút chung */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 20px;
    font-weight: 700;
    transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
    border: none;
    font-family: 'Roboto', sans-serif; 
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.btn-primary {
    background-color: var(--secondary-color); 
    color: var(--white);
    padding: 18px 40px; 
    font-size: 1.2em;
    font-weight: 800;
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6); 
}

.btn-primary:hover {
    background-color: #26a864;
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.8);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 16px 30px;
    border-radius: 20px;
}

.btn-secondary:hover {
    background-color: #4a75e0;
    transform: translateY(-2px);
}

/* Hiệu ứng nút kiểm tra siêu nổi bật */
.btn-test-highlight {
    position: relative;
    padding: 18px 45px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    background: linear-gradient(45deg, #4a75e0, #13abda); /* Màu cam đỏ rực rỡ */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(18, 105, 235, 0.4);
    transition: all 0.3s ease;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-test-highlight:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 30px rgba(7, 97, 182, 0.6);
}

/* Hiệu ứng sóng lan tỏa (Pulse) */
.btn-test-highlight::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    border: 2px solid #4a75e0;
    animation: pulse-wave 2s linear infinite;
    z-index: -1;
}

@keyframes pulse-wave {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Hiệu ứng icon mũi tên chạy */
.btn-test-highlight i {
    animation: arrow-move 1s infinite alternate;
}

@keyframes arrow-move {
    from { transform: translateX(0); }
    to { transform: translateX(5px); }
}

.duration {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 15px;
    display: block;
}

/* --- CSS CHO PHẦN "TẠI SAO CHỌN CHÚNG TÔI" (USP) --- */
.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.usp-item {
    padding: 35px 20px;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.usp-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); 
    transform: translateY(-8px);
}

.icon-usp {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.usp-item h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.4em;
}

@media (max-width: 768px) {
    .usp-grid {
        grid-template-columns: 1fr; 
    }
}

/* --- 4. ABOUT SECTION --- */
.about-grid {
    display: flex;
    gap: 30px;
    text-align: center;
    flex-wrap: wrap; 
    justify-content: center;
}

.about-item {
    flex: 1;
    min-width: 280px; 
    padding: 30px;
    border-radius: var(--border-radius-xl);
    transition: transform 0.3s;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e0e6f0; 
}

.about-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.about-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* --- 5. COURSES SECTION --- */
.course-grid {
    display: block;
}

/* Định dạng Swiper Container */
.course-slider {
    padding-bottom: 50px; 
    overflow: hidden;
    position: relative;
    max-width: 1000px; 
    margin: 0 auto;
}

/* Định dạng chung cho Course Card (Slide) */
.course-card {
    background: var(--white);
    padding: 25px 35px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.course-card:hover, .teacher-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, transparent 50%, rgba(91, 140, 255, 0.05) 50%);
}

.course-card h3 {
    font-size: 1.5em;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 800;
}

.course-card .price {
    display: inline-block;
    font-size: 1.8em;
    font-weight: 900;
    color: #ef4444;
    margin: 15px 0 20px 0;
    padding: 8px 16px;
    background: #fff1f2;
    border-radius: 12px;
    border: 1px dashed #fecaca;
    width: fit-content;
}
.course-card .duration {
    font-size: 0.9em;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-card p {
    font-size: 0.95em;
    color: #475569;
    margin-bottom: 20px;
    flex-grow: 1; /* Đẩy phần list và nút xuống dưới cùng */
}

/* Danh sách đặc điểm */
.course-card ul.features {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-bottom: 25px;
}

.course-card ul li {
    font-size: 0.9em;
    margin-bottom: 12px;
    color: #334155;
    display: flex;
    align-items: center;
}

.course-card ul li i {
    color: var(--secondary-color);
    margin-right: 10px;
    font-size: 1em;
}

/* Nút bấm trong card */
.course-card .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 1em;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.course-card .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.fa-star { color: #f1c40f; }
.fa-calendar { color: #3498db; } 
.fa-book { color: #2ecc71; }

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color) !important;
    transform: scale(1);
    transition: transform 0.3s;
    font-size: 20px !important; 
    top: 50%;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.2);
}

@media (min-width: 1024px) {
    .swiper-button-prev {
        left: -50px !important;
    }
    .swiper-button-next {
        right: -50px !important;
    }
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

.swiper-button-disabled {
    opacity: 0.3 !important;
    pointer-events: none;
    cursor: default;
}

/* --- 6. TEACHERS SECTION --- */
.teacher-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    text-align: center;
    flex-wrap: wrap; 
}

.teacher-card {
    max-width: 280px;
    padding: 20px;
}

.teacher-card img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 6px solid var(--primary-color); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.teacher-card h3 {
    margin-bottom: 5px;
    color: var(--text-color);
}

.teacher-card .role {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- 7. CONTACT SECTION & FORM --- */
.contact-flex {
    display: none; /* Vô hiệu hóa .contact-flex cũ */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr; 
    gap: 40px;
    align-items: center; 
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-soft);
}

.vertical-contact-form {
    max-width: none;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-banner.image-banner {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.contact-banner.image-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.vertical-contact-form input, 
.vertical-contact-form select, 
.vertical-contact-form button {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid #c7d1e0;
    width: 100%;
    margin: 0; 
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Roboto', sans-serif;
}

.vertical-contact-form button {
    border: none;
    cursor: pointer;
    font-size: 1em;
    margin-top: 5px;
}

.vertical-contact-form input:focus, 
.vertical-contact-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(91, 140, 255, 0.3);
    outline: none;
}

.vertical-contact-form input:invalid:not(:focus):not(:placeholder-shown) {
    border: 2px solid #dc3545; /* Viền đỏ cảnh báo */
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

/* SUBMIT BUTTON */
#submit-button {
    margin-top: 25px; 
    padding: 18px; 
    font-size: 1.2em; 
    font-weight: 800;
    border: none;
    cursor: pointer;
    animation: subtlePulse 2.5s infinite ease-out; 
}

#submit-button:disabled {
    background-color: #A9A9A9;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
}

/* --- CSS Cho Checkbox Xác Nhận Đồng Ý (Privacy Consent) --- */
.privacy-consent {
    margin-top: 5px; 
    margin-bottom: 5px;
    padding: 0 5px;
    text-align: left;
    max-width: 100%;
    font-size: 0.95em;
    color: var(--text-color);
}

.privacy-consent input[type="checkbox"] {
    width: auto !important; 
    height: auto;
    padding: 0;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 0; 
}

.privacy-consent label {
    display: inline;
    vertical-align: middle;
    line-height: 1.4;
    cursor: pointer;
}

.privacy-consent a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .privacy-consent {
        font-size: 0.9em;
        padding: 0 10px;
    }
}

/* --- 8. FOOTER MỚI --- */
#main-footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 50px 0 25px 0;
    text-align: center;
    display: block;
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Chia đều 3 cột */
    gap: 30px;
    align-items: start;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.footer-col p {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.map-col iframe {
    display: block;
    width: 100%;
    height: 200px;
    border-radius: var(--border-radius-lg); 
    border: none !important;
    filter: grayscale(80%) brightness(105%);
    transition: filter 0.5s ease-in-out;
}

.map-col iframe:hover {
    filter: grayscale(0%) brightness(100%);
}

.copyright-col {
    text-align: right; 
    font-size: 0.9em;
    padding-top: 15px;
}

/* --- Social Media Icons trong Footer --- */
.social-links {
    margin-top: 15px;
    text-align: left;
}

.social-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px; 
    text-align: center;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 1.3em;
    color: var(--white);
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 0.8;
}

.social-icon.facebook {
    background-color: #3b5998;
}

.social-icon.zalo {
    background-color: #0088ff;
}

.social-icon.telephone {
    background-color: #e60000;
}

/* ========================================================= */
/* --- 9. NÚT LIÊN HỆ NỔI (FLOATING CONTACT) --- */
/* ========================================================= */
.floating-contact {
    position: fixed; 
    bottom: 25px;
    right: 25px;
    z-index: 999;
    display: flex;
    flex-direction: column; 
    align-items: flex-end;
    gap: 15px;
}

.float-btn {
    width: 55px; 
    height: 55px;
    border-radius: 50%;
    text-align: center;
    line-height: 55px;
    color: white;
    font-size: 1.6em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s;
    cursor: pointer;
    display: flex; 
    justify-content: center;
    align-items: center;
}

/* Màu sắc cụ thể cho từng nút */
.float-btn.hotline {
    background-color: #e60000;
    animation: pulse 1.5s infinite;
}

.float-btn.zalo {
    background-color: var(--primary-color);
    animation: pulse 1.5s infinite;
    animation-delay: 0.2s;
}

.float-btn.facebook-messenger {
    background-color: #0084ff;
    animation: pulse 1.5s infinite;
    animation-delay: 0.4s;
}

.float-btn.scroll-to-top {
    background-color: var(--text-color);
    display: none;
    justify-content: center;
    opacity: 0.8;
    order: -1;
    animation: none;
}

.float-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
    animation: none;
}

/* ========================================================= */
/* --- 10. CSS CHO POP-UP THÔNG BÁO THÀNH CÔNG --- */
/* ========================================================= */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: var(--white);
    padding: 35px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.success-icon {
    font-size: 4.5em; 
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.popup-content h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.popup-content p {
    margin-bottom: 20px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8em;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    border: none;
    background: transparent;
    padding: 0;
}

.close-btn:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section.blog-section {
    flex: 1 0 auto;
}

/* --- 11. FAQ SECTION --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.faq-item h3 {
    font-size: 1.25em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.faq-item p {
    color: var(--text-color);
    margin: 0;
}

/* ========================================================= */
/* --- KEYFRAMES --- */
/* ========================================================= */

/* Animation Pulse cho nút GỬI - Dùng màu Xanh Lá mới */
@keyframes subtlePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); 
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 15px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Animation Pulse cho nút Floating Contact - Dùng màu Xanh Pastel */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(91, 140, 255, 0.7); 
    }
    70% {
        box-shadow: 0 0 0 10px rgba(91, 140, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(91, 140, 255, 0);
    }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ========================================================= */
/* --- FIX LỖI ẨN NÚT 3 GẠCH TRÊN DESKTOP --- */
/* ========================================================= */

/* [ĐÃ SỬA] Ẩn nút 3 gạch khi chiều rộng màn hình lớn hơn 768px (Desktop/Tablet ngang) */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }
}


/* ========================================================= */
/* --- MEDIA QUERIES (Responsive cho Mobile) --- */
/* ========================================================= */

 #postModal {
        display: none; 
        position: fixed; 
        z-index: 10000;
        padding-top: 0;
        left: 0; 
        top: 0; 
        width: 100%; 
        height: 100%; 
        background: rgba(0,0,0,0.8); 
        /* Cho phép cuộn cả modal nếu nội dung quá dài */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

@media (max-width: 768px) {
    
    .container {
        width: 90%; 
    }

    .no-scroll {
        overflow: hidden;
    }

    /* 1. Header */
    .header-content {
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 10px 0;
    }
    .header-logo-img {
        height: 35px;
    }
    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh; 
        background-color: #334155 !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        
        transform: translateX(100%); 
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
        visibility: hidden;
    }
    nav.nav-open {
        transform: translateX(0);
        visibility: visible; /* Hiện lại khi mở */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    nav a {
        color: var(--white);
        margin: 15px 0; 
        padding: 15px 25px;
        font-size: 1.4em;
        width: 80%;
        text-align: center;
        border-radius: var(--border-radius-lg);
    }
    .cta-nav {
        background-color: var(--secondary-color);
        color: var(--white) !important;
        margin-top: 20px;
        font-weight: 700;
        padding: 15px 40px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }
    nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--primary-color);
    }
    /* Hiển thị nút 3 gạch trên Mobile */
    .menu-toggle {
        display: block; 
        position: relative;
        z-index: 1002;
        color: var(--white);
    }

    #blog-container {
        grid-template-columns: 1fr; /* 1 cột duy nhất trên điện thoại */
        gap: 20px;
    }
    .post-full-content {
        font-size: 1em !important;
    }

   .modal-container {
        width: 100% !important;
        margin: 0 !important;
        min-height: 100vh;
        border-radius: 0 !important;
        padding: 50px 15px 30px 15px !important;
    }

    .post-full-content h1 {
        font-size: 1.5em; /* Tiêu đề vừa phải */
    }

    .post-full-content {
        font-size: 1.05em; /* Chữ to hơn một chút để dễ đọc trên đt */
    }

    .post-full-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 15px auto;
    }
    
   .close-btn {
        position: fixed; /* Giữ nút đóng cố định góc trên */
        top: 10px;
        right: 20px;
        background: white;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    /* 2. Hero Section */
    #hero {
        padding: 50px 0;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 20px; 
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }

    #hero h1 {
        font-size: 2.5em; 
        color: var(--primary-color);
        font-weight: 800;
    }
    
    #hero p {
        font-size: 1.1em; 
        padding: 0;
    }

    .hero-image-col {
        display: none; 
    }
    
    /* 3. Tiêu đề và Padding Section */
    .section-padding {
        padding: 50px 0; 
    }
    h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    /* 4. Nội dung dạng Grid/Flex (About, Teachers) */
    .about-grid, 
    .teacher-grid {
        flex-direction: column;
        gap: 25px;
    }
    /* Courses là Grid, cần đặt lại template */
    .course-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* 5. Contact Section */
    .contact-flex {
        gap: 20px;
    }
    
    /* 6. Footer */
    .footer-grid {
        grid-template-columns: 1fr; /* Mobile về 1 cột */
        text-align: center;
    }
    .footer-col {
        margin-bottom: 10px;
    }
    .footer-col h3, .footer-col p, .social-links {
        text-align: center;
    }
    .copyright-col {
        text-align: center;
        padding-top: 10px;
    }
    .floating-contact {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    .float-btn {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 1.4em;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px; 
        padding: 20px;
    }
    .contact-banner.image-banner {
        order: 1;
    }
}


/* ========================================= */
/* --- CHRISTMAS THEME UPDATE (NOEL 2024) --- */
/* ========================================= */

:root {
    /* Thêm màu đỏ Noel */
    --xmas-red: #D42426;
    --xmas-green: #165B33;
    --xmas-gold: #F8B229;
}

/* 1. Thêm hiệu ứng mũ ông già Noel vào ảnh giáo viên ở Hero Section */
.hero-teacher-img {
    position: relative; /* Để định vị mũ */
    overflow: visible; /* Để mũ lòi ra ngoài khung tròn */
    border-color: var(--xmas-red) !important; /* Đổi viền sang màu đỏ */
}

/* Tạo chiếc mũ bằng CSS pseudo-element */
.hero-teacher-img::after {
    content: '';
    position: absolute;
    top: -35px;
    right: -20px;
    width: 60px;
    height: 60px;
    background-image: url('https://i.imgur.com/9Qk6W9a.png'); /* Link ảnh mũ Santa trong suốt */
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    transform: rotate(15deg);
}

/* 2. Cập nhật nút "Kiểm tra trình độ" sang màu lễ hội */
.btn-test-highlight {
    background: linear-gradient(45deg, var(--xmas-red), var(--xmas-gold));
    box-shadow: 0 10px 20px rgba(212, 36, 38, 0.4);
}

.btn-test-highlight::before {
    border-color: var(--xmas-red);
}

/* 3. Thêm dải trang trí nhẹ dưới Header */
header {
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(to right, var(--xmas-red), var(--xmas-green), var(--xmas-gold), var(--xmas-red)) 1;
}

/* 4. Đổi màu các icon dấu tích trong card khóa học sang màu đỏ Noel */
.course-card ul li i.fa-check-circle {
    color: var(--xmas-red);
}

/* 5. CSS cho hiệu ứng tuyết rơi */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999; /* Đảm bảo tuyết rơi trên cùng */
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    color: #FFF; /* Màu tuyết */
    text-shadow: 0 0 5px rgba(255,255,255,0.8); /* Tạo hiệu ứng phát sáng nhẹ */
}

/* Hiệu ứng rơi và đung đưa */
@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0px);
        opacity: 1;
    }
    50% {
        transform: translateX(-20px); /* Đung đưa sang trái */
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(20px); /* Rơi xuống đáy và xoay */
        opacity: 0;
    }
}

/* Ẩn tuyết trên mobile nếu sợ lag (tùy chọn, hiện tại đang để hiện) */
@media (max-width: 768px) {
    /* .snowflake { display: none; } */ 
}