@charset "UTF-8";

/* ================================ */
    /* Allgemein */
/* ================================ */

* {
    margin: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #0f0f0f;
    color: #e8e8e8;
    min-height: 100vh;
}








/* ================================ */
            /* Nav */
/* ================================ */

nav {
    padding: 1rem 2rem;
    border-bottom: 1px solid #222;
}

nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #e8e8e8;
}








/* ================================ */
            /* Main */
/* ================================ */

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

main h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #cd6f9e, #553fa6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}






/* ================================ */
        /*  Block     */
/* ================================ */

.demo {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #1a1a1a;
}

.demo:last-child {
    border-bottom: none;
}

.demo h2 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo p {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Inline Code in Beschreibungen */
.demo p code {
    background: #1a1a1a;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #cd6f9e;
}













/* ================================ */
            /* Carousel  */
/* ================================ */

.carousel {
    width: 100%;
    overflow-x: auto;
    margin: 3em auto;
    display: flex;
    gap: 1em;
    scroll-behavior: smooth;
    anchor-name: --carousel;
    scroll-snap-type: x mandatory;
    scroll-marker-group: after;
}

.carousel::scroll-marker-group {
    display: flex;
    justify-content: center;
    gap: .5em;
    height: 2em;
    align-items: center;
    margin-top: .5em;
}

.card::scroll-marker {
    content: '';
    height: 1em;
    width: 1em;
    background-color: #cd6f9e;
    border-radius: 50%;
    opacity: 0.4;
}

.card::scroll-marker:target-current {
    background-color: #cd6f9e;
    opacity: 1;
    outline: 2px solid white;
    outline-offset: 2px;
}



/*Scroll-Bar entfernen*/
.carousel::-webkit-scrollbar {
    display: none;
}

/*Fallback für ältere Browser: Scroll-Bar da*/
@supports not (selector(::scroll-button(right))) {
    /* Fallback-Styles hier – z.B. Scrollbar wieder einblenden */
    .carousel::-webkit-scrollbar {
        display: block;
    }
}


/*neues Pseudoelement Scroll-Button*/
.carousel::scroll-button(right), 
.carousel::scroll-button(left) {
    content: "→";
    border: none;
    background: linear-gradient(135deg, #cd6f9e, #553fa6);
    font-size: 3rem;
    color: white;
    height: 60px;
    width: 60px;
    border-radius: 50%;
    padding-bottom: .1em;
    cursor: pointer;
    position: fixed;
    position-anchor: --carousel;
    position-area: right center;
    translate: -50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);

}

.carousel::scroll-button(left) {
    content: "←";
    position-area: left center;
    translate: 50%;
}


/*Disabled Status*/
.carousel::scroll-button(right):disabled, 
.carousel::scroll-button(left):disabled {
    opacity: .5;
    cursor: auto;
}



.card {
    scroll-snap-align: start;
    flex: 0 0 20em;
    aspect-ratio: 5 / 3; 
    background: linear-gradient(135deg, #cd6f9e, #553fa6);
    padding: 1em;
    border-radius: .5em;
    text-align: center;
    align-content: center;
}













/* ================================ */
            /*Responsive*/
/* ================================ */


@media(max-width: 500px) {
    .card {
        flex: 0 0 100%;
    }
}


