/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #123f6d;
    --secondary-color: #e60000;
    --text-color: #333;
    --bg-gray: #f9fafb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* Bắt buộc cắt phần thừa */
    font-family: 'Inter', sans-serif; 
    color: var(--text-color); 
    line-height: 1.6; 
    font-size: 16px; 
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
button { cursor: pointer; border: none; background: none; }

/* =========================================
   2. UTILITIES & LAYOUT
   ========================================= */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 15px; padding-right: 15px; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

/* Typography */
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.text-white { color: #fff; }
.relative { position: relative; }
.absolute { position: absolute; }

/* Spacing */
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-16 { margin-top: 4rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Grid System */
.grid { display: grid; gap: 1.5rem; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* =========================================
   3. RESPONSIVE CLASSES (MOBILE FIRST)
   ========================================= */
.desktop-only { display: none !important; }
.mobile-only { display: block !important; }
.w-col-half { width: 100%; }
.w-col-7 { width: 100%; }
.w-col-3 { width: 100%; margin-bottom: 10px; }
.mt-mobile-4 { margin-top: 1rem; }
.text-left-md { text-align: center; } 

/* PC Screens (min-width: 768px) */
@media (min-width: 768px) {
    .desktop-only { display: block !important; }
    .mobile-only { display: none !important; }
    
    .grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    
    .flex-col { flex-direction: column; }
    .md-flex-row { flex-direction: row; }
    
    .w-col-half { width: 41.66%; }
    .w-col-7 { width: 58.33%; }
    .w-col-3 { width: 32%; margin-bottom: 0; }
    .mt-mobile-4 { margin-top: 0; }
    .text-left-md { text-align: left; }
}

/* =========================================
   4. COMPONENTS
   ========================================= */

/* --- Header (Đã sửa lỗi khoảng trắng) --- */
#site-header {
    position: fixed; top: 0; left: 0; right: 0;
    background-color: var(--primary-color);
    height: 60px; /* Chiều cao cố định */
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; /* Dùng flex để căn giữa dọc */
    align-items: center; /* Căn giữa dọc tuyệt đối */
}

/* Logo */
.header-logo img { height: 40px; width: auto; display: block; }
@media (min-width: 768px) { .header-logo img { height: 45px; } }

/* Menu PC (Đã sửa khoảng cách) */
.desktop-menu { 
    display: flex; 
    gap: 20px; /* Giảm gap cho gọn */
    margin: 0; padding: 0; 
    height: 100%;
    align-items: center;
}
.desktop-menu li { display: flex; align-items: center; height: 100%; }
.desktop-menu li a {
    color: #fff; font-weight: 600; font-size: 13px;
    text-transform: uppercase; 
    padding: 5px 0; /* Giảm vùng đệm thừa */
    position: relative;
    white-space: nowrap; /* Không xuống dòng */
}
.desktop-menu li a:hover { color: var(--secondary-color); }
/* Gạch chân khi hover */
.desktop-menu li a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px;
    background: var(--secondary-color); transition: width 0.3s;
}
.desktop-menu li a:hover::after { width: 100%; }

/* --- Mobile Menu (Đã fix lỗi hiển thị) --- */
#side-main {
    position: fixed; top: 0; right: -320px;
    width: 280px; height: 100vh;
    background-color: var(--primary-color);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
    padding-top: 10px;
    display: block; 
}
#side-main.open { right: 0 !important; } 

#side-main .close-btn-wrap { text-align: right; padding: 10px 20px; }
#side-main li { border-top: 1px solid rgba(255,255,255,0.1); }
#side-main li a {
    display: block; padding: 15px 20px;
    color: #fff; text-transform: capitalize; font-weight: 500;
}
#side-main li a:hover { background: #fff; color: var(--primary-color); }

.bg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
}
.bg-overlay.show { display: block !important; }

/* --- Banner --- */
.banner-section { margin-top: 60px; margin-bottom: 30px; }

/* --- USP --- */
.divider-icon { height: 26px; background: url(https://hoclaiotothudo.com/img/home-title.jpg) no-repeat top center; margin: 15px auto; width: 100%; }
.usp-item { position: relative; padding-bottom: 15px; }
.usp-img-box { overflow: hidden; background: #fff; box-shadow: 5px 5px 15px rgba(0,0,0,0.1); }
.border-effect { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid var(--primary-color);  z-index: -1; }

/* --- Tabs --- */
.tab-btn { padding: 12px; font-weight: 700; text-transform: uppercase; background: #eee; border: none; color: #555; flex: 1; cursor: pointer; margin-bottom: 5px; width: 100%; }
@media (min-width: 768px) { .tab-btn { margin-bottom: 0; background: transparent; border-bottom: 2px solid transparent; width: auto; } }
.tab-btn.active { background: var(--primary-color); color: #fff; }
.tab-pane { display: none; animation: fadeIn 0.5s; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Course Box */
.course-wrap { position: relative; }
.course-border { position: absolute; z-index: 0; }
.course-inner { position: relative; z-index: 1; border-radius: 30px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.course-inner img { width: 100%; display: block; }

/* Price Box */
.price-container { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.price-box { background: #fff; border: 1px solid #eee; border-top-right-radius: 20px; border-bottom-left-radius: 20px; padding: 15px; text-align: center; box-shadow: 4px 4px 0 0 var(--primary-color); flex: 1; min-width: 30%; }

/* Form Inline */
.inline-form { background: var(--primary-color); padding: 20px; border-radius: 12px; margin-top: 20px; }
.inline-form h4 { color: #fff200; text-align: center; text-transform: uppercase; margin-bottom: 15px; font-weight: 700; }
.form-row { display: flex; gap: 10px; flex-direction: column; }
@media (min-width: 768px) { .form-row { flex-direction: row; } }
.form-input { padding: 12px; border-radius: 4px; border: none; outline: none; flex: 1; }
.form-btn { background: #fff200; color: var(--primary-color); font-weight: bold; padding: 12px 20px; border-radius: 4px; text-transform: uppercase; border: none; cursor: pointer; }

/* Reasons */
.reason-card { position: relative; margin-top: 50px; padding: 0 10px; }
.reason-content { background: #f7e9ea; border-radius: 10px; padding: 50px 20px 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: 100%; }
.reason-icon-wrapper { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; background: var(--primary-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; z-index: 5; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.reason-content h3 { color: var(--primary-color); font-weight: 700; text-align: center; margin-bottom: 15px; font-size: 1.1rem; }
.reason-content ul { list-style: disc; padding-left: 20px; font-size: 0.95rem; }

/* --- Slider 3D (Đã Fix lỗi dư khoảng trắng) --- */
.slider-wrapper { 
    position: relative; 
    width: 100%;          /* Fix: Full màn hình mobile */
    max-width: 500px;     /* Fix: Giới hạn trên PC */
    margin: 0 auto; 
    perspective: 1000px; 
    height: 300px;        /* Fix: Chiều cao gọn hơn */
    overflow: hidden;     /* Fix: Cắt bỏ phần thừa gây lỗi cuộn ngang */
}

.slider-3d { 
    position: relative; 
    width: 100%; 
    height: 100%; 
    transform-style: preserve-3d; 
}

.slide-3d { 
    position: absolute; 
    width: 70%;           /* Fix: Kích thước ảnh gọn vào giữa */
    height: 100%; 
    left: 15%;            /* Fix: Căn giữa (100% - 70%) / 2 = 15% */
    top: 0; 
    background: #fff; 
    border-radius: 15px; 
    overflow: hidden; 
    transition: 0.5s ease; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); 
}

.slide-3d img { width: 100%; height: 100%; object-fit: cover; }

.nav-btn { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: var(--primary-color); 
    color: #fff; 
    width: 35px; height: 35px; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    z-index: 100; opacity: 0.8;
}
.nav-btn:hover { opacity: 1; }
.nav-btn.prev { left: 10px; }  /* Fix: Đưa nút vào trong khung nhìn */
.nav-btn.next { right: 10px; } /* Fix: Đưa nút vào trong khung nhìn */

/* Footer */
#footer { background-color: var(--primary-color); color: #fff; padding-top: 40px; padding-bottom: 20px; }
#footer h4 { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 5px; display: inline-block; }
#footer ul li { display: flex; margin-bottom: 10px; font-size: 0.9rem; }
#footer ul li span { margin-right: 10px; }

/* Floating Buttons (Đã sửa lỗi trôi icon) */
.fixed-btn { 
    position: fixed; 
    right: 10px; /* Mobile: 10px cho gọn */
    z-index: 99; 
    width: 45px; height: 45px; 
    transition: 0.3s; 
}
@media (min-width: 768px) {
    .fixed-btn { right: 20px; /* PC: 20px cho thoáng */ width: 50px; height: 50px; }
}
.fixed-btn:hover { transform: scale(1.1); }
.fixed-btn img { width: 100%; height: 100%; object-fit: contain; }

/* Vị trí các nút */
.zalo-btn { bottom: 85px; }
.tiktok-btn { bottom: 140px; }
.phone-btn { 
    bottom: 25px; left: 20px; right: auto; /* Phone luôn bên trái */
    background: var(--primary-color); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    animation: pulse 2s infinite; 
    width: 50px; height: 50px;
}
.phone-bar { 
    position: fixed; left: 40px; bottom: 33px; 
    background: var(--primary-color); color: #fff; 
    padding: 5px 15px 5px 35px; border-radius: 20px; 
    font-weight: bold; z-index: 90; font-size: 0.9rem; 
}

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 63, 109, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(18, 63, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 63, 109, 0); } }


/* =========================================
   5. NEW FEATURES (Countdown, Team, Feedback)
   ========================================= */

/* --- Countdown Timer (Ưu đãi khan hiếm) --- */
.countdown-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px dashed #FD0323;
	margin-top: 10px;
}
.countdown-text {
    color: black;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}
.countdown-timer {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FD0323;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums; /* Giữ số không bị nhảy khi chạy */
}

/* --- Team Member (Đội ngũ) --- */
.team-item {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-bottom: 3px solid var(--primary-color);
}
.team-item:hover {
    transform: translateY(-5px);
}
.team-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}
.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-name {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}
.team-role {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* --- Feedback (Khách hàng) --- */
.feedback-card {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    position: relative;
    border: 1px solid #eee;
}
.feedback-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}
.feedback-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.stars { color: #f1c40f; font-size: 0.9rem; margin-top: 3px; }
.feedback-content {
    font-style: italic;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}
.quote-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 3rem;
    color: rgba(18, 63, 109, 0.1);
    font-family: serif;
}