.square {
    border: 1px solid black;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
}
.square > img {
    width: 75%;
    transition: width 0.3s ease;
    display: block;
}
.square > p {
    position: absolute;
    bottom: 0;
}
.square:hover > img {
    width: 90%;
}
@media (max-width: 767px) {
    .square {
        height: 50vh;
        width: 100%;
    }
    }
    @media (min-width: 768px) {
    .square {
        height: 100vh;
    }
}
a {
    color:inherit;
    text-decoration: none;
}