/* ============================================
   БЕГУЩАЯ СТРОКА С ЛОГОТИПАМИ (BRANDS MARQUEE)
   Основной цвет: #448DCB
   Фон: Белый
   ============================================ */

.widget.c-brands.c-brands-template-4.c-brands-marquee {
    position: relative;
    padding: 40px 0 50px;
    background: #FFFFFF;
    overflow: hidden;
}

/* Заголовок */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 32px;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title {
    font-size: 28px;
    font-weight: 700;
    color: #0F2240 !important;
    margin-bottom: 0;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title-highlight {
    color: #448DCB !important;
}

/* ============================================ */
/* ЗАГОЛОВОК brand-header */
/* ============================================ */
.brands-header {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.2;
    color: #17335D;
    margin: 0 0 16px;
    text-transform: initial;
}

/* Разделитель */
.tasks-divider {
    width: 60px;
    height: 3px;
    background: #448DCB;
    margin: 0 auto 18px;
    border-radius: 2px;
}

/* Контейнер для бегущей строки */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-content {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 5px 0;
}

/* ОБЕРТКА - фиксированная ширина, скрывает overflow */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 0;
    position: relative;
    width: 100%;
}

/* Затемнение по краям */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::before,
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #FFFFFF, transparent);
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #FFFFFF, transparent);
}

/* ТРЕКИ - бесконечная анимация */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
    animation: marqueeScroll 30s linear infinite;
    will-change: transform;
}

/* Для плавности - все треки анимируются одинаково */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track:nth-child(1) {
    animation: marqueeScroll 30s linear infinite;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track:nth-child(2) {
    animation: marqueeScroll 30s linear infinite;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track:nth-child(3) {
    animation: marqueeScroll 30s linear infinite;
}

/* Убираем остановку при наведении */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper:hover .widget-marquee-track {
    animation-play-state: running;
}

/* Элементы (карточки логотипов) */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    padding: 0 24px;
    border-radius: 12px;
    position: relative;
}

/* Разделитель между логотипами */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(68, 141, 203, 0.15);
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item:last-child::after {
    display: none;
}

.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

/* Изображения логотипов */
.widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-image {
    height: 55px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    opacity: 0.8;
    filter: grayscale(0);
}

/* Анимация - бесконечное движение */
@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1200px) {
    .widget.c-brands.c-brands-template-4.c-brands-marquee {
        padding: 35px 0 45px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title {
        font-size: 26px;
    }
    .brands-header {
        font-size: 38px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track {
        gap: 25px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item {
        height: 65px;
        padding: 0 20px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-image {
        height: 32px;
        max-width: 120px;
    }
}

@media (max-width: 992px) {
    .widget.c-brands.c-brands-template-4.c-brands-marquee {
        padding: 30px 0 40px;
    }
    /* Заголовок 28px на планшетах */
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title {
        font-size: 28px !important;
    }
    .brands-header {
        font-size: 32px !important;
    }
    .tasks-divider {
        width: 50px;
        margin: 0 auto 16px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-header {
        margin-bottom: 28px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::before,
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::after {
        width: 50px;
    }
}

@media (max-width: 768px) {
    .widget.c-brands.c-brands-template-4.c-brands-marquee {
        padding: 25px 0 35px;
    }
    /* Заголовок 28px на планшетах */
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title {
        font-size: 28px !important;
    }
    .brands-header {
        font-size: 28px !important;
        margin-bottom: 12px;
    }
    .tasks-divider {
        width: 40px;
        height: 2px;
        margin: 0 auto 14px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-header {
        margin-bottom: 24px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track {
        gap: 18px;
        animation-duration: 25s;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item {
        height: 55px;
        padding: 0 16px;
        border-radius: 10px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item::after {
        right: -12px;
        width: 2px;
        height: 2px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-image {
        height: 28px;
        max-width: 100px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::before,
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-wrapper::after {
        width: 30px;
    }
}

@media (max-width: 576px) {
    .widget.c-brands.c-brands-template-4.c-brands-marquee {
        padding: 20px 0 30px;
    }
    /* Заголовок 28px на мобильных */
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-title {
        font-size: 28px !important;
    }
    .brands-header {
        font-size: 28px !important;
        margin-bottom: 10px;
        line-height: 1.2;
    }
    .tasks-divider {
        width: 36px;
        height: 2px;
        margin: 0 auto 12px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-header {
        margin-bottom: 20px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-track {
        gap: 12px;
        animation-duration: 20s;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item {
        height: 45px;
        padding: 0 12px;
        border-radius: 8px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-item::after {
        right: -8px;
        width: 2px;
        height: 2px;
    }
    .widget.c-brands.c-brands-template-4.c-brands-marquee .widget-marquee-image {
        height: 22px;
        max-width: 80px;
    }
}