/* ── Cert Bar Block ───────────────────────────────────────── */

.cert-bar {
    padding: 1.5rem 0;
    overflow: hidden;
}

/* ── Scrolling track wrapper ──────────────────────────────── */
.cert-bar__track-wrap {
    overflow: hidden;
    /* Soft edge fade so badges don't hard-clip at the sides */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 6%,
        black 94%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 6%,
        black 94%,
        transparent 100%
    );
    cursor: pointer;
}

/* ── Marquee animation ────────────────────────────────────── */
@keyframes cert-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.cert-bar__track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: cert-scroll var(--cert-speed, 30s) linear infinite;
}

/* Pause on hover */
.cert-bar__track-wrap:hover .cert-bar__track {
    animation-play-state: paused;
}

/* ── Individual badge ─────────────────────────────────────── */
.cert-bar__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Consistent height — width scales freely with aspect ratio */
    height: var(--cert-height, 60px);
}

.cert-bar__item img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    transition: opacity .3s ease, filter .3s ease;
}

/* ── Greyscale mode ───────────────────────────────────────── */
.cert-bar--grayscale .cert-bar__item img {
    filter: grayscale(1);
    opacity: .6;
}

.cert-bar--grayscale .cert-bar__item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* ── Reduce motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cert-bar__track {
        animation: none;
    }
}
