/* ============================================
   БЕГУЩАЯ СТРОКА ПАРТНЁРОВ
   ============================================ */

.partners-section {
    padding: 60px 0;
    position: relative;

    /* защита от раздувания */
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.partners-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;

    /* защита от раздувания */
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.partners-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.partners-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #2c7da0, #5fa8c9);
    border-radius: 3px;
}

/* ОКНО бегущей строки — обязательно ограничено и обрезает */
.partners-marquee {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;          /* и по X, и по Y */
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    box-sizing: border-box;
}

.partners-marquee.is-dragging {
    cursor: grabbing;
}

/* ТРЕК — может быть любой ширины, он живёт ВНУТРИ окна */
.partners-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    width: max-content;
    max-width: none;
    will-change: transform;
}

/* Карточка логотипа */
.partner-logo {
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(44, 125, 160, 0.15);
}

.partner-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.partner-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none; /* чтобы drag работал по всему логотипу */
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* Адаптивность */
@media (max-width: 768px) {
    .partners-section {
        padding: 40px 0;
    }

    .partners-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .partners-track {
        gap: 20px;
    }

    .partner-logo {
        width: 140px;
        height: 80px;
        padding: 15px;
    }

    .partner-logo img {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .partner-logo {
        width: 120px;
        height: 70px;
        padding: 12px;
    }

    .partner-logo img {
        max-height: 40px;
    }

    .partners-track {
        gap: 15px;
    }
}