.porfolio-box {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    background: #000       
    ;
    background-size: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    align-items: center;
    justify-content: center;
    justify-items: center;
    padding: 2% 5%;
    

}


.detail {
    display: flex;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 sloupce na řádku */
    gap: 20px;
}

.box {
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 4px 4px 6px #000;
}

.box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
    transition: transform 0.3s ease-in-out;
    
}

.links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0; /* Skrytý odkaz */
    transition: opacity 0.3s ease-in-out;
    text-shadow: 2px 2px 4px #000;
}

.links a {
    display: flex;
    color: #fff;
    text-shadow: (10, 20, 30) #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 2rem;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s ease-in-out; /* Přidání přechodu pro transformaci */
}

.box:hover .links {
    opacity: 1; /* Odkaz se zobrazí při najetí na box */
}

.box:hover img,
.box:hover .links a {
    transform: scale(1.05); /* Zvětšení obrázku i odkazu při hoveru nad .box */
    text-align: center;
}


.box:hover .links {
    opacity: 1; /* Odkaz se zobrazí při najetí na box */
}

@media (max-width: 900px) {
    .detail {
        margin: 5rem;
        grid-template-columns: repeat(2, 1fr); /* 2 boxy na menších obrazovkách */
    }
}

@media (max-width: 600px) {
    .porfolio-box {
        background-color: #000;
        align-items: center;
    }
    .detail {
        display: block;
        width: 100vw;
        background: #000;
        align-items: center;
    }
    .box {
        width: 350px;
        height: 250px;
        padding: 1rem;
        background: #000;
    }

    .links {
        opacity: 1;
    }
    
}
