/* Import font Roboto từ Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}
.text-red{
    color: #FF0000;
}
.fw-500{
    font-weight: 500;
}
.fw-600{
    font-weight: 500;
}
.text-small{
    font-size: 14px;
}
.text-normal{
    font-size: 16px;
}
.mobile-reverse{
    flex-direction: column;
}
header{
    .nav{
        gap: 24px;
    }
    .nav-link{
        height: fit-content;
    }
}
.btn-login{
    background: linear-gradient(90deg, #8D0000, #FF0000);
    border-radius: 24px;
    border: 1px solid red;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
}
.btn-register{
    border-radius: 24px;
    border: 1px solid #ABABAB;
    box-shadow: inset 0 0 0 1px #000000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    color: #D4150C;
}
.contact-mobile{
    display: none;
}
.marqueez{
    background-color: #FF0000;
    marquee{
        padding-top: 5px;
    }
}
.btn-mobile{
    display: none;
}

.text-title{
    margin: auto;
    font-size: 24px;
    text-align: center;
    padding: 8px 0;
    background: linear-gradient(to right, #D50000 0%, #960001 100%);
    color: #ffffff;
    width: 70%;
    border: 1px solid #000000;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
}
.sub-title-wrapper {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
    margin-top: 24px;
}
.sub-title{
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    color: #ffffff;
    background: linear-gradient(180deg, #D50000 0%, #960001 100%);
    width: fit-content;
    text-transform: uppercase;
    border-top-right-radius: 30px;
}
.hop-tac-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.hop-tac-item{
    padding: 24px 8px;
    img{
        margin: auto;
        max-width: 100px;
    }
    h5{
        font-size: 16px;
        font-weight: 600;
        margin-top: 8px;
        margin-bottom: 16px;
        color: red;
        text-align: center;
    }
    p{
        font-size: 14px;
        margin-bottom: 0;
        color: #000000;
        text-align: start;
    }
}
.brand-wrapper{
    gap: 24px;
}
.brand-wrapper video{
    width: 50%;
    border-radius: 16px;
}
.brand-wrapper img {
    width: calc(50% - 24px);
}
.money-title{
    font-size: 16px;
    font-weight: 700;
    color: red;
    text-transform: uppercase;
}
.money-wrapper {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.money-item{
    position: relative;
}
.step-img{
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    img{
        max-width: 190px;
    }
}
.money-content{
    padding: 40px 16px 24px;
    min-height: 200px;
    background: linear-gradient(180deg, #F6576A 0%, #C63741 100%);
    border-radius: 16px;
    h5{
        font-size: 16px;
        color: #ffffff;
        font-weight: 600;
        text-align: center;
        margin-bottom: 12px;
    }
    p{
        font-size: 14px;
        color: #ffffff;
        margin-bottom: 0;
    }
}
.commission-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
    overflow: hidden;
    /*border-radius: 12px;*/
}
.commission-table thead {
    border-color: #000000;
    border-style: solid;
    border-width: 1px;
}

.commission-table thead tr th {
    border-right: 1px solid rgb(0 0 0);
    padding: 12px 0;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(180deg, #F6576A 0%, #C63741 100%);
}

.commission-table tbody tr td {
    padding: 12px 0;
    border: 1px solid rgb(0 0 0);
}

.commission-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.03);
}
.hoa-hong-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px auto;
    width: 70%;
    img{
        width: 100%;
    }
}
.intro-box {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    border-radius: 20px;
    overflow: hidden;
}

.intro-box {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.intro-left {
    background: linear-gradient(90deg, #F6576A 0%, #C63741 100%);
    padding: 30px 100px 30px 30px;
    color: white;
    width: 120%;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

.intro-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tinh-toan-hoa-hong{
    width: 300px;
    margin: 16px auto;
    cursor: pointer;
}
.tinh-toan-title{
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(180deg, #F6576A 0%, #C63741 100%);
    padding: 8px 0;
    text-align: center;
    color: #ffffff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.tinh-toan-wrapper{
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
}
.calculate-final{
    padding: 8px 0;
    background: linear-gradient(180deg, #F6576A 0%, #C63741 100%);
    border-radius: 16px;
}
.detail-calculate{
    margin: auto;
    cursor: pointer;
    width: 280px;
}
#detailCalculate {
    display: none;
}
.close-calc {
    position: absolute;
    top: -5px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 999;
}

#calculateModal {
    .modal-content{
        border-radius: 20px;
    }
    .modal-header{
        font-size: 16px;
        font-weight: 600;
        background: linear-gradient(180deg, #F6576A 0%, #C63741 100%);
        padding: 8px 0;
        text-align: center;
        color: #ffffff;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        justify-content: center;
    }
    .btn-close{
        position: absolute;
        top: 15px;
        right: 16px;
        border: none;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
    }
    .box {
        background: #FFCFD0;
        padding: 18px 18px 10px;
        border-radius: 8px;
        margin-bottom: 18px;
        p{
            margin-bottom: 8px;
            font-size: 14px;
        }
        h5{
            font-size: 16px;
            font-weight: 600;
        }
    }
    .box-special{
        padding-bottom: 18px;
    }

    .bold {
        font-weight: bold;
    }

    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 10px;
    }

    .subbox {
        background: #fff;
        border-radius: 8px;
        padding: 10px;
        border: 1px solid #eed0d0;
    }

    .result-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 20px;
    }

    .result-item {
        text-align: center;
    }
}
@media (max-width: 992px) {
    .container{
        max-width: 800px;
    }
    header{
        .nav{
            gap: 8px;
        }
        .nav-link{
            font-size: 14px;
        }
    }
    .header-logo{
        width: 260px;
    }
    .marqueez{
        marquee{
            padding-top: 3px;
        }
        span{
            font-size: 14px;
        }
    }
    .mobile-reverse{
        flex-direction: column-reverse;
    }
    .text-title{
        display: none;
    }
    .sub-title{
        font-size: 16px;
    }
    .hop-tac-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    .money-wrapper {
        margin-top: 50px;
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
        row-gap: 40px;
    }
    .step-img{
        top: -35px;
        img{
            max-width: 100px;
        }
    }
    .money-content{
        padding: 32px 12px 16px;
        min-height: 150px;
        border-radius: 8px;
        h5{
            font-size: 14px;
            margin-bottom: 12px;
        }
        p{
            font-size: 12px;
        }
    }
    .hoa-hong-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .hoa-hong-item:nth-child(3) {
        grid-column: 1 / span 2;
        justify-self: center;
        width: calc(50% - 10px);
    }

    .hoa-hong-item:nth-child(3) img {
        width: 100%;
    }
    .intro-box {
        grid-template-columns: 1fr;
        border-radius: 0;
        p, ul{
            font-size: 14px;
        }
    }

    .intro-left {
        width: 100%;
        clip-path: none;
        padding: 16px;
    }

    .intro-right img {
        height: auto;
    }
}

@media (max-width: 768px) {
    .carousel-indicators {
        bottom: -20px;
    }
    .header-logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .contact-mobile{
        display: block;
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }
    .marqueez{
        display: none;
    }
    .btn-mobile{
        display: flex;
        width: 100%;
        a{
            width: 50%;
        }
        .btn-login-mobile{
            text-align: center;
            background: linear-gradient(90deg, #8D0000, #FF0000);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
            text-decoration: none;
            padding: 4px;
        }
        .btn-register-mobile{
            text-align: center;
            box-shadow: inset 0 0 0 1px #000000;
            box-shadow: 0 4px 8px rgba(0,0,0,0.25);
            color: #D4150C;
            text-decoration: none;
            padding: 4px;
        }
    }
    .sub-title-wrapper {
        display: flex;
        justify-content: center;
    }
    .sub-title{
        font-size: 14px;
        padding: 4px 18px 0px;
        border-top-right-radius: 20px;
        border-top-left-radius: 20px;
    }

    .hop-tac-item{
        padding: 16px 4px;
        img{
            max-width: 80px;
        }
        h5{
            font-size: 14px;
            margin-bottom: 8px;
        }
        p{
            font-size: 12px;
        }
    }
    .money-wrapper > div:nth-child(3) {
        grid-column: 1 / span 2;
        justify-self: center;
        width: calc(50% - 10px);
    }
    .brand-wrapper{
        flex-direction: column;
    }
    .brand-wrapper video,
    .brand-wrapper img {
        width: 100%;
    }
    .money-wrapper{
        gap: 16px;
        row-gap: 40px;
    }
    .money-content{
        min-height: 180px;
    }
    .commission-table thead tr th {
        font-size: 14px;
    }

    .commission-table tbody tr td {
        font-size: 14px;
    }
    .text-small{
        font-size: 14px;
    }
    .hoa-hong-wrapper {
        width: 80%;
    }
    #myModal {
        display: none;
    }

    /* Khi mở modal, hiển thị */
    #myModal.open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Đổ màu nền mờ */
        z-index: 999;
    }

    #myModal{
        .modal-content {
            background-color: #fff;
            margin: 50px auto;
            padding: 0;
            border-radius: 20px;
            width: 90%;
            max-width: 600px;
        }
    }
    #calculateModal {
        .box {
            padding: 12px 12px 4px;
            margin-bottom: 8px;
        }
        .result-grid {
            column-gap: 8px;
        }
        .subbox {
            padding: 8px 8px 0;
        }
        .box-special{
            padding-bottom: 12px;
        }
        .result-grid{
            grid-template-columns: 1fr;
        }
    }
}

@media (max-width: 550px) {
    .money-content{
        min-height: 230px;
        h5{
            min-height: 35px;
        }
    }
    .hoa-hong-wrapper {
        width: 100%;
    }
}