/* ---------- CAROUSEL WRAPPER ---------- */
.certs-3d-carousel {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 6vw;           /* horizontal padding so center card has breathing room */
    scroll-snap-type: none;      /* we control snapping in JS */
    cursor: grab;

    perspective: 1500px;
    user-select: none;            /* no text selection while dragging */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;          /* allow native horizontal panning */
}

/* hide native scrollbar (optional) */
.certs-3d-carousel::-webkit-scrollbar {
    height: 10px;
    display: none;
}

/* ---------- CERT CARDS ---------- */
.cert-card-3d {
    height: 360px;
    width: auto;
    min-width: 480px;
    max-width: 62vw;
    flex: 0 0 auto;

    border-radius: 14px;
    overflow: hidden;
    scroll-snap-align: center;

    transition: box-shadow 260ms ease, transform 260ms ease;
    will-change: transform;

    box-shadow: 0 30px 60px rgba(0,0,0,0.28);
    transform-style: preserve-3d;
    backface-visibility: hidden;

    object-fit: cover;

    /* FIXED — only these two */
    -webkit-user-drag: none;
    user-select: none;

    border: 6px solid rgba(255, 215, 80, 0.02);
}

/* image inside card fallback */
.cert-card-3d[src] {
    display: block;
}

/* hovered or center pop-out */
.cert-card-3d.is-center,
.cert-card-3d:hover {
    box-shadow: 0 40px 90px rgba(0,0,0,0.38);
    z-index: 50;
}

/* ---------- small screens ---------- */
@media (max-width: 1024px) {
    .cert-card-3d { min-width: 360px; height: 300px; }
}

@media (max-width: 680px) {
    .cert-card-3d { min-width: 260px; height: 200px; }
    .certs-3d-carousel { padding: 32px 6vw; gap: 20px; }
}
.cert-active-title {
    text-align: center;
    margin-top: 18px;
    font-size: 1.25rem;
    font-weight: 700;
    background: rgba(255,255,255,0.6);
    padding: 10px 24px;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cert-active-title.hidden {
    opacity: 0;
    transform: translateY(10px);
}
.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-title {
    margin-top: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    opacity: 0.15;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
    text-align: center;
}

/* highlight ONLY the center card title */
.cert-item.is-center .cert-title {
    opacity: 1;
    transform: translateY(0px);
}
