#brands {
    padding: 55px 20px 50px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
    text-align: center;
    overflow: hidden;
}

#brands .brand-heading {
    color: #07345d;
    font-size: 2.3rem;
    font-weight: 750;
    letter-spacing: 0.3px;
    margin: 0 0 8px;
}

#brands .brand-subheading {
    color: #64788b;
    font-size: 15px;
    margin: 0;
    letter-spacing: 0.4px;
}

#brands .brand-heading-line {
    width: 65px;
    height: 4px;
    margin: 18px auto 35px;
    background: linear-gradient(90deg, #07345d, #1594d2);
    border-radius: 10px;
}

#brands .brand-carousel {
    position: relative;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 48px;
}

#brands .brand-viewport {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 35px rgba(7, 52, 93, 0.10);
    border: 1px solid #e4edf5;
}

#brands .brand-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

#brands .brand-card {
    flex: 0 0 25%;
    min-width: 0;
    box-sizing: border-box;
    padding: 22px 14px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-right: 1px solid #edf1f5;
    background: #fff;
    transition: background 0.25s ease;
}

#brands .brand-card:hover {
    background: #f8fbff;
}

#brands .brand-logo {
    width: 100%;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

#brands .brand-logo img {
    width: 100%;
    max-width: 185px;
    height: 115px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

#brands .brand-card:hover .brand-logo img {
    transform: scale(1.06);
}

#brands .caption {
    width: calc(100% + 28px);
    min-height: 57px;
    padding: 12px 5px;
    box-sizing: border-box;
    background: /*#f0f6fc*/#fff;
    color: #07345d;
    border-top: 1px solid #e1ebf5;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#brands .caption span {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #64788b;
}

#brands .brand-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid #dce7f1;
    border-radius: 50%;
    background: #07345d;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(7, 52, 93, 0.18);
    transition: background 0.25s ease, transform 0.25s ease,
                box-shadow 0.25s ease;
}

#brands .brand-arrow:hover {
    background: #087fc1;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 7px 18px rgba(7, 52, 93, 0.25);
}

#brands .brand-arrow.prev {
    left: 0;
}

#brands .brand-arrow.next {
    right: 0;
}

#brands .brand-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
}

#brands .brand-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: #c5d2df;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

#brands .brand-dot.active {
    width: 24px;
    background: #07345d;
}

/* Tablet */
@media (max-width: 768px) {
    #brands {
        padding: 42px 16px;
    }

    #brands .brand-heading {
        font-size: 1.9rem;
    }

    #brands .brand-carousel {
        padding: 0 34px;
    }

    #brands .brand-card {
        flex-basis: 50%;
        padding: 16px 10px 0;
    }

    #brands .brand-logo {
        height: 125px;
        padding: 8px;
    }

    #brands .brand-logo img {
        height: 100px;
    }

    #brands .caption {
        width: calc(100% + 20px);
        min-height: 52px;
        font-size: 13px;
        padding: 10px 4px;
    }

    #brands .brand-arrow {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 400px) {
    #brands {
        padding: 35px 12px;
    }

    #brands .brand-heading {
        font-size: 1.65rem;
    }

    #brands .brand-subheading {
        font-size: 13px;
    }

    #brands .brand-carousel {
        padding: 0 28px;
    }

    #brands .brand-logo {
        height: 105px;
    }

    #brands .brand-logo img {
        height: 85px;
    }

    #brands .caption {
        font-size: 11px;
        min-height: 48px;
    }

    #brands .caption span {
        font-size: 10px;
    }

    #brands .brand-arrow {
        width: 27px;
        height: 27px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #brands .brand-track,
    #brands .brand-logo img,
    #brands .brand-arrow,
    #brands .brand-dot {
        transition: none;
    }
}