.background {
    margin: none;
    padding: none;
    background-color: #FBE8BD;
}

/*banner*/
.banner {
    background-color: #193060;
    height: 970px;
    position: relative;
}

.pagetitle {
    position: absolute;
    top: 245px;
    left: 115px;
}

.banner h2 {
    position: absolute;
    top: 565px;
    left: 270px;
    width: 240px;
    text-align: left;
}

.mobilelantern {
    display: none;
}

.lantern:first-child {
    position: absolute;
    top: 180px;
}

.lantern:nth-child(2) {
    position: absolute;
    top: 110px;
    right: 40px;
}

.lantern:nth-child(3) {
    position: absolute;
    top: 510px;
    z-index: 2;
}

.lantern:nth-child(4) {
    position: absolute;
    top: 660px;
    right: 0px;
    z-index: 2;
}


/*chinese new year*/
.intro {
    display: flex;
    flex-wrap: wrap;
    max-width: 80%;
    justify-content: center;
    align-items: center;
    margin: 60px auto;
    gap: 20px;
}

.cny {
    text-align: left;
    margin-left: 50px;
    max-width: 50%;
}

/*history,mythology title*/
.titlebanner {
    background-color: #AB141C;
    padding: 10px 0;
    width: 100%;
}

/*history content*/
.historytext {
    background-color: #193060;
    display: flex;
    flex-wrap: wrap;
    text-align: left;
    justify-content: center;
    padding: 60px 0;
}

.historytext p {
    color: #FBE8BD;
    max-width: 80%;
}

/*legend*/
.content {
    display: flex;
    flex-wrap: wrap;
    max-width: 80%;
    justify-content: space-between;
    align-items: center;
    margin: 80px auto;
}

.nian,
.zodiac {
    max-width: 1280px;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
}

.nian {
    margin-bottom: 80px;
}

.niantext,
.zodiactext {
    margin: 0;
    padding: 0;
    max-width: 50%;
}

.nian .subtitle h2 {
    background-color: #193060;
    border-radius: 0 50px 50px 0;
    text-align: left;
    padding: 15px 0 15px 55px;
    margin: 0;
}

.nian .story {
    text-align: left;
    max-width: 80%;
    margin: 50px 0 0 80px;
    display: flex;
}

.zodiac .subtitle h2 {
    background-color: #193060;
    border-radius: 50px 0 0 50px;
    padding: 15px 85px 15px 0;
    text-align: right;
    margin: 0;
}

.zodiac .story {
    max-width: 80%;
    margin: 50px 0 0 40px;
    display: flex;
    text-align: left;
}

/* Tablet and mobile styles */
@media screen and (max-width: 1080px) {

    /*chinese new year*/
    .intro {
        display: flex;
        flex-wrap: wrap;
        max-width: 80%;
        justify-content: center;
        align-items: center;
        margin: 60px auto;
        gap: 20px;
    }

    .cny {
        text-align: left;
        margin-left: 50px;
        max-width: 50%;
    }

    /*history content*/
    .titlebanner {
        background-color: #AB141C;
        padding: 1px 0;
        width: 100%;
    }

    .history p {
        justify-content: center;
        margin: 0px 60px 0px 60px;
    }

    /*legend*/
    .content {
        display: flex;
        flex-wrap: wrap;
        max-width: 80%;
        justify-content: space-between;
        align-items: center;
        margin: 80px auto;
    }

    .nian,
    .zodiac {
        max-width: 1080px;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
    }

    .content {
        max-width: 100%;
        margin: 60px auto;
        padding: 0;
    }

    .nian .subtitle,
    .zodiac .subtitle {
        max-width: 100%;
        padding: 0;
        margin: 0 0 30px 0;
    }
}

@media screen and (max-width: 910px) {
    .banner {
        min-height: 100vh;
        position: relative;
    }

    .pagetitle {
        position: absolute;
        top: 245px;
        left: 115px;
    }

    .banner h2 {
        position: absolute;
        top: 600px;
        left: 40px;
    }

    .lantern {
        display: none;
    }

    .mobilelantern:first-child {
        display: block;
        position: absolute;
        top: 127px;
        left: 20px;
        aspect-ratio: 3/1;
    }

    .mobilelantern:nth-child(2) {
        display: block;
        position: absolute;
        top: 50px;
        right: -85px;
    }

    .mobilelantern:nth-child(3) {
        display: block;
        position: absolute;
        top: 360px;
        left: -57px;
        z-index: 2;
    }

    .mobilelantern:nth-child(4) {
        display: block;
        position: absolute;
        top: 500px;
        right: 15px;
        z-index: 2;
    }

    .cloud {
        display: none
    }

    .mobilecloud {
        display: block;
    }

    .mobilecloud:first-child {
        position: absolute;
        top: 435px;
        right: -25px;
        z-index: 1;
    }

    .mobilecloud:nth-child(2) {
        position: absolute;
        top: 565px;
        left: -70px;
        z-index: 1;
    }

    /*chinese new year*/
    .intro {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 60px;
        justify-content: center;
    }

    .cny {
        margin: 0;
        max-width: 100%;
    }

    /*history content*/
    .titlebanner {
        background-color: #AB141C;
        padding: 1px 0;
        width: 100%;
    }

    .history p {
        justify-content: center;
        margin: 0px 60px 0px 60px;
    }

    /*mythology*/
    .content {
        justify-content: center;
        max-width: 100%;
        margin: 60px auto;
        padding: 0;
    }

    .nian .subtitle,
    .zodiac .subtitle {
        max-width: 100%;
        padding: 0;
        margin: 0 0 30px 0;
    }

    .nian>div:first-child {
        order: 2;
        /* Image comes second */
    }

    .nian .niantext {
        display: contents;
        /* This makes the children behave as direct children of .nian */
    }

    .nian .subtitle h2 {
        border-radius: 0 50px 50px 0;
        text-align: left;
        justify-items: left;
        width: 100%;
        order: 1;
        /* Subtitle comes first */
    }

    .nian .story {
        margin: 0;
        text-align: left;
        order: 3;
        /* Story comes third */
    }

    .zodiac .zodiactext {
        display: contents;
        /* This makes the children behave as direct children of .zodiac */
    }

    .zodiac .subtitle h2 {
        border-radius: 50px 0 0 50px;
        text-align: right;
        width: 100%;
        order: 1;
        /* Subtitle comes first */
    }

    .zodiac .story {
        margin: 0;
        text-align: left;
        order: 3;
        /* Story comes third */
    }

    .zodiac>div:last-child {
        order: 2;
        /* Image comes second */
    }

}

@media screen and (max-width: 600px) {
    .pagetitle img {
        position: absolute;
        width: 60%;
        object-fit: fill;
    }

    .banner h2 {
        position: absolute;
        top: 600px;
        left: 40px;
    }

    .lantern {
        display: none;
    }

    .mobilelantern:first-child {
        display: block;
        position: absolute;
        top: 127px;
        left: 20px;
        aspect-ratio: 3/1;
    }

    .mobilelantern:nth-child(2) {
        display: block;
        position: absolute;
        top: 50px;
        right: -85px;
    }

    .mobilelantern:nth-child(3) {
        display: block;
        position: absolute;
        top: 360px;
        left: -57px;
        z-index: 2;
    }

    .mobilelantern:nth-child(4) {
        display: block;
        position: absolute;
        top: 500px;
        right: 15px;
        z-index: 2;
    }

}