/* --- RESET & BIẾN TOÀN CỤC --- */
:root {
    --primary-pastel: #A8E6CF; /* Xanh lá pastel chủ đạo */
    --primary-dark: #2A5C43;   /* Xanh lá đậm tạo điểm nhấn, đọc chữ rõ */
    --primary-light: #E8F5E9;  /* Nền xanh nhạt dịu mắt */
    --bg-white: #FFFFFF;       /* Nền trắng chủ đạo */
    --text-main: #333333;      /* Màu chữ chính */
    --text-muted: #666666;    /* Màu chữ phụ */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Kiểu dáng tiêu đề chung */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--text-muted);
}

/* --- PHẦN 1: HEADER & MENU HAMBURGER (FLEXBOX) --- */
/* --- CẤU HÌNH CHUNG HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: var(--bg-white, #FFFFFF);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Kích thước Logo hình ảnh sau khi tăng gấp 2 lần */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 100px; /* 🎯 Đã tăng từ 48px lên 96px để độ to gấp đôi */
    width: auto;
    object-fit: contain;
    transition: height 0.3s ease; /* Hiệu ứng đổi kích thước mượt mà */
}

/* 📱 Mẹo nhỏ: Nếu trên điện thoại logo quá to chiếm hết màn hình, 
   bạn có thể giới hạn lại kích thước một chút trên dòng này: */
@media (max-width: 768px) {
    .logo-img {
        height: 65px; /* Kích thước vừa vặn hơn khi xem trên điện thoại */
    }
}

/* --- ĐỊNH DẠNG CHỮ MENU VÀ ĐƯỜNG GẠCH CHÂN --- */
.menu-toggle { display: none; }
.hamburger { display: flex; flex-direction: column; justify-content: space-between; width: 26px; height: 18px; cursor: pointer; z-index: 1001; }
.hamburger span { display: block; height: 3px; width: 100%; background-color: #333333; border-radius: 2px; transition: 0.3s ease; }

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: #FFFFFF;
    box-shadow: -5px 0 25px rgba(0,0,0,0.05);
    padding: 80px 30px;
    transition: 0.3s ease-in-out;
}
.nav-menu ul { list-style: none; display: flex; flex-direction: column; gap: 25px; padding: 0; margin: 0; }

/* Định dạng chữ của các danh mục */
.nav-menu ul li a {
    text-decoration: none;
    color: #333333;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase; /* 🎯 TỰ ĐỘNG BIẾN CHỮ THƯỜNG THÀNH IN HOA GIỐNG HÌNH */
    position: relative;
    padding-bottom: 6px;
    display: inline-block;
    transition: color 0.2s ease;
}

/* 🎯 HIỆU ỨNG GẠCH CHÂN XANH KHI HOVER HOẶC ĐANG Ở TRANG ĐÓ (ACTIVE) */
.nav-menu ul li a.active,
.nav-menu ul li a:hover {
    color: #48A14D; /* Màu xanh thương hiệu UNIE */
}
.nav-menu ul li a.active::after,
.nav-menu ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* Thanh gạch chân dài bằng khít độ rộng của chữ */
    height: 3px; /* Độ dày nét gạch */
    background-color: #48A14D;
    border-radius: 2px;
}

/* 🎯 ĐỔI KIỂU DÁNG NÚT "ĐĂNG KÝ HỌC" ĐẬM ĐÀ NỔI BẬT GÓC PHẢI */
.btn-register-nav {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background-color: #48A14D !important; /* Đổi sang nền xanh */
    color: #FFFFFF !important; /* Chữ trắng */
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 10px rgba(72, 161, 77, 0.2);
    transition: all 0.2s ease !important;
}
.btn-register-nav:hover {
    background-color: #3E8E41 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(72, 161, 77, 0.3);
}
.btn-register-nav::after { display: none !important; } /* Loại bỏ gạch chân riêng cho nút bấm này */
.icon-user { stroke: currentColor; }

/* Điều khiển đóng mở menu trên điện thoại */
.menu-toggle:checked ~ .nav-menu { right: 0; }
.menu-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); background-color: #48A14D; }
.menu-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: #48A14D; }

/* --- 💻 ĐÁP ỨNG TRÊN MÀN HÌNH MÁY TÍNH (DESKTOP) --- */
@media (min-width: 992px) {
    .hamburger { display: none; }
    
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }
    
    .nav-menu ul {
        flex-direction: row; /* Trải thực đơn nằm ngang */
        align-items: center;
        gap: 32px;
    }
}

/* --- PHẦN 2: BANNER QUẢNG CÁO (ANIMATION LƯỚT NGANG) --- */
/* --- PHẦN 2: BANNER QUẢNG CÁO --- */
.banner-section {
    width: 100%;
    overflow: hidden;
    background-color: var(--primary-light);
    position: relative; /* Thêm để định vị nút bấm */
}

.banner-track {
    display: flex;
    width: 100%; 
    transition: transform 0.5s ease-in-out; 
    /* Đảm bảo không có thuộc tính animation nào khác ở đây */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ảnh sẽ hiển thị toàn bộ trong khung */
    background-color: #ffffff; /* Màu nền cho phần dư ra nếu tỉ lệ ảnh không khớp */
}


/* Tìm các class này trong CSS của bạn và tăng height lên */
/* Thiết lập tỷ lệ khung hình chuẩn 8:3 để khớp với ảnh 1200x450 */
.homepage-banner, 
.carousel-container,
.carousel-slide {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1200 / 450 !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
}

.carousel-slide {
    background-size: contain;   /* Giữ nguyên contain để hiện đủ ảnh */
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}
.banner-item {
    padding: 0; /* Đặt padding bằng 0 để ảnh tràn sát khung */
}
/* Đảm bảo track cũng khớp chiều cao */
.carousel-track {
    height: 100%;
}


/* --- PHẦN 3: COMBO KHÓA HỌC (FLEXBOX + HORIZONTAL SCROLL) --- */

.courses-section {

    padding: 60px 5%;

}



/* Thêm vào thẻ cha */
.course-container {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    perspective: 1000px; /* Di chuyển lên đây để tạo không gian 3D cho toàn bộ card */
    padding: 20px;
}

/* Trong thẻ .course-card, xóa dòng perspective đi */
.course-card {
    /* ... các thuộc tính khác ... */
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d; /* THÊM DÒNG NÀY: Bắt buộc để hiệu ứng 3D hoạt động */
}



/* Tùy chỉnh thanh cuộn ngang mượt mà */

.course-container::-webkit-scrollbar {

    height: 6px;

}

.course-container::-webkit-scrollbar-thumb {

    background-color: var(--primary-pastel);

    border-radius: 10px;

}


/* 1. Hiệu ứng xoay tròn 3D (3D Rotate/Flip) */
.course-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background-color: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(168, 230, 207, 0.3);
    
    /* Thiết lập phối cảnh 3D */
    perspective: 1000px; 
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.course-card:hover {
    /* Hiệu ứng lướt và xoay tròn nhẹ khi hover */
    transform: rotateY(15deg) translateY(-10px);
    box-shadow: 0 15px 30px rgba(42, 92, 67, 0.15);
    border-color: var(--primary-pastel);
}

/* 2. Căng chỉnh ảnh 8x5 vừa khít trong khung 160px */
.course-img {
    height: 160px;
    width: 100%;
    /* Ép tỉ lệ 8:5 (1.6) để khớp hoàn toàn với ảnh 800x500 */
    aspect-ratio: 8 / 5;
    
    background-size: cover;      /* Ảnh phủ kín khung, không bị méo */
    background-position: center; /* Lấy tâm ảnh làm chuẩn */
    background-repeat: no-repeat;
    
    /* Giữ nguyên các thuộc tính cũ để không hỏng layout */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}
.course-info {
    padding: 20px;
    /* THÊM DÒNG NÀY ĐỂ CÓ NỀN XANH LÁ NHẸ */
    background-color: #f0f9f0; 
    
    /* Tùy chọn: Thêm bo góc để khớp với khung card bên ngoài */
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.course-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.course-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    height: 63px; /* Giới hạn dòng văn bản đồng đều */
    overflow: hidden;
}

.course-btn {
    width: 100%;
    padding: 10px;
    /* Gợi ý: Nếu nền là xanh, nút bấm này nên giữ màu gốc hoặc nổi bật hơn */
    background-color: var(--primary-light);
    border: 1px solid var(--primary-pastel);
    color: var(--primary-dark);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.course-btn:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    border-color: var(--primary-dark);
}

/* --- PHẦN 4: CHƯƠNG TRÌNH ĐÀO TẠO (GRID LAYOUT) --- */
.program-section {
    background-color: var(--primary-light);
    padding: 60px 5%;
}

/* 1. Đặt kích thước card giống như Combo (300px) */
.program-grid {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 10px 5px 25px 5px;
    scroll-snap-type: x mandatory;
}

.program-card {
    flex: 0 0 300px; /* Cùng kích thước 300px như course-card */
    scroll-snap-align: start;
    background-color: var(--bg-white);
    border-radius: 15px;
    padding: 20px; /* Thêm padding để nội dung đẹp hơn */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(168, 230, 207, 0.3);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 2. Hiệu ứng xoay tròn 3D giống Combo */
.program-card:hover {
    transform: rotateY(15deg) translateY(-10px);
    box-shadow: 0 15px 30px rgba(42, 92, 67, 0.15);
}

/* 3. Căng chỉnh ảnh 8:5 cho program-icon */
.program-icon {
    width: 100%;
    height: 160px; /* Chiều cao khớp với course-img */
    aspect-ratio: 8 / 5;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* --- PHẦN 5: CƠ SỞ & THÔNG TIN LIÊN HỆ (GRID FOOTER MỚI CỦA UNIE) --- */
/* ==========================================================================
   CẬP NHẬT MỚI: TRIỆT TIÊU ĐƯỜNG THẲNG ĐÈ NHAU CỦA FOOTER
   ========================================================================== */

/* Khối bao ngoài của Footer */
.footer {
    background: transparent !important; 
    border: none !important;
    position: relative;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* Khu vực đường sóng: Đồng nhất màu xanh lục bảo đã hạ tông */
.footer-wave {
    width: 100%;
    height: 80px;
    line-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    margin-bottom: -2px; /* Tránh hở khe trắng */
}
.footer-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Thân Footer: Hạ màu xuống tone trầm dịu (#1e3d29) để làm nổi bật Logo màu xanh lá chuối sáng */
.footer-body {
    background: linear-gradient(to bottom, #1e3d29 0%, #13261a 100%) !important;
    color: #FFFFFF;
    width: 100%;
    padding: 40px 0 20px 0;
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Grid layout chứa cấu trúc chính */
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1fr;
    gap: 0px; /* Chuyển gap về 0 để padding của thanh ngăn cách hoạt động chuẩn */
    margin-bottom: 40px;
}

/* Định dạng chung các cột */
.footer-col {
    box-sizing: border-box;
}

/* ==========================================================================
   🎯 THÊM THANH NGĂN CÁCH DỌC GIỮA CÁC MỤC TINH TẾ
   ========================================================================== */
.footer-col.col-brand {
    padding-right: 40px;
}

/* Vạch dọc giữa cột 1 và cột 2 */
.footer-col.col-contact {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 40px;
    padding-right: 40px;
}

/* Vạch dọc giữa cột 2 và cột 3 */
.footer-col.col-social {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 40px;
}

/* ==========================================================================
   🎯 ĐỒNG BỘ LOGO MỚI (image_f1d363.jpg) HỢP LÝ VỚI NỀN
   ========================================================================== */
/* Khung chứa Logo: Xóa bỏ nền trắng cũ, để Logo hòa nhập trực tiếp vào nền xanh đậm */
/* Khối bao ngoài của Footer */
/* Tổng thể khung Footer */
.footer {
    background: transparent !important; 
    border: none !important;
    position: relative;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* Khu vực sóng uốn lượn đồng bộ màu menu tươi sáng */
.footer-wave {
    width: 100%;
    height: 80px;
    line-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 2;
    margin-bottom: -2px; /* Triệt tiêu vệt khe hở trắng */
}
.footer-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Thân Footer: Gradient chuyển tiếp từ màu nút menu xuống sắc xanh đậm sâu */
.footer-body {
    background: linear-gradient(to bottom, #257a47 0%, #154b2b 100%) !important;
    color: #FFFFFF;
    width: 100%;
    padding: 40px 0 20px 0;
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Grid cân bằng 3 cột */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0px;
    margin-bottom: 40px;
}

.footer-col {
    box-sizing: border-box;
}

/* --- THANH NGĂN CÁCH DỌC TINH TẾ --- */
.footer-col.col-brand {
    padding-right: 40px;
}
.footer-col.col-contact {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
    padding-right: 40px;
}
.footer-col.col-social {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

/* --- ĐỊNH DẠNG LOGO (Cao lên + Căn giữa trục dọc chữ) --- */
.footer-logo-box {
    margin-bottom: 25px; /* Đẩy khoảng cách cao lên tạo sự thoáng đãng */
    display: flex;
    align-items: center;
    justify-content: center; /* Đưa logo vào chính giữa dòng */
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 100%;
}

.unie-img-logo {
    height: 102px; 
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    /* XÓA BỎ DÒNG mix-blend-mode: screen; Ở ĐÂY */
    filter: none; /* Đảm bảo không có bộ lọc màu nào tác động */
}

/* Chữ mô tả thương hiệu */
.brand-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 15px;
    text-align: center; /* Căn giữa dòng chữ đồng bộ theo logo */
}

/* Tiêu đề các mục */
.footer-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Danh sách thông tin liên hệ */
.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.75);
}

/* 5 Vòng tròn liên kết mạng xã hội */
.social-medias {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.social-circle {
    width: 36px;
    height: 36px;
    background-color: #FFFFFF !important;
    color: #257a47 !important; /* Đồng điệu màu chữ icon với sắc xanh nền mới */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.zalo-txt {
    font-size: 11px;
    font-weight: 700;
    font-family: system-ui, sans-serif;
}
.social-circle:hover {
    transform: translateY(-3px);
    background-color: #e4f2e9 !important;
}

/* Bản quyền chân trang */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
    text-align: center;
}
.footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* Tương thích mượt mà trên thiết bị di động (Responsive) */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-col.col-brand,
    .footer-col.col-contact,
    .footer-col.col-social {
        padding: 0;
        border-left: none !important;
    }
    .footer-col.col-contact,
    .footer-col.col-social {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        padding-top: 25px;
    }
}
/* ==========================================================================
   1. KHUNG CHỨA CHÍNH (WIDGET CONTAINER) & CƠ CHẾ ĐÓNG/MỞ
   ========================================================================== */
.chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Ẩn checkbox gốc */
.chat-toggle-input {
    display: none;
}

/* Khung hiển thị hộp thoại chat */
.chat-box {
    display: none;
    width: 380px;
    height: 580px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    border: 1px solid #e2e8e1;
    transition: all 0.3s ease;
}

/* Kích hoạt hiển thị khi nhấn nút */
.chat-toggle-input:checked ~ .chat-box {
    display: flex;
}

/* ==========================================================================
   2. TIÊU ĐỀ KHUNG CHAT (CHAT HEADER)
   ========================================================================== */
.chat-header {
    background: #215219; /* Màu xanh chủ đạo từ hình ảnh */
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-avatar {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.chat-title-status {
    flex: 1;
}

.chat-title-status h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-online {
    font-size: 11px;
    color: #a3e635; /* Màu xanh neon hiển thị online */
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.status-online::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #a3e635;
    border-radius: 50%;
}

.chat-close-btn {
    cursor: pointer;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
    padding: 4px;
}

.chat-close-btn:hover {
    color: #ffffff;
}

/* ==========================================================================
   3. THÂN HỘP THOẠI & BÓNG CHAT (CHAT BODY & BUBBLES)
   ========================================================================== */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f4f7f4; /* Nền xám xanh nhạt như trong hình mẫu */
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Dòng hiển thị thời gian phân cách */
.msg-time {
    text-align: center;
    font-size: 11px;
    color: #8a9489;
    margin: 8px 0;
    text-transform: capitalize;
}

/* Cấu trúc hàng tin nhắn chung */
.msg-row {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

/* Tin nhắn của BOT / TƯ VẤN VIÊN (Nằm bên TRÁI) */
.msg-row.bot {
    align-self: flex-start;
    align-items: flex-start;
}

.msg-bubble.bot {
    background: #ffffff;
    color: #222222;
    border-radius: 16px;
    border-top-left-radius: 4px; /* Vát góc bóng chat chuẩn */
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e3e8e2;
}

/* Tin nhắn của KHÁCH HÀNG / USER (Nằm bên PHẢI) */
.msg-row.user {
    align-self: flex-end;
    align-items: flex-end;
}

.msg-bubble.user {
    background: #215219; /* Màu xanh đậm giống hệt hình ảnh mẫu */
    color: #ffffff;
    border-radius: 16px;
    border-top-right-radius: 4px; /* Vát góc bóng chat chuẩn */
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Meta dữ liệu (Tên người gửi, thời gian dưới/trên bóng chat) */
.msg-meta {
    font-size: 11px;
    color: #8a9489;
    margin-top: 4px;
    padding: 0 4px;
}

/* ==========================================================================
   4. KHU VỰC NHẬP LIỆU (CHAT FOOTER)
   ========================================================================== */
.chat-footer {
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ô nhập dữ liệu dạng viên thuốc */
#chat-input {
    flex: 1;
    border: 1px solid #dbe3db;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    background: #fbfcfb;
    transition: all 0.2s ease;
    color: #222222;
}

#chat-input:focus {
    border-color: #215219;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(33, 82, 25, 0.1);
}

/* Nút gửi tin nhắn hình tròn màu xanh */
.chat-send-btn {
    background: #215219;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #193f13;
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
    transform: rotate(45deg); /* Xoay nhẹ icon SVG mũi tên nếu cần */
}

/* ==========================================================================
   5. NÚT BONG BÓNG ĐÓNG/MỞ NGOÀI MÀN HÌNH (BUBBLE TOGGLE BUTTON)
   ========================================================================== */
.chat-bubble-btn {
    width: 60px;
    height: 60px;
    background: #215219;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(33, 82, 25, 0.3);
    position: absolute;
    bottom: 0;
    right: 0;
    transition: transform 0.2s, background 0.2s;
}

.chat-bubble-btn:hover {
    background: #193f13;
    transform: scale(1.05);
}

.chat-bubble-btn svg {
    width: 26px;
    height: 26px;
}

/* Badge thông báo tin nhắn chưa đọc */
.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #ffffff;
    min-width: 18px;
    text-align: center;
}

.badge-hide {
    display: none;
}

/* Badge thông báo tin nhắn chưa đọc (Định vị chuẩn xác trên góc Icon) */
.chat-badge {
    position: absolute;
    top: -5px;     /* Điều chỉnh lại khoảng cách góc trên */
    right: -5px;   /* Điều chỉnh lại khoảng cách góc phải */
    background: #ef4444; /* Màu đỏ cảnh báo */
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 10px;
    border: 2px solid #ffffff; /* Viền trắng để nổi bật trên nền xanh */
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Ép buộc ẩn badge khi không có tin nhắn mới */
.badge-hide {
    display: none !important;
}

/* Nút xác nhận tài khoản */
.btn-auth-submit {
    width: 100%;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition-fast);
}
.btn-auth-submit:hover { background-color: #1F3E2F; }

.login-addons {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}
.forgot-pass-link {
    font-size: 12.5px;
    color: #FF7675;
    text-decoration: none;
    font-weight: 600;
}
.forgot-pass-link:hover { text-decoration: underline; }

/* Hộp thông báo duyệt */
.auth-status-alert {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.success-box {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-pastel);
}

/* --- ĐỒNG BỘ CÂN CHỈNH 2 Ô NHẬP LIỆU BẰNG NHAU TUYỆT ĐỐI --- */
.auth-modal-box .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    width: 100%;
}

.auth-modal-box .form-control {
    width: 100% !important;
    padding: 12px 14px; /* Định dáng đồng đều chiều cao */
    border: 1px solid #DCDCDC;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box; /* 🌟 QUAN TRỌNG: Giữ kích thước 2 ô bằng chằn chặn không bị lệch do padding */
}

/* --- KHỐI THÔNG BÁO LỖI DATABASE --- */
.error-box {
    background-color: #FFEAE8;
    color: #FF7675;
    border: 1px solid rgba(255, 118, 117, 0.4);
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    animation: modalShake 0.3s ease-in-out; /* Hiệu ứng rung cảnh báo */
}

/* Hiệu ứng rung nhẹ khi nhập sai tài khoản */
@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ==========================================================================
   1. LỚP PHỦ NỀN MODAL (MODAL OVERLAY)
   ========================================================================== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); /* Lớp nền tối phía sau */
    display: none; /* Mặc định ẩn */
    justify-content: center;
    align-items: center;
    z-index: 9999999; /* Đảm bảo nổi lên trên cùng, kể cả bóng chat */
    backdrop-filter: blur(4px); /* Làm mờ hậu cảnh hiệu ứng kính hiện đại */
    padding: 20px;
    box-sizing: border-box;
}

/* Kích hoạt hiển thị Modal khi thêm class .active hoặc .show từ JS */
.auth-modal-overlay.active,
.auth-modal-overlay.show {
    display: flex;
}

/* ==========================================================================
   2. HỘP HỘI THOẠI TRUNG TÂM (MODAL BOX)
   ========================================================================== */
.auth-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 440px; /* Độ rộng tiêu chuẩn cho form đăng nhập/đăng ký */
    padding: 30px;
    border-radius: 20px; /* Bo tròn đồng bộ với khung chat */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    box-sizing: border-box;
    /* Hiệu ứng phóng to nhẹ nhàng khi xuất hiện */
    animation: authModalBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authModalBounce {
    from {
        transform: scale(0.9) translateY(-15px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   3. NÚT ĐÓNG (CLOSE BUTTON)
   ========================================================================== */
.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    font-weight: 300;
    color: #8a9489;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.auth-modal-close:hover {
    color: #ef4444; /* Chuyển đỏ khi hover nút đóng */
    transform: rotate(90deg);
}

/* ==========================================================================
   4. TIÊU ĐỀ FORM (HEADER)
   ========================================================================== */
.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modal-header h4 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: #215219; /* Màu xanh lá chủ đạo */
    letter-spacing: 0.2px;
}

.auth-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #626d61;
    line-height: 1.4;
}

/* ==========================================================================
   5. Ô NHẬP LIỆU (FORM GROUPS & INPUTS)
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: #2b362a;
}

/* Định dạng Input cao cấp */
.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #cbd5cb;
    border-radius: 10px; /* Bo góc nhẹ tạo cảm giác chắc chắn */
    font-size: 14px;
    outline: none;
    background: #fafbfa;
    color: #222222;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: #a0aba0;
}

/* Trạng thái focus của Input (Đồng bộ hiệu ứng xanh lá) */
.form-control:focus {
    border-color: #215219;
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(33, 82, 25, 0.12);
}

/* Cân chỉnh liên kết mở rộng (Quên mật khẩu) */
.login-addons {
    text-align: right;
    margin: -6px 0 18px 0;
}

.forgot-pass-link {
    font-size: 13px;
    color: #215219;
    text-decoration: none;
    font-weight: 500;
}

.forgot-pass-link:hover {
    text-decoration: underline;
    color: #193f13;
}

/* ==========================================================================
   6. NÚT SUBMIT FORM (SUBMIT BUTTON)
   ========================================================================== */
.btn-auth-submit {
    width: 100%;
    background: #215219; /* Màu xanh chủ đạo */
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(33, 82, 25, 0.2);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-auth-submit:hover {
    background: #193f13; /* Đậm hơn khi hover */
    box-shadow: 0 6px 16px rgba(33, 82, 25, 0.3);
}

.btn-auth-submit:active {
    transform: scale(0.98); /* Hiệu ứng lún nút khi click */
}

/* ==========================================================================
   7. HỘP THÔNG BÁO TRẠNG THÁI (STATUS ALERTS)
   ========================================================================== */
.auth-status-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Box thông báo thành công (Màu xanh lục nhạt) */
.success-box {
    background-color: #f0f7f0;
    border: 1px solid #cce3cc;
    color: #1e521e;
}

/* Box thông báo lỗi (Màu đỏ nhạt) */
.error-box {
    background-color: #fdf2f2;
    border: 1px solid #f8d7da;
    color: #b52a33;
}

/* Khung chứa bên ngoài cùng hiển thị banner */
.carousel-container {
    overflow: hidden;    /* Bắt buộc: Ẩn các hình ảnh thừa chưa lướt tới */
    position: relative;
    width: 100%;
    height: 450px;       /* Hoặc chiều cao tùy cấu hình của bạn */
}

/* Đường chạy chứa các slide */
.carousel-track {
    display: flex;       /* Bắt buộc: Xếp các slide thành một hàng ngang */
    flex-wrap: nowrap;   /* CỰC KỲ QUAN TRỌNG: Ngăn các slide sau bị nhảy xuống hàng dưới */
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* Tạo hiệu ứng lướt mượt mà */
}

/* Từng slide ảnh đơn lẻ */
.carousel-slide {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;      /* CỰC KỲ QUAN TRỌNG: Ép mỗi slide luôn chiếm đúng 100% chiều rộng, không bị co về 0px */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}