/* PORTFOLIO */

.portfolio {
    padding: 120px 5%;
    position: relative;
    background-image: url('https://i.etsystatic.com/18419173/r/il/f9d590/7506098075/il_fullxfull.7506098075_rluj.jpg');
    /* background-repeat: no-repeat; */
    object-fit: cover;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 50px;
}

.portfolio-header h2 {
    font-size: 42px;
    font-weight: 800;
}

.portfolio-header p {
    opacity: 0.6;
    margin-top: 10px;
}

/* SLIDER */

.portfolio-slider {
    position: relative;
    overflow: hidden; /* 🔥 ОБЯЗАТЕЛЬНО */
}

#portfolioTrack {
    display: flex;
    gap: 30px; /* 🔥 ОДИН gap, без дублей */
    will-change: transform;
}

/* CARD */

.portfolio-card {
    flex: 0 0 600px; /* 🔥 вместо min-width */
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

/* INFO */

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.card-info h3 {
    font-size: 20px;
}

.card-info p {
    font-size: 14px;
    opacity: 0.8;
}

/* BUTTONS */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.3);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}
.portfolio-card {
    max-width: auto;
}
/* MOBILE */

@media (max-width: 768px) {
    .portfolio-card {
        flex: 0 0 250px;
        height: 320px;
        max-width: 500px;
    }

    .portfolio-header h2 {
        font-size: 28px;
    }
}
