/* Verstecke Page Header auf Projekt-Archiv */
.archive.post-type-archive-projekte .page-header {
    display: none;
}

.archive.post-type-archive-projekte #primary.content-area,
.archive.post-type-archive-projekte #main.site-main {
    margin: 0;
    padding: 0;
}

/* Projekte Carousel Container */
.projekte-carousel-container {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0 60px 0 20px;
    border-radius: 0;
    height: calc(var(--viewport-height, 100vh) - var(--header-stack-height, var(--header-height, 90px)) - var(--footer-height, 40px) - 40px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    box-sizing: border-box;
    scroll-padding-left: 20px;
}

.projekte-carousel-container.is-overflowing {
    justify-content: flex-start;
}

.projekte-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 20px;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    min-height: 100%;
}

.projekte-carousel.is-overflowing {
    justify-content: flex-start;
    padding-left: 20px;
}

.projekte-slide {
    flex: 0 0 auto;
    width: 380px;
    min-width: 380px;
    max-width: 380px;
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

.projekte-slide-link {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.projekte-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 5px;
}

.projekte-slide-link:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.projekte-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    padding: 30px 20px 20px;
}

.projekte-slide-overlay h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.projekte-slide-link:hover .projekte-slide-overlay h3 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .projekte-carousel-container {
        padding: 15px;
    }

    .projekte-slide {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .projekte-carousel-container {
        padding: 10px;
    }

    .projekte-slide {
        max-width: 280px;
        padding: 15px;
    }

    .projekte-slide h3 {
        font-size: 16px;
    }
}
