File: /var/www/quadcode-site/src/style/components/management-grid.scss
.management-grid {
display: flex;
flex-wrap: wrap;
&__item {
display: block;
width: calc((100% - 20px * 3) / 4);
margin-right: 20px;
margin-top: 40px;
position: relative;
@include breakpoint-up('tabM') {
&:nth-child(4n + 4) {
margin-right: 0;
}
}
@include breakpoint-down('tabM') {
width: calc((100% - 20px) / 2);
margin-top: 30px;
&:nth-child(2n + 2) {
margin-right: 0;
}
}
&:hover {
.management-grid__header {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
img {
transform: scale(1.02);
}
}
}
}
&__link {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
z-index: 1;
}
&__header {
margin-bottom: 16px;
border-radius: 8px;
background: #D9D9D9;
transition: .4s ease-in-out;
@include breakpoint-down('deskS') {
margin-bottom: 8px;
}
img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
max-height: 360px;
border-radius: 8px;
will-change: transform;
transition: .4s ease-in-out;
@include breakpoint-down('deskS') {
max-height: 200px;
}
}
}
}