/* ================= CSS Variables ================= */
:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #f8c537;
    --text-color: #333333;
    --bg-color: #ffffff;
    --nav-bg: transparent;
    --nav-text: #ffffff;
    --nav-scrolled-bg: #ffffff;
    --nav-scrolled-text: #333333;
    --dropdown-bg: #ffffff;
    --footer-bg: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* Dark Mode Variables */
body.dark-mode {
    --text-color: #f1f1f1;
    --bg-color: #121212;
    --nav-scrolled-bg: #1e1e1e;
    --nav-scrolled-text: #ffffff;
    --dropdown-bg: #2d2d2d;
    --footer-bg: #0f172a;
}

/* ================= Global Styles ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* ================= Header & Menu ================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    padding: 20px 0;
    transition: all 0.4s ease;
}

/* Khi cuộn trang */
#main-header.scrolled {
    background: var(--nav-scrolled-bg);
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--nav-text);
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-color);
}

#main-header.scrolled .logo {
    color: var(--nav-scrolled-text);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    color: var(--nav-text);
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding-bottom: 5px;
}

#main-header.scrolled .nav-links li a {
    color: var(--nav-scrolled-text);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 150%;
    left: 0;
    background-color: var(--dropdown-bg);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-color) !important; /* Force text color in dropdown */
    padding: 12px 20px;
    display: block;
    font-weight: 500;
    font-size: 15px;
}

.dropdown-content a i {
    width: 20px;
    color: var(--primary-color);
}

body.dark-mode .dropdown-content a i {
    color: var(--accent-color);
}

.dropdown-content a:hover {
    background-color: rgba(128, 128, 128, 0.1);
    color: var(--primary-color) !important;
}

/* Header Tools (Search, Theme, Lang) */
.nav-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 5px 15px;
}

#main-header.scrolled .search-box {
    background: rgba(128, 128, 128, 0.1);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--nav-text);
    font-family: 'Nunito', sans-serif;
    width: 120px;
    transition: width 0.3s ease;
}

#main-header.scrolled .search-box input {
    color: var(--nav-scrolled-text);
}

.search-box input:focus {
    width: 180px;
}

.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

#main-header.scrolled .search-box input::placeholder {
    color: rgba(128, 128, 128, 0.7);
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
}

#main-header.scrolled .search-box button {
    color: var(--nav-scrolled-text);
}

.tool-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--nav-text);
    cursor: pointer;
}

#main-header.scrolled .tool-btn {
    color: var(--nav-scrolled-text);
}

.lang-switch {
    color: var(--nav-text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

#main-header.scrolled .lang-switch {
    color: var(--nav-scrolled-text);
}

.lang-switch .active {
    color: var(--accent-color);
}

/* ================= Main Content / Hero ================= */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(30,60,114,0.8), rgba(42,82,152,0.8)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background: var(--accent-color);
    color: #1e3c72;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(248,197,55,0.4);
}

.content-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.content-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

body.dark-mode .content-section h2 {
    color: var(--accent-color);
}

/* ================= Footer Styling ================= */
#footer-main {
    width: 100%;
    background: var(--footer-bg);
    color: #ffffff;
    padding: 60px 0 20px;
    font-family: 'Nunito', sans-serif; /* Đảm bảo đồng bộ Font */
}

#footer-main *,
#footer-main a {
    color: #ffffff !important;
    text-decoration: none;
}

.footer-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-heading {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
    font-weight: 700;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}

.footer-contact ul,
.footer-social ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-icon-btn {
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-icon-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
}

.footer-icon-btn i {
    font-size: 1.2rem;
}

.footer-facebook { background-color: #4267B2; }
.footer-linkedin { background-color: #0077B5; }

.footer-outline-btn {
    border: 1px solid #fff;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer-outline-btn:hover {
    background: rgba(255,255,255,0.15);
}

.footer-copy {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85) !important;
}

/* ================= Floating Support Button ================= */
#support-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.support-button {
    background-color: #007bff;
    color: white !important;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-button:hover {
    background-color: var(--accent-color);
    color: #1e3c72 !important;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links, .nav-tools {
        display: none; /* Trong dự án thực tế bạn sẽ cần thêm Hamburger menu icon ở đây */
    }
    
    .footer-row {
        flex-direction: column;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact ul,
    .footer-social ul {
        justify-content: center;
    }
}