:root {
    --primary-header-text: #00ADEE;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f4f8;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 86px;
    border-bottom: 1px solid #e6ecf2;
    padding: 15px 120px;
    opacity: 1;
    background: #fff;
}

header img {
    height: 40px;
}

.btn-register {
    background: linear-gradient(178.35deg, #77C8FF 1.4%, #0095F9 62.22%, #007CD0 125.29%);
    color: #fff;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 136, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-register .home-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Hero / Banner */
.hero {
    width: 100%;
    position: relative;
    background-image: url('https://blob.kcam.io/uploads/tool-sale/xx88-brand-ambassador/images/background.png');
    background-size: cover;
    background-position: center;
}

.hero img.banner {
    width: 100%;
    display: block;
}

.hero img.banner-mobile {
    display: none;
}

/* Banner separator */
.banner-separator {
    background-color: #00a2ff;
    color: white;
    text-align: center;
    padding: 10px 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow: hidden;
}

.banner-separator img {
    height: 20px;
    margin: 0;
}

/* Video Section */
.video-section {
    padding: 96px 20px;
    position: relative;
    text-align: center;
}

.video-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container .bg-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    cursor: pointer;
    transition: transform 0.3s;
}

.play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Floating Comments */
.comment {
    position: absolute;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 360px;
    z-index: 10;
}

.comment.top-left {
    top: 14px;
    left: 96px;
}

.comment.bottom-right {
    bottom: 8px;
    right: 364px;
}

.comment-text {
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
    width: 255px;
    min-height: 70px;
    padding: 10px 10px 10px 34px;
    display: flex;
    align-items: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    left: 56px;
}

.comment.top-left .comment-text {
    background-image: url('https://blob.kcam.io/uploads/tool-sale/xx88-brand-ambassador/images/comment-frame.png');
}

.comment.bottom-right .comment-text {
    background-image: url('https://blob.kcam.io/uploads/tool-sale/xx88-brand-ambassador/images/comment-frame-red.png');
}

.comment img.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.comment img.frame {
    height: 70px;
    margin: 0 10px;
}

.comment img.comment-vector-left {
    position: absolute;
    top: 72px;
    right: 24px;
}

.comment img.comment-vector-left-mb {
    display: none;
}

.comment img.comment-vector-right {
    position: absolute;
    bottom: 40px;
    right: -284px;
}

.comment img.comment-vector-right-mb {
    display: none;
}

/* Section Titles */
.section-title {
    text-align: center;
    color: var(--primary-header-text);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 50px 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title img {
    width: 76px;
    height: 50px;
    object-fit: contain;
}

/* Content Blocks */
.content-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 40px;
    margin-bottom: 50px;
    gap: 30px;
}

.content-block.reverse {
    flex-direction: row-reverse;
}

.content-image {
    flex: 1;
    min-width: 300px;
}

.content-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.content-text {
    flex: 1;
    min-width: 300px;
}

.content-text h3 {
    color: var(--primary-header-text);
    margin-bottom: 15px;
    font-size: 22px;
    text-transform: uppercase;
}

.content-text p {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #555;
    text-align: justify;
}

.content-text ul {
    list-style: none;
}

.content-text ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.content-text ul li::before {
    content: "▶";
    color: #00a2ff;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 12px;
}

/* Text Center Block */
.text-center-block {
    text-align: center;
    padding: 0 60px;
    margin-bottom: 40px;
    line-height: 1.8;
    color: #444;
}

/* Stats Section */
.stats-section {
    display: flex;
    align-items: center;
    padding: 40px;
    background: #f8fbff;
    margin-bottom: 40px;
    gap: 20px;
}

.stats-img {
    flex: 1;
    text-align: center;
}

.stats-img img {
    max-width: 100%;
    height: auto;
}

.stats-data {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-title-img {
    max-width: 312px;
    height: auto;
    margin-bottom: 20px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 700px;
}

.stat-item {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #75c9ff;
    padding-bottom: 8px;
    gap: 20px;
}

.stat-box {
    background: linear-gradient(90deg, #1fa2ff, #54c5ff);
    color: #fff;
    min-width: 110px;
    text-align: center;
    padding: 8px 10px;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-num {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    font-weight: bold;
}

.stat-desc {
    color: #00a2ff;
    font-weight: bold;
    font-size: 16px;
    flex: 1;
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 20px 40px;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.03);
    z-index: 2;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* Tùy chỉnh độ rộng 2 ảnh để khớp với thiết kế */
.gallery-item:nth-child(3),
.gallery-item:nth-child(4) {
    grid-column: span 2;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4) {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {

    .hero img.banner-desktop {
        display: none;
    }

    .hero img.banner-mobile {
        display: block;
    }

    .content-block,
    .content-block.reverse {
        flex-direction: column;
        padding: 0 20px;
        gap: 20px;
    }

    .content-image,
    .content-text {
        min-width: 100%;
    }

    .text-center-block {
        padding: 0 20px;
        text-align: justify;
    }

    .stats-section {
        flex-direction: column;
        padding: 30px 20px;
    }

    .section-title {
        font-size: 17px;
        line-height: 1.4;
        padding: 0 10px;
    }

    .content-text h3 {
        font-size: 20px;
    }

    .video-section {
        padding: 64px 20px;
    }

    /* Phục hồi & Scale bình luận trên mobile giống ảnh mb.jpg */
    .comment {
        transform: scale(0.65);
    }

    .comment.top-left {
        top: 12px;
        left: 8px;
        transform-origin: top left;
    }

    .comment.bottom-right {
        bottom: 10px;
        right: 174px;
        transform-origin: bottom right;
    }

    .comment img.comment-vector-left,
    .comment img.comment-vector-right {
        display: none;
    }

    .comment img.comment-vector-left-mb,
    .comment img.comment-vector-right-mb {
        display: block;
        position: absolute;
    }

    .comment img.comment-vector-left-mb {
        top: 72px;
        right: 24px;
    }

    .comment img.comment-vector-right-mb {
        bottom: 40px;
        right: -284px;
    }

    .play-btn {
        width: 50px;
    }
}

@media (max-width: 500px) {
    header {
        padding: 10px 15px;
    }

    header img {
        height: 30px;
    }

    .btn-register {
        padding: 8px 15px;
        font-size: 14px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        /* Giữ 2 cột cho các ảnh nhỏ */
    }

    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4) {
        grid-column: span 2;
    }

    /* Dàn xếp stats list cho mobile */
    .stat-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .stat-box {
        min-width: 75px;
        padding: 5px;
    }

    .stat-num {
        font-size: 18px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-desc {
        font-size: 13px;
        line-height: 1.4;
    }

    .banner-separator img {
        height: 15px;
        margin: 0;
    }

    .banner-separator img:nth-child(n+4) {
        display: none;
    }
}