@import '../variables.less';

@darkBg: #171B29;
@btnBlue: #3D3FEA;
@bgGrey: #F7F8F9;
@H0: 30px;
@H1: 24px;
@H2: 20px;
@H3: 18px;
@P1: 16px;

.section-title {
    padding-bottom: 5rem;
    text-align: center;
    font-size: @H0;

    @media (max-width: 1024px) {
        font-size: @H1;
    }
}

.read-more {
    a {
        position: relative;
        margin-top: 1rem;
        transition: 0.5s;
        padding-left: 0;
        font-size: @P1;
        color: @btnBlue;

        &:hover {
            padding-left: 1rem;
            color: @btnBlue;

            &::after {
                opacity: 1;
                left: 0;
            }
        }

        &::after {
            content: '➔';
            position: absolute;
            opacity: 0;
            left: -1rem;
            top: 50%;
            transform: translateY(-50%);
            transition: opacity .5s, left .5s;
        }
    }
}

button {
    padding: 13px 2rem;
    font-size: @P1;
    color: #FFFFFF;
    background: @btnBlue;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.container {
    max-width: 1288px;
}

section {
    padding-left: 1rem;
    padding-right: 1rem;
}

.campaign-v5 {
    &-hero {
        position: relative;
        background: url('https://download.pingcap.com/images/campaign/tidb-v5.0/hero-pc.svg');
        background-repeat: no-repeat;
        background-size: cover;

        .hero-body {
            padding: 15rem 0;
        }

        .slogan {
            z-index: 1;
            color: #FFFFFF;

            &-title {
                font-size: 40px;
            }

            &-subtitle {
                display: flex;
                align-items: center;
                padding: 0.5rem 0 2rem;
                font-size: @H1;

                img {
                    width: 100px;
                    margin-right: 1rem;
                }
            }

            .book-btn button {
                color: #2D3758;
                background: white;
                font-size: @H2;

                &:hover {
                    color: white;
                    background: #0A2559;
                    transition: 0.1s ease-in-out;
                }
            }
        }

        .recrution-banner {
            width: 45%;
            z-index: 1;

            img {
                width: 100%;
            }
        }

        .hero-bg {
            position: absolute;

            &.hero-bg1 {
                left: 0;
            }

            &.hero-bg2 {
                right: 0;
                bottom: 0;
            }
        }
    }

    &-intro {
        background: @bgGrey;

        .book-btn-mobile {
            display: none;
        }

        .intro {
            padding: 5rem 0;
            margin: 0 auto;
            text-align: center;
            width: 83%;
            font-size: @P1;
            font-family: Lato-light;
            line-height: 1.75;

            p {
                padding-bottom: 2rem;
                line-height: 1.7;
            }
        }
    }

    &-features {
        background: @bgGrey;

        .columns {
            padding-bottom: 5rem;

            &.reverse {
                flex-direction: row-reverse;
            }
        }

        .column {
            .feat-title {
                margin-bottom: 1rem;
                font-size: @H0;
            }

            .feat-subtitle {
                margin-bottom: 1rem;
                font-size: @H1;
            }

            p {
                font-size: @P1;
                line-height: 1.75;
                font-family: Lato-light;

                span {
                    font-family: Lato;
                }
            }

            &.align-center {
                text-align: center;
            }
        }
    }

    &-ribbon {
        padding: 0;

        img {
            width: 100%;
        }

        .mobile {
            display: none;
        }
    }

    &-try {
        background: @bgGrey;

        .section-title {
            padding: 3rem 0 1rem;
            text-align: left;
        }

        p {
            font-size: @H3;
            font-family: Lato-light;
            padding-bottom: 0.5rem;
            line-height: 1.75;
        }

        .read-more {
            margin-top: 0;
            font-size: @H3;
        }

        .rights {
            .card {
                padding: 1rem 2rem;
                height: 100%;
                border-radius: 10px;

                .card-title {
                    padding: 0.5rem 0;
                    font-size: @H1;
                }

                .icons {
                    text-align: center;
                    padding: 1rem 0;
                }

                .detail {
                    font-size: @P1;
                    font-family: Lato-light;
                    line-height: 1.75;
                }
            }
        }

        .book {
            margin-top: 3rem;
            text-align: center;

            p {
                padding: 1rem;
                font-size: @P1;
            }
        }
    }

    &-test-pkg {
        background: @bgGrey;
        padding-bottom: 5rem;

        .section-title {
            padding: 3rem 0 1rem;
            text-align: left;
        }

        .column.right-icon {
            text-align: right;
        }

        ul {
            li {
                font-size: @P1;
                color: @btnBlue;
                font-family: Lato-light;

                &:hover {
                    a {
                        color: @btnBlue;
                        text-decoration: underline;
                    }
                }
            }
        }
    }

    &-case {
        padding-bottom: 3rem;

        .section-title {
            padding: 3rem 0 2rem;
        }

        .column {
            text-align: center;

            img {
                height: 100px;
                width: auto;
            }

            p {
                font-size: @P1;
                font-family: Lato-light;
                padding: 1rem 0;
            }
        }


    }
}

@media (max-width: 1024px) {
    .section-title {
        padding-bottom: 3rem;
    }

    .campaign-v5 {
        &-hero {
            text-align: center;
            position: relative;
            background: url('https://download.pingcap.com/images/campaign/tidb-v5.0/hero-mobile.svg');
            background-repeat: no-repeat;
            background-size: cover;

            .hero-body {
                padding: 16rem 0;
            }

            .slogan {
                width: 100%;

                &-title {
                    font-size: 32px;
                }

                &-subtitle {
                    justify-content: center;
                    padding: 0.5rem 0;
                    font-size: @H3;

                    .tidb-logo {
                        display: none;
                    }
                }

                .book-btn {
                    display: none;
                }
            }

            .recrution-banner {
                display: none;
            }

            .hero-bg {

                &.hero-bg1,
                &.hero-bg2 {
                    width: 50%;
                }
            }
        }

        &-intro {
            .intro {
                padding: 2rem 0;
                text-align: left;
                width: 100%;
            }

            .book-btn-mobile {
                display: block;
                text-align: center;
                padding-top: 2rem;
            }
        }

        &-features {
            .columns {
                padding-bottom: 3rem;

                &.reverse {
                    flex-direction: row;
                }
            }

            .column {
                .feat-title {
                    font-size: @H1;
                }

                .feat-subtitle {
                    font-size: @H3 ;
                }

                img {
                    width: 50%;
                }

                &.align-center {
                    text-align: left;
                }
            }
        }

        &-try {
            .rights {
                .card {
                    padding: 2rem 2.5rem;
                }
            }
        }

        &-ribbon {
            .pc {
                display: none;
            }

            .mobile {
                display: block;
            }
        }

        &-case {
            .section-title {
                text-align: left;
            }

            .column {
                width: 49%;
                display: inline-block;

                &:nth-child(3) {
                    img {
                        width: 100%;
                        height: auto;
                    }
                }
            }
        }
    }
}

@media (max-width: 412px) {
    .campaign-v5 {
        &-hero {
            .hero-body {
                padding: 6rem 0;
            }
        }
    }
}
