
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, 148px));
    grid-gap: 0px;
  }
.grid > div {
    background: #EDE7F6;
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    height: 100%;
    max-width: 100%;
} 

.itemimg{
    height: 100%;
    max-width: 100%;
    margin: 0 0 0 0;
    display: flex;
}

.border{
    border: solid;
    border-radius: 0cqmax;
    border-width: 1px;
    border-color: black;
}

.visible{
    display: flex;
}

.hidden{
    display: none;
}

.item_text {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    color: rgb(71, 71, 71);
    visibility: hidden;
    opacity: 0;
    font-size: 65px;
    font-weight: 800;
    text-align: center;
    line-height: 0px;
    text-shadow: -1px -1px 0 #ffffff, 1px -1px 0 #ffffff, -1px 1px 0 #ffffff, 1px 1px 0 #ffffff;
  
    /* transition effect. not necessary */
    transition: opacity .2s, visibility .2s;
}

.item_wrapper{
    position: relative;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.item_wrapper:hover .item_text{
    visibility: visible;
    opacity: 0.8;
}


body {
margin: 2rem;
font: 12px system-ui;
display: grid;
place-items: center;
}
  
  