.gallery {
    position: relative;
    width: 100%;
}

.image {
    opacity: 1;
    display: block;
    width: 100%;
    height: auto;
    transition: 0.5s ease;
    backface-visibility: hidden;
}

.middle {
    transition: 0.5s ease;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    text-align: center;
}

.gallery:hover .image {
    opacity: 0.3;
}

.gallery:hover .middle {
    opacity: 1;
}

.text {
    color: #000;
    font-size: 30px;
    padding: 16px 32px;
}

:root {
    --color-text: #fff;
    --color-front: rgb(30, 2, 173);
    --color-back: rgb(51, 0, 255);
}

.tag {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    clip-path: polygon(20px 0px, 100% 0px, 100% 100%, 0% 100%, 0% 20px);
    background: var(--color-front);
    padding: 16px 40px;
    margin: 0 8px;
    font-weight: 600;
    font-size: 18px;
    color: var(--color-text);
    transition: clip-path 500ms;
}

.tag:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--color-back);
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 6px 0;
    transition: transform 500ms;
}

.tag:hover {
    clip-path: polygon(0px 0px, 100% 0px, 100% 100%, 0% 100%, 0% 0px);
}

.tag:hover:after {
    transform: translate(-100%, -100%);
}

/* UNRELATED */
/* body {
    font-family: sans-serif;
    padding: 40px;
    -webkit-font-smoothing: antialiased;
} */


