/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui;
}

body {
    background: #0b1220;
    color: white;
    line-height: 1.6;
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}

/* TOPBAR */
.topbar {
    background: #1e2d45;
    border-bottom: 1px solid #22c55e;
    /* viền xanh lá mỏng */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
}

.topbar img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.topbar-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.topbar-address {
    font-size: 12px;
    opacity: 0.7;
}

.highlight {
    color: #22c55e;
    font-weight: 700;
}

/* HERO */
.hero {
    padding: 30px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: start;
    /* FIX: tránh hero-right bị kéo dài */
}

/* BADGE */
.badge {
    display: inline-block;
    background: rgba(34, 197, 94, .15);
    color: #22c55e;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 10px;
}

/* TITLE */
.hero h1 {
    font-size: clamp(26px, 3vw, 42px);
    margin-bottom: 10px;
}

/* TAGLINE */
.hero-tagline {
    margin-top: 8px;
    margin-bottom: 12px;
    /* FIX: thêm khoảng cách dưới */
}

.tagline-main {
    font-size: 16px;
    font-weight: 600;
}

.tagline-sub {
    font-size: 16px;
    color: #22c55e;
    font-weight: 700;
}

/* TRUST */
.trust {
    font-size: 15px;
    opacity: 0.85;
    margin-top: 4px;
    padding-left: 8px;
}

/* BUTTON */
.cta-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.btn {
    display: inline-block;
    /* FIX: đảm bảo padding hoạt động đúng */
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.85;
}

.primary {
    background: #22c55e;
    color: white;
}

.ghost {
    border: 1px solid #ffffff44;
    color: white;
}

/* FIX: class .big dùng trong HTML nhưng thiếu trong CSS */
.big {
    padding: 14px 28px;
    font-size: 16px;
}

.full {
    width: 100%;
    display: block;
    /* FIX: full-width cần block */
}

/* HERO CARDS */
.hero-right {
    display: flex;
    flex-direction: column;
}

.card-highlight {
    background: #111c33;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.card-highlight h3 {
    margin-bottom: 4px;
}

/* GALLERY */
.gallery {
    padding: 1px 0;
    text-align: center;
}

.gallery h2 {
    margin-bottom: 0;
    /* handled by scroll-track margin-top */
}

/* AUTO SCROLL */
.scroll-track {
    overflow: hidden;
    margin-top: 20px;
}

.scroll-content {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: scrollLeft 25s linear infinite;
}

.scroll-content img {
    height: 260px;
    width: auto;
    object-fit: cover;
    /* FIX: contain để lộ nền xấu, dùng cover đẹp hơn */
    border-radius: 12px;
    background: #0b1220;
}

/* ANIMATION */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* SECTION */
.section {
    padding: 20px 0;
    text-align: center;
}

.section h2 {
    margin-bottom: 8px;
    /* FIX: tiêu đề bị dính vào grid */
}

/* GRID KHÓA HỌC */
.grid {
    display: grid;
    /* FIX: 6 cột quá chật, dùng auto-fit responsive thay thế */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.card {
    background: white;
    color: black;
    padding: 16px;
    border-radius: 12px;
    text-align: left;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    margin-bottom: 8px;
    /* FIX: thêm khoảng cách giữa tiêu đề và nội dung */
    font-size: 15px;
}

.card p {
    font-size: 13px;
    line-height: 1.7;
}

/* CTA */
.cta {
    background: #22c55e;
    padding: 30px 0;
    text-align: center;
    color: white;
}

.cta h2 {
    color: white;
    margin-bottom: 12px;
}

.cta p {
    margin-bottom: 24px;
    /* FIX: khoảng cách trước nút */
    font-size: 15px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Nút ghost trong CTA */
.cta .ghost {
    border-color: #ffffff66;
    color: white;
}

/* Nút primary trong CTA thêm viền trắng để phân biệt với nền */
.cta .primary {
    border: 2px solid white;
}

/* FOOTER */
.footer {
    background: #020617;
    padding: 50px 0;
    color: #cbd5e1;
    /* FIX: text footer bị tối, cần màu rõ hơn */
}

.footer h3,
.footer h4 {
    color: white;
    margin-bottom: 10px;
}

.footer p {
    margin-bottom: 4px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    /* FIX: tăng khoảng cách */
    opacity: .6;
    font-size: 13px;
}

/* FLOAT */
.float {
    position: fixed;
    bottom: 15px;
    right: 15px;
    display: grid;
    gap: 10px;
    z-index: 999;
    /* FIX: đảm bảo nút nổi luôn hiển thị trên cùng */
}

.float a {
    background: #22c55e;
    padding: 10px 14px;
    border-radius: 999px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    /* FIX: thêm shadow nổi bật */
    transition: transform 0.2s;
}

.float a:hover {
    transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .scroll-content img {
        height: 180px;
    }

    /* FIX: grid khóa học trên mobile */
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 22px;
    }

    .topbar {
        font-size: 13px;
    }

    .topbar img {
        height: 36px;
        width: 36px;
    }

    .topbar-address {
        font-size: 11px;
    }
}