main{
    display:grid;
    position: absolute;
    left:0;
    top:7vh;
    width:100vw;
    height: auto;
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: end;}

.item{
    padding: 5vh 5vw;
}
.item img{
    max-width:100%;
    max-height:40vh;
    margin-inline: auto;
    left:0;
    right: 0;
}
.item p{
    position: relative;
    margin-top: 2vh;
    font-family: "Lucette";
    font-size: 2vh;
    text-align: center;
    width:100%;
}
.item:has(img:hover, p:hover){
    cursor:pointer;
    text-decoration: underline;
}
.item img:hover +p{
    text-decoration: underline;
}

#lightbox{
    display: none;
    background-color: #0000002c;
    width:100vw;
    height:93vh;
    top:7vh;
    left:0;
    position: fixed;

}

#lightboxcont{
    display: grid;
    position: relative;
    background-color: var(--background);
    width: 80vw;
    height: 70vh;
    margin-inline: auto;
    left: 0;
    top: 10vh;
    right: 0;
    column-gap: 2.5%;
    grid-template-columns: 72.5% 25%;
    grid-template-rows: 80% 20%;
    padding: 1%;
    border: 1px solid black;
}

#lightboxcont img{
    grid-row : 1/3;
    grid-column: 1;
    max-width: 100%;
  max-height: 100%;

}
#lightboxcont #desc{
    grid-row: 1;
    grid-column: 2;
    font-family: "Lucette";
    font-size: 2vh;
}
#lightbox #back{
    position: absolute;
    left: 8vw;
    top: 9vh;
    z-index: 2;
    width: auto;
    height: auto;
    background-color: var(--background);
    border: 1px solid #000;
    font-family: "Sprat";
    font-size: 2.2vh;
    text-align: center;
}

#lightboxcont button{
    grid-row:2;
    grid-column: 2;
    display: block;
    background-color: var(--background);
    width:100%;
    border:1px solid black;
    padding: 1%;
    font-family: "Sprat";
    font-size: 3vh;
}



#lightbox #back:hover{
    color:var(--background);
    background-color: black;
}

@media screen and (max-height:900px) and (orientation: landscape) {

    #lightbox .commander{
        font-size: 2.5vh;
        position: static;
        height: min-content;
        padding: 1vh 0vw 9vh 0vw;
    }
}
@media screen and (max-device-width:900px), (max-width:900px)  {
    main{
        grid-template-columns: 1fr 1fr;
    }
    .item{
        padding: 3.5vh 5vw;
    }
    .item p{
        font-size: 1.5vh;
    }
    #lightbox .commander{
        font-size: 2.5vh;
        position: static;
        height: min-content;
  padding: 1vh 0vw 9vh 0vw;
    }
    #lightboxcont{
        grid-template-columns: 1fr;
        grid-template-rows: 60% 20% 20%;
        padding: 2vh 2vw;
        justify-items: center;
    }
    #lightboxcont img{
        grid-row: 1;
        grid-column: 1;
    }
    #lightboxcont #desc{
        grid-row: 2;
        grid-column: 1;
        width: 100%;
        margin-top: 2vh;
        text-align: center;
    }
    #lightboxcont button{
        grid-row: 3;
        grid-column: 1;
        width: 100%;
        position: relative;
        bottom: 0;
        left: 0;
        top: auto;
        height: 8vh;
        align-self: end;
    }
    #lightbox .hide{
        position: absolute;
  left: 0px;
  top: 0px;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  border: 0px;
  font-family: "Sprat";
  font-size: 3.4vh;
  color: transparent;
    }

}