.grid {
    width: 90%;
    margin: 40px auto;
    display: flex;
    flex-wrap: wrap;   
    justify-content: center; 
    gap: 20px;
}

.xoverlay-data {
    width: 100%;
    padding: 20px; 
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center; 
    text-align: center;
}


.xoverlay-data h3 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.3;
}


.xoverlay-data a {
    color: #000000;
    text-decoration: underline;
    font-weight: bold;
    border: 1px solid #000000;
    padding: 10px 20px;
    text-decoration: none;
    margin-top: 30px;
}

.xoverlay {
    position: relative;
    overflow: hidden;
    width: calc((100% - 40px) / 3);
    min-width: 280px; 
    aspect-ratio: 1 / 1; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.xoverlay img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


.x-zoom .xoverlay-box {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    background: rgba(255, 82, 16, 0.9);
    transition: transform .3s ease;
}

.x-zoom:hover .xoverlay-box {
    transform: scale(1);
}

/* Адаптивность */
@media (max-width: 992px) {
    .xoverlay {
        width: calc((100% - 20px) / 2); /* По 2 в ряд */
    }
}

@media (max-width: 600px) {
    .xoverlay {
        width: 100%; /* По 1 в ряд */
    }
}
