﻿/* Thêm vào cuối file */

:root {
    --primary-orange: #F97316;
    --primary-orange-dark: #EA580C;
    color-scheme: light;
}
html, body {
    background-color: #ffffff !important; /* Nền luôn trắng */
    color: #212529 !important; /* Chữ luôn màu tối (đen xám) */
}
.card {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* Đảm bảo modal (popup) luôn trắng */
.modal-content {
    background-color: #ffffff !important;
    color: #212529 !important;
}
/* Nút màu cam chủ đạo */
.btn-primary-custom {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
}

    .btn-primary-custom:hover {
        background-color: var(--primary-orange-dark);
        border-color: var(--primary-orange-dark);
        color: #fff;
    }
/*
=========================================
    FOOTER STYLES
=========================================
*/
.site-footer {
    font-size: 0.9rem;
}

    .site-footer .footer-logo span {
        vertical-align: middle;
    }

.footer-links a {
    text-decoration: none;
    transition: all 0.3s ease;
}

    .footer-links a:hover {
        color: var(--primary-orange) !important; /* Sử dụng màu cam chủ đạo */
        padding-left: 5px; /* Hiệu ứng thụt vào khi hover */
    }

/* --- Social Icons --- */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

    .social-icon:hover {
        background-color: var(--primary-orange); /* Đổi màu nền khi hover */
        color: #fff;
        transform: translateY(-3px); /* Hiệu ứng nhấc lên */
    }

/*
=========================================
    DROPDOWN SUBMENU STYLES
=========================================
*/
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -6px;
        margin-left: -1px;
        border-radius: 0 6px 6px 6px;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu > a:after {
        display: block;
        content: " ";
        float: right;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        border-width: 5px 0 5px 5px;
        border-left-color: #ccc;
        margin-top: 5px;
        margin-right: -10px;
    }

    .dropdown-submenu:hover > a:after {
        border-left-color: #fff;
    }

/*
=========================================
    DROPDOWN SUBMENU STYLES (UPGRADED)
=========================================
*/
.dropdown-submenu {
    position: relative;
}

    /* Kiểu mặc định: mở sang phải */
    .dropdown-submenu > .dropdown-menu {
        top: -5px; /* Điều chỉnh vị trí theo chiều dọc */
        left: 100%;
        margin-left: -1px;
        border-radius: 0 0.375rem 0.375rem 0.375rem; /* Bo góc cho đẹp */
    }

    /* === CLASS MỚI: ĐỂ MỞ SANG TRÁI === */
    .dropdown-submenu.submenu-left > .dropdown-menu {
        left: auto; /* Hủy bỏ 'left: 100%' */
        right: 100%; /* Đặt menu con ở bên trái của mục cha */
        margin-left: 0;
        margin-right: -1px;
        border-radius: 0.375rem 0 0.375rem 0.375rem;
    }

    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

    /* Mũi tên chỉ hướng */
    .dropdown-submenu > a:after {
        display: block;
        content: " ";
        float: right;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        border-width: 5px 0 5px 5px;
        border-left-color: #adb5bd; /* Màu mũi tên */
        margin-top: 5px;
        margin-right: -10px;
    }

    .dropdown-submenu:hover > a:after {
        border-left-color: var(--bs-dropdown-link-hover-color);
    }

    /* Mũi tên chỉ hướng ngược lại khi mở sang trái */
    .dropdown-submenu.submenu-left > a:after {
        display: none; /* Ẩn mũi tên mặc định */
    }

    /*CHATBOT*/
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

#chatbot-toggle-button {
    width: 60px;
    height: 60px;
    background-color: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

    #chatbot-toggle-button:hover {
        transform: scale(1.1);
    }

#chatbot-window {
    width: 350px;
    height: 500px;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
}

#chatbot-messages {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
}

    .message.user {
        background-color: #0d6efd;
        color: white;
        align-self: flex-end;
    }

    .message.bot {
        background-color: #e9ecef;
        color: #212529;
        align-self: flex-start;
    }

    .message.loading {
        align-self: flex-start;
    }

.spinner-dots { /* ... CSS cho 3 dấu chấm nhấp nháy ... */
}
    /*End Chatbot*/

/* Đảm bảo ảnh không bao giờ to hơn màn hình */
img {
    max-width: 100%;
    height: auto;
}

/* Container chính */
.container {
    /* Bootstrap đã xử lý tốt, nhưng đảm bảo không có padding cứng quá lớn */
    padding-right: 15px;
    padding-left: 15px;
}

/* Font chữ Responsive */
html {
    font-size: 16px; /* Base size */
}

@media (max-width: 768px) {
    /* Trên điện thoại, giảm font chữ tiêu đề một chút cho gọn */
    h1, .display-1, .display-2, .display-3, .display-4, .display-5 {
        font-size: calc(1.375rem + 1.5vw) !important; /* Tự động co giãn */
        word-wrap: break-word; /* Xuống dòng nếu từ quá dài */
    }

    /* Xử lý các bảng (table) bị tràn */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto; /* Cho phép cuộn ngang bảng thay vì co nhỏ */
        -webkit-overflow-scrolling: touch;
    }
}

/* Cải thiện các form trên mobile */
.form-control, .btn {
    min-height: 35px;
    padding-top: 7px;
}

/* Xử lý các modal trên mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
}