/* 1. KHỞI TẠO BIẾN VÀ CÀI ĐẶT CHUNG */
:root {
    --primary-color: #0056b3;
    --secondary-color: #ffc107;
    --text-color: #333333;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --footer-bg: #111827;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* 2. HEADER */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    padding: 0.8rem 5%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary-color);
}

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

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

nav a:hover::after {
    width: 100%;
}

.btn-call {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
}

.btn-call:hover {
    background-color: #e0a800 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
    color: #000 !important;
}

/* 3. SECTION & CARD */
.section {
    padding: 6rem 10%;
    text-align: center;
}

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3.5rem;
    position: relative;
    padding-bottom: 20px;
}

.section h2::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img-wrapper img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* 4. LAYOUT QUY TRÌNH */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 45px 30px;
    margin-top: 4rem;
}

.step-card {
    background: var(--white);
    padding: 50px 25px 30px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.step-number {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: #333;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* 5. FOOTER - ĐÃ SỬA LỖI LAYOUT */
footer {
    background: var(--footer-bg);
    color: #94a3b8;
    padding: 5rem 10% 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem; /* Giảm margin để nhường chỗ cho underline */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tạo gạch chân màu vàng chuẩn */
.footer-underline {
    width: 35px;
    height: 2px;
    background: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Sửa lỗi lệch Icon và Text trong phần Liên hệ */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start; /* Giúp icon luôn nằm đỉnh đầu dòng chữ */
    gap: 15px;
    color: #94a3b8;
}

.contact-item i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
    font-size: 1rem;
    margin-top: 5px; /* Cân chỉnh icon khớp dòng chữ đầu tiên */
}

.contact-item a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.5;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-icons a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* ==========================================
   SIDEBAR SLIDER MENU
   ========================================== */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
}

.nav-call-mobile { display: none; }

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

@media (max-width: 768px) {
    body.menu-active::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    header { padding: 0.5rem 5%; }
    .header-desktop-only { display: none; }
    .menu-toggle { display: block; z-index: 1001; }

    #main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        z-index: 999;
        padding-top: 20px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    #main-nav.active {
        transform: translateX(300px);
    }

    #main-nav a {
        margin: 0;
        padding: 15px 25px; 
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
        display: block;
        font-size: 1.1rem;
        color: var(--text-color);
    }

    .nav-call-mobile {
        display: flex !important;
        align-items: center;
        gap: 12px; 
        color: var(--primary-color) !important;
        font-weight: bold;
        background: #f8fafc;
        margin-top: 20px;
    }

    .nav-call-mobile i {
        width: 20px;
        text-align: center;
    }

    #main-nav a::after { display: none; }
    .section { padding: 3rem 5%; }
    
    /* Footer trên Mobile */
    .footer-grid { grid-template-columns: 1fr; text-align: left; gap: 30px; }
    .footer-underline { margin-left: 0; }
    .social-icons { justify-content: flex-start; }
    .footer-bottom { margin-top: 2rem; }
}

/* ==========================================
   FIX LỖI LOGO DƯ THỪA TRÊN DESKTOP
   ========================================== */
#main-nav .mobile-only-logo { display: none !important; }

@media (max-width: 768px) {
    #main-nav .mobile-only-logo { display: flex !important; }
}

/* ==========================================
   FLOAT CONTACT BUTTONS
   ========================================== */
.float-contact {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: white !important;
    text-decoration: none !important;
    font-size: 22px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
    transition: var(--transition);
}

.phone-btn { background-color: #e53e3e; animation: quick-shake 3s infinite; }
.zalo-btn { background-color: #0084ff; }
.zalo-btn img { width: 32px; height: 32px; }

.fb-btn {
    background-color: #1877F2; /* Màu xám đậm thực tế, không transparent */
}

@keyframes quick-shake {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(12deg); }
    90% { transform: rotate(-12deg); }
    95% { transform: rotate(12deg); }
}

@media (max-width: 768px) {
    .float-contact { bottom: 20px; right: 15px; }
    .float-btn { width: 50px; height: 50px; font-size: 18px; }
}