/**
 * Build Launch - Login Page Course Strip
 * login-courses.css
 *
 * Infinite auto-scrolling marquee carousel.
 * Pure CSS animation - no JavaScript needed.
 * Pauses on hover. Fades out at both edges.
 *
 * To add a new course:
 *   1. Add a .trained-icon--xx colour rule below
 *   2. Copy a .trained-item block in login.html (inside BOTH .carousel-track divs)
 */

/* ── Container ───────────────────────────────────────────────────────── */
.left-trained {
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    overflow: hidden; /* clip the scrolling track */
}

.trained-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.22);
    display: block;
    margin-bottom: 16px;
}

/* ── Carousel wrapper — masks overflow + adds fade edges ─────────────── */
.trained-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Fade-out masks on left and right edges */
.trained-carousel::before,
.trained-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}
.trained-carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(10,18,10,0.9), transparent);
}
.trained-carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(10,18,10,0.9), transparent);
}

/* ── The scrolling track — contains items duplicated for seamless loop ── */
.carousel-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: marquee-scroll 22s linear infinite;
}

/* Pause on hover */
.trained-carousel:hover .carousel-track {
    animation-play-state: paused;
}

/* ── Keyframes ───────────────────────────────────────────────────────── */
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); } /* moves exactly one set (50% of doubled track) */
}

/* ── Single course item ──────────────────────────────────────────────── */
.trained-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 24px 4px 0;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    margin-right: 24px;
    transition: opacity 0.2s;
}

.trained-carousel:hover .trained-item:hover {
    opacity: 1;
}

/* ── Icon box ────────────────────────────────────────────────────────── */
.trained-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trained-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.trained-icon svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Per-course icon colours ─────────────────────────────────────────── */
.trained-icon--wb   { background: #34ca50; }
.trained-icon--eo   { background: #6f7fbf; }
.trained-icon--ca   { background: #4F6E4C; }
.trained-icon--es   { background: #B4B671; }
.trained-icon--ni   { background: #ffffff; }
/* New courses */
.trained-icon--acf  { background: #C0622F; } /* AU Construction Fundamentals — terracotta */
.trained-icon--abf  { background: #566E8A; } /* AU Business Fundamentals      — blue      */
.trained-icon--acsk { background: #7A5C3A; } /* AU Construction Specific      — brown     */

/* ── Text ────────────────────────────────────────────────────────────── */
.trained-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trained-name {
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.1;
    white-space: nowrap;
}

.trained-sub {
    font-size: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.28);
    line-height: 1;
    white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .trained-carousel::before,
    .trained-carousel::after { width: 40px; }
}

/* Tablet / stacked layout — show but tighten up */
@media (max-width: 900px) {
    .left-trained {
        padding-top: 20px;
        display: block; /* override any previous hide */
    }

    .trained-label {
        font-size: 7.5px;
        margin-bottom: 12px;
    }

    .carousel-track {
        animation-duration: 18s; /* slightly faster on narrower width */
    }

    .trained-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
    }

    .trained-name  { font-size: 10px; }
    .trained-sub   { font-size: 7.5px; }

    .trained-item {
        padding: 3px 18px 3px 0;
        margin-right: 18px;
        gap: 7px;
    }

    .trained-carousel::before,
    .trained-carousel::after { width: 32px; }
}

/* Small phones — keep it but even more compact */
@media (max-width: 520px) {
    .left-trained { padding-top: 16px; }

    .carousel-track { animation-duration: 15s; }

    .trained-icon  { width: 22px; height: 22px; }
    .trained-name  { font-size: 9.5px; }
    .trained-sub   { font-size: 7px; }

    .trained-item {
        padding: 2px 14px 2px 0;
        margin-right: 14px;
        gap: 6px;
    }

    .trained-carousel::before,
    .trained-carousel::after { width: 24px; }
}

/* ── Respect reduced-motion preference ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        gap: 10px;
    }
    .trained-carousel::before,
    .trained-carousel::after { display: none; }
}