/* Контейнер слайдера */
.mv-portfolio-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 0;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mv-portfolio-slider::-webkit-scrollbar { display: none; }

/* Карточка — 4 штуки в ряд */
.mv-portfolio-item {
    flex: 0 0 calc(25% - 12px); /* 4 карточки */
    height: 220px; /* Высота для 4 карточек */
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    background: #f1f5f9;
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
    will-change: opacity, transform;
}

.mv-portfolio-item:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    opacity: 1 !important;
}

.mv-portfolio-item img,
.mv-portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mv-portfolio-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 25px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-portfolio-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: #E8631A;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

/* Заглушки */
.mv-portfolio-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.mv-portfolio-placeholder__content { padding: 15px; }
.mv-portfolio-placeholder__icon { font-size: 40px; margin-bottom: 10px; }
.mv-portfolio-placeholder__title { font-size: 16px; font-weight: 700; }

/* 💻 ПЛАНШЕТЫ (2 карточки в ряд) */
@media (max-width: 1024px) {
    .mv-portfolio-item { 
        flex: 0 0 calc(50% - 8px); 
        height: 240px;
    }
}

/* 📱 ТЕЛЕФОНЫ (1 карточка + край следующей) */
@media (max-width: 768px) {
    .mv-portfolio-item { 
        flex: 0 0 85%; 
        height: 220px;
    }
    .mv-portfolio-title { font-size: 15px; }
}
