mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 02:19:45 +00:00
123 lines
3.5 KiB
SCSS
123 lines
3.5 KiB
SCSS
@import "../../assets/styles/theme.scss";
|
|
|
|
.row.lab-list {
|
|
|
|
display: grid;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
/* Используем 1fr для равных колонок */
|
|
justify-content: space-between;
|
|
gap: $row-gap;
|
|
max-width: 100%; // Гарантия, что не выйдет за границы
|
|
width: 100%;
|
|
box-sizing: border-box; // Учитываем padding и border внутри ширины
|
|
|
|
.card {
|
|
display: block;
|
|
position: relative;
|
|
height: 300px;
|
|
border-radius: 8px;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-color: transparent;
|
|
color: $text-secondary;
|
|
|
|
|
|
border: 1px solid transparent;
|
|
|
|
.image {
|
|
position: absolute;
|
|
object-fit: cover;
|
|
width: 100%;
|
|
height: 100%;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease-out;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.card-content {
|
|
overflow: hidden;
|
|
/* Чтобы контент не выходил за границы и карточка не мигала*/
|
|
margin: 0;
|
|
position: absolute;
|
|
inset: auto 20px 10px 20px;
|
|
transition: inset .3s;
|
|
background: none !important;
|
|
z-index: 2;
|
|
/* Контент всегда сверху */
|
|
|
|
h2 {
|
|
margin: 0 0 12px 9px;
|
|
font-size: clamp(10px, 1.5vw, 20px);
|
|
font-weight: 600;
|
|
line-height: clamp(12px, 2vw, 24px);
|
|
|
|
@media (max-width: 768px) {
|
|
font-size: 20px;
|
|
line-height: 28px;
|
|
}
|
|
}
|
|
|
|
.hidden {
|
|
max-height: 0;
|
|
transition: max-height 0.3s ease-out, opacity 0.3s 0.3s ease-out;
|
|
opacity: 0;
|
|
max-width: 80%;
|
|
|
|
p {
|
|
margin: 0 0 10px 9px;
|
|
font-size: clamp(8px, 1.5vw, 16px);
|
|
font-weight: 400;
|
|
line-height: clamp(16px, 2vw, 20px);
|
|
|
|
@media (max-width: 768px) {
|
|
font-size: 16px;
|
|
line-height: 20px;
|
|
}
|
|
}
|
|
|
|
.link-label {
|
|
font-size: clamp(10px, 1.5vw, 20px);
|
|
font-weight: 500;
|
|
line-height: clamp(18px, 2vw, 24px);
|
|
margin: 0 0 0 9px;
|
|
|
|
@media (max-width: 768px) {
|
|
font-size: 20px;
|
|
line-height: 24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&:hover .card-content {
|
|
bottom: 20px;
|
|
}
|
|
|
|
&:hover .card-content .hidden {
|
|
max-height: 200px;
|
|
opacity: 1;
|
|
transition: max-height 0.3s ease-out, opacity .1s ease-in;
|
|
}
|
|
|
|
&:hover .image {
|
|
transition: opacity .3s ease-in;
|
|
filter: brightness(0.6);
|
|
/* Затемняем изображение */
|
|
}
|
|
}
|
|
}
|
|
|
|
// Медиа-запрос для мобильных устройств
|
|
@media (max-width: 768px) {
|
|
.row.lab-list {
|
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
|
|
}
|
|
|
|
.card {
|
|
width: 100%;
|
|
/* Карточка занимает всю ширину своей колонки */
|
|
height: 215px !important;
|
|
/* Устанавливаем минимальную высоту */
|
|
}
|
|
} |