html, body {
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    font-size: 70px;
    margin-bottom: 50px;
}

.container {
    background-color: lightskyblue;

    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    width: 48%;
    float: left;
    overflow: hidden;

    transition: all 1s ease-in-out;
}

#pippo {
    float: right;
}

.container:hover {
    width: 52%;
    background-color: lightsteelblue;
}

.container > p {
    color: #000;
    font-weight: 600;
    font-size: 30px;
    text-align: center;

    padding: 60px;
}

#casetta {
    position: fixed;

    top: 5px;
    left: 5px;
}

mark {
    color: #a86800;
    background-color: #fff;
}

#boxColorato {
    width: 30px;
    height: 30px;
    background: red;

    position: absolute;
    top: 0;
    right: 0px;

    animation: animazione 5s infinite ease-in-out alternate;
}

#boxColorato:hover {
    animation-play-state: paused;
}

footer {
    width: 100%;
    height: 60px;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;

    position: absolute;
    bottom: 0;

    font-size: 17px;
}

#casettaImg {
    width: 50px;
    height: 50px;
}

@keyframes animazione {
    0% {
        top: 0px;
        right: 0px;
        background: red;
    }

    25% {
        top: 100px;
        right: 0px;
        background: blue;
    }

    50% {
        top: 100px;
        right: 100px;
        background: yellow;
    }

    75% {
        top: 0px;
        right: 100px;
        background: green;
    }

    100% {
        top: 0px;
        right: 0px;
        background: red;
    }
}

@keyframes animazione2 {
    0% {
        top: 0px;
        right: 0px;
        background: red;
    }

    25% {
        top: 50px;
        right: 0px;
        background: blue;
    }

    50% {
        top: 50px;
        right: 50px;
        background: yellow;
    }

    75% {
        top: 0px;
        right: 50px;
        background: green;
    }

    100% {
        top: 0px;
        right: 0px;
        background: red;
    }
}

@keyframes animazioneTel {
    0% {
        top: 0px;
        right: 5px;
        background: red;
    }

    25% {
        top: 15px;
        right: 5px;
        background: blue;
    }

    50% {
        top: 15px;
        right: 20px;
        background: yellow;
    }

    75% {
        top: 0px;
        right: 20px;
        background: green;
    }

    100% {
        top: 0px;
        right: 5px;
        background: red;
    }
}

@media screen and (max-width: 1312px) {
    .container > p {
        font-size: 28px;
    }
    div.container {
        height: 150px;
    }
}

@media screen and (max-width: 1242px) {
    .container > p {
        font-size: 24px;
    }
}

@media screen and (max-width: 1136px) {
    h1 {
        font-size: 55px;
        margin-bottom: 20px;
    }

    #boxColorato {
        animation: animazione2 5s infinite ease-in-out alternate;
    }
}

@media screen and (max-width: 500px) {
    body {
        margin: 0;
        padding: 0;
    }

    h1 {
        margin-top: 30px;
        font-size: 28px;
    }

    .container > p {
        font-size: 14px;
        padding: 0;
    }

    .container {
        margin-bottom: 20px;
    }

    #casettaImg {
        width: 22px;
        height: 22px;
    }

    #boxColorato {
        top: 0;
        right: 0;

        width: 10px;
        height: 10px;

        animation: animazioneTel 5s infinite ease-in-out alternate;
    }

    div.container {
        width: 100%;
        height: 50px;
        transition: none;
    }

    .container:hover {
        width: 100%;
        background-color: lightskyblue;
    }

    footer {
        height: 35px;

        font-size: 11px;

        position: absolute;
    }

}

@media screen and (max-width: 926px) and (orientation: landscape) {
    body {
        margin: 0;
        padding: 0;
    }
    h1 {
        margin-top: 15px;
        font-size: 28px;
        margin-bottom: 10px;
    }
    .container > p {
        font-size: 14px;
        padding: 0;
    }
    .container {
        margin-bottom: 10px;
        height: 80px;
    }
    #casettaImg {
        width: 22px;
        height: 22px;
    }
    #boxColorato {
        top: 0;
        right: 0;
        width: 10px;
        height: 10px;
        animation: animazioneTel 5s infinite ease-in-out alternate;
    }
    div.container {
        width: 48%;
        height: 80px;
    }
    .container:hover {
        width: 52%;
    }
    footer {
        height: 35px;
        font-size: 11px;
        position: absolute;
    }
}
