/* Carousel styles - ausgelagert für einfache Ein-/Ausklammerung */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto 18px auto;
    padding: 8px 12px;
}

.carousel {
    overflow: hidden;
    flex: 1 1 auto;
    outline: none;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
    align-items: center;
}

.carousel-item {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: transparent;
    color:#666666;
    cursor: pointer;
}

.carousel-item img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
    filter: grayscale(100%) opacity(0.5);
    -webkit-filter: grayscale(100%) opacity(0.5);
}

.carousel-item:hover img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    display: block;
    filter: grayscale(0%) opacity(1);
    -webkit-filter: grayscale(0%) opacity(1);
}

.carousel-caption {
    margin-top: 6px;
    font-size: 0.7rem;
    color: #999999;
}

.carousel-nav {
    background: rgba(51,51,51,0.7);
    font-size:2.5rem;
    color: #fff;
    border: none;
    min-width: 40px;
    height: 40px;
    border-radius: 20px;
    display: none; /* Mobile: versteckt */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s, background 0.3s;
}

.carousel-nav:hover {
    background: rgba(0,0,0,0.9);
    opacity: 1;
}

/* Desktop: Pfeile anzeigen */
@media (min-width: 1024px) {
    .carousel-nav {
        display: flex;
    }
}

.reference {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666666;
    text-align: center;
    justify-content: center;
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    -webkit-filter: grayscale(100%) opacity(0.5);
}

.reference:hover {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666666;
    text-align: center;
    justify-content: center;
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    filter: grayscale(0%) opacity(1);
    -webkit-filter: grayscale(0%) opacity(1);
}

.carousel-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Responsive: show 2 items on medium, 3 on large */
@media (min-width: 768px) {
    .carousel-item { flex: 0 0 calc((100% / 3) - 8px); }
}
@media (min-width: 1024px) {
    .carousel-item { flex: 0 0 calc((100% / 6) - 10px); }
}

/* Small visual polish */
.carousel-wrapper { background: transparent; }
.carousel-item { transition: transform 0.25s; }
.carousel-item:focus-within { transform: translateY(-4px); }
