/* -- Основной блок таблицы -- */
.main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 100%;
    /*background-color: navy;*/
}

.box {
    float: left;
    position: relative;
    width: 25%;
    padding-bottom: 25%;
}

.boxInner {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
    overflow: hidden;
	background: #444;
}
 .boxInner img { width: 100% }


@media only screen and (max-width:481px) { 
    /* Smartphone view: 1 tile */
    .box {
        width: 100%;
        padding-bottom: 100%;
    }
}
@media only screen and (max-width:1020px) and (min-width:481px) { 
    /* Tablet view: 2 tiles */
    .box {
        width: 50%;
        padding-bottom: 50%;
    }
}

@media only screen and (max-width:1290px) and (min-width:1021px) { 
    /* Medium desktop: 4 tiles */
    .box {
        width: 25%;
        padding-bottom: 25%;
    }
}