@import url('https://fonts.googleapis.com/css2?family=Italiana&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url("img/bg.jpg");
    background-size: cover;
    background-position: center;

    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-bottom: 50px;
    align-items: center;
    flex-direction: column;

    h1 {
        font-family: "Italiana", serif;
        font-weight: 500;
        font-size: 5rem;
        text-align: center;
        color: white;
        margin-bottom: 20px;
    }

    >section {

        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1vw;

        a {
            display: block;
            text-decoration: none;

            font-family: "Italiana", serif;

            div {
                background-size: cover;
                background-position: center;
                aspect-ratio: 1 / 1;
                width: 30vw;
                max-width: 400px;
                display: flex;
                justify-content: center;
                align-items: flex-end;

                color: white;

                position: relative;

                h2 {
                    font-weight: normal;
                    font-size: 2.5rem;
                    text-align: center;
                    background-color: rgba(0, 0, 0, 0.5);
                    width: 100%;
                    padding: 10px 20px;
                }

                overflow: hidden;

                img {
                    display: block;
                    position: absolute;

                    width: 100%;
                    aspect-ratio: 1 / 1;
                    object-fit: cover;
                    object-position: top;
                    z-index: -1;
                    transition: width 0.5s;
                }
            }

            div:hover {

                img {
                    width: 110%;
                }

            }
        }
    }
}

@media screen and (max-width: 600px) {
    body {
        >section {
            grid-template-columns: 1fr;

            a div {
                width: 40vw;

                h2{
                    font-size: 1.5rem;
                }
            }
        }
    }
}