/* Font family */
@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@200;300;400;500;600;700&display=swap');

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

body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #090221;
    font-family: 'Mitr', sans-serif;
}

section {
    position: relative;
    width: 350px;
    height: 280px;
    display: flex;
    overflow: hidden;
    background-color: #fff;
}

.img {
    position: relative;
    width: 175px;
    height: 280px;
    background-image: url('images/high-angle-shot-beautiful-forest-with-lot-green-trees-enveloped-fog-new-zealand.jpg');
    background-size: cover;
    z-index: 1;
    transition: 0.3s;
    cursor: pointer;
}

.img-one {
    background-position: -45px 0;
}

.img-two {
    background-position: -220px 0;
}

.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 350px;
    padding: 1rem;
    text-align: center;
    opacity: 0;
    transition: 0.5s;
    font-size: 0.8rem;
}

.content h3 {
    margin: 0.5rem;
}

section:hover .img-one {
    transform: translateY(-300px);
}

section:hover .img-two {
    transform: translateY(300px);
}

section:hover .content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}