html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    padding-top: 0;
    /* Sẽ được điều chỉnh nếu cần */
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/*thêm css menu*/
/* Màu chữ và hiệu ứng hover cho Top Bar */
.top-bar .nav-link {
    font-size: 13px;
    transition: all 0.3s;
}

.top-bar .nav-link:hover {
    color: #415a77 !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Menu chính */
.navbar-nav .nav-link {
    font-size: 15px;
    padding: 10px 15px !important;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

/* Hiệu ứng gạch chân màu xanh sáng khi hover giống logo */
.navbar-nav .nav-link:hover {
    color: #00b4d8 !important;
    /* Màu xanh cyan giống một phần logo */
    border-bottom: 2px solid #00b4d8;
}

/* Đảm bảo logo hiển thị rõ nét */
.navbar-brand img {
    filter: drop-shadow(0px 0px 2px rgba(255, 255, 255, 0.2));
}

/* Container chứa chữ */
/* Container chứa chữ - Ép các dòng thẳng hàng */
.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Giữ chữ luôn thẳng lề trái */
    text-transform: uppercase;
    font-family: 'Exo 2', 'Segoe UI', sans-serif;
    line-height: 1;
    /* Quan trọng để không bị dãn cách dòng quá xa */
}

/* Dòng trên: LTA TECH (Màu Gradient công nghệ) */
.brand-name-top {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #4cc9f0, #4361ee, #4ade80);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    /* Chuyển sang block để kiểm soát margin tốt hơn */
}

/* Dòng dưới: Nhỏ hơn, giúp khối logo vuông vức */
.brand-name-bottom {
    font-size: 10px;
    font-weight: 600;
    color: #a2a2a2;
    letter-spacing: 0.5px;
    display: block;
}

/* Icon Brand Box dùng chung */
.brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: #0b50da;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(11, 80, 218, 0.2);
}

/* Lọc màu cho logo nếu là file JPG có nền tối */
.logo-filter {
    filter: drop-shadow(0px 0px 5px rgba(76, 201, 240, 0.3));
    border-radius: 4px;
}

:root {
    --bg-color: #ffffff;
    --text-color: #0d1b2a;
    --nav-bg: #1b263b;
    /* Màu menu hiện tại của bạn */
}

/* Màu khi ở Chế độ Tối */
[data-theme="dark"] {
    --bg-color: #0f172a; /* Tailwind slate-900 */
    --text-color: #f8fafc; /* Tailwind slate-50 */
    --nav-bg: #020617; /* Tailwind slate-950 */
}

/* Global Dark Mode Overrides (dành cho các thẻ thiếu class dark: của Tailwind) */
html.dark body {
    background-color: #0f172a !important; /* bg-slate-900 */
    color: #f8fafc !important; /* text-slate-50 */
}

html.dark .bg-white {
    background-color: #1e293b !important; /* bg-slate-800 */
    color: #f8fafc !important;
    border-color: #334155 !important; /* border-slate-700 */
}

html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 {
    color: #f1f5f9 !important; /* text-slate-100 */
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
    color: #94a3b8 !important; /* text-slate-400 */
}

html.dark .border-slate-200,
html.dark .border-slate-100 {
    border-color: #334155 !important; /* border-slate-700 */
}

html.dark .bg-slate-50,
html.dark .bg-slate-100 {
    background-color: #0f172a !important; /* bg-slate-900 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    /* Hiệu ứng chuyển màu mượt mà */
}

.navbar {
    background-color: var(--nav-bg) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sticky & Glass Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    width: 100%;
    transition: all 0.4s ease;
}

header.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

header.scrolled .top-bar {
    height: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

header.scrolled .navbar {
    background-color: rgba(27, 38, 59, 0.8) !important;
    /* Semi-transparent version of #1b263b */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] header.scrolled .navbar {
    background-color: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Khắc phục khoảng trống cho nội dung chính do header fixed */
.main-content-wrapper {
    padding-top: 130px !important;
    /* Độ cao xấp xỉ của top-bar + navbar */
}

/* Màu chữ mặc định cho Footer ở chế độ sáng */
footer {
    color: #6c757d;
    /* Màu xám mặc định */
    transition: color 0.3s ease;
}

/* Tự động đổi màu khi sang chế độ TỐI */
[data-theme="dark"] footer {
    color: #f1f2f6 !important;
    /* Màu trắng bạc sáng */
}

/* Đảm bảo các link trong footer cũng sáng lên */
[data-theme="dark"] footer a {
    color: #4cc9f0 !important;
    /* Màu xanh cyan giống logo LTA để nổi bật */
}

/* Khắc phục lỗi mờ do class text-muted của Bootstrap */
[data-theme="dark"] .text-muted {
    color: #ced4da !important;
}

/* Ngăn bôi đen Logo và nút chuyển đổi giao diện */
.navbar-brand,
.brand-text-wrapper,
#theme-icon-container,
.nav-link {
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 và cũ hơn */
    user-select: none;
    /* Tiêu chuẩn (Chrome, Firefox, v.v.) */
}

/* Loại bỏ khung viền xanh (outline) khi nhấn vào trên một số trình duyệt */
.navbar-brand:focus,
.nav-link:focus {
    outline: none !important;
    box-shadow: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    /* Ngăn chặn thanh cuộn ngang xuất hiện */
}

/* Ép phần banner và các hàng (row) tràn lề */
.carousel,
.banner-img {
    width: 100vw;
    /* Chiều rộng bằng 100% màn hình hiển thị */
    margin-left: 0;
    margin-right: 0;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* =========================================================
   STYLE FOOTER (GIỐNG MẪU)
   ========================================================= */

/* 1. Thiết lập khung bao ngoài */
.footer-wrapper {
    background-color: #0b1120;
    /* Màu nền xanh đen đậm (Dark Navy) */
    color: #94a3b8;
    /* Màu chữ xám sáng (Slate 400) */
    padding-top: 80px;
    padding-bottom: 30px;
    font-size: 0.95rem;
}

/* 2. Text và Link */
.text-muted-footer {
    color: #94a3b8;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
    /* Hiệu ứng trượt nhẹ sang phải khi hover */
}

/* 3. Input đăng ký email */
.footer-input {
    background-color: #1e293b !important;
    /* Nền input tối màu */
    border: 1px solid #334155 !important;
    color: #fff !important;
    padding: 12px 15px;
}

.footer-input::placeholder {
    color: #64748b;
}

.footer-input:focus {
    box-shadow: none;
    border-color: #3b82f6 !important;
}

/* 4. Social Icons (Hình vuông bo góc) */
.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e293b;
    color: #94a3b8;
    border-radius: 8px;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #3b82f6;
    /* Đổi màu xanh khi hover */
    color: #ffffff;
    transform: translateY(-3px);
}

/* 5. Đường kẻ mờ ngăn cách footer bottom */
.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* =========================================================
   MEDIA QUERIES - RESPONSIVE DESIGN (CHỈNH SỬA CHO MOBILE/TABLET)
   ========================================================= */

/* Desktop & Laptop nhỏ (dưới 1199px) */
@media (max-width: 1199.98px) {
    .brand-name-top {
        font-size: 22px;
    }
}

/* Tablet ngang & Thiết bị nhỏ (dưới 991px - điểm ngắt của navbar-expand-lg) */
@media (max-width: 991.98px) {
    /* Navbar menu thả xuống */
    .glowing-nav {
        flex-direction: column;
        gap: 10px !important;
        border-radius: 12px;
        padding: 15px;
        background-color: rgba(27, 38, 59, 0.95); /* Màu nền đậm hơn chút khi xổ xuống */
        backdrop-filter: blur(10px);
    }

    [data-theme="dark"] .glowing-nav {
         background-color: rgba(2, 6, 23, 0.95);
    }

    .glowing-link {
        border-radius: 8px;
        padding: 10px 15px;
        text-align: center;
    }
    
    .glowing-link::before {
        border-radius: 8px;
    }

    /* Tinh chỉnh chiều cao Header bù trừ do collapse */
    .main-content-wrapper {
        padding-top: 115px !important; 
    }
}

/* Mobile & Tablet dọc (dưới 767px) */
@media (max-width: 767.98px) {
    /* Thu gọn Logo Text */
    .brand-name-top {
        font-size: 18px;
    }
    .brand-name-bottom {
        font-size: 9px;
    }
    .navbar-brand img {
        height: 40px !important; /* Thu nhỏ logo image */
    }
    
    /* Top Bar - Tối ưu thanh trên cùng cho mobile gọn gàng hơn */
    .top-bar .nav-link {
        font-size: 12px;
        padding: 6px 10px !important;
    }
    
    /* Footer */
    .footer-wrapper {
        padding-top: 50px;
        text-align: center; /* Căn giữa nội dung footer trên mobile */
    }
    
    .footer-wrapper .d-flex.align-items-center {
        justify-content: center; /* Căn giữa khối logo footer */
    }
    
    .footer-wrapper .list-unstyled li {
        justify-content: center; /* Căn giữa thông tin liên hệ */
    }

    .footer-wrapper .d-flex.gap-3 {
        justify-content: center; /* Căn giữa icon mạng xã hội */
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile nhỏ hẹp (dưới 575px) */
@media (max-width: 575.98px) {
    .main-content-wrapper {
        padding-top: 105px !important; 
    }
}