/* =========================================
   IUNIXX – INFINITE MARQUEE
   Wiederverwendbare Laufband-Section
   Desktop / Tablet / Mobile
========================================= */

/* =========================================
   GRUNDLAYOUT
========================================= */

.marquee-section {
    --marquee-bg: #F1F8FF;
    --marquee-text: #071725;
    --marquee-muted: #52677D;
    --marquee-accent: #1499FE;
    --marquee-pill-bg: rgba(255, 255, 255, 0.88);
    --marquee-pill-border: rgba(20, 153, 254, 0.15);
    --marquee-pill-shadow: rgba(7, 23, 37, 0.05);
    --marquee-fade: #F1F8FF;

    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 80px 0 90px;

    background: var(--marquee-bg);
    color: var(--marquee-text);
}

.marquee-section *,
.marquee-section *::before,
.marquee-section *::after {
    box-sizing: border-box;
}

/* =========================================
   HELL / DUNKEL
========================================= */

.marquee-theme-light {
    --marquee-bg: #F1F8FF;
    --marquee-text: #071725;
    --marquee-muted: #52677D;
    --marquee-accent: #1499FE;
    --marquee-pill-bg: rgba(255, 255, 255, 0.88);
    --marquee-pill-border: rgba(20, 153, 254, 0.45);
    --marquee-pill-shadow: rgba(7, 23, 37, 0.05);
    --marquee-fade: #F1F8FF;
}

.marquee-theme-dark {
    --marquee-bg: #071725;
    --marquee-text: #FFFFFF;
    --marquee-muted: #B7CADD;
    --marquee-accent: #75C7FF;
    --marquee-pill-bg: rgba(255, 255, 255, 0.07);
    --marquee-pill-border: rgba(255, 255, 255, 0.14);
    --marquee-pill-shadow: rgba(0, 0, 0, 0.12);
    --marquee-fade: #071725;
}

/* =========================================
   ÜBERSCHRIFT
========================================= */

.marquee-heading {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin: 0 auto 38px;
}

.marquee-eyebrow {
    display: block;
    margin-bottom: 15px;

    color: var(--marquee-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.marquee-heading h2 {
    margin: 0 0 12px;

    color: var(--marquee-text);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.marquee-heading p {
    max-width: 580px;
    margin: 0;

    color: var(--marquee-muted);
    font-size: 16px;
    line-height: 1.65;
}

/* =========================================
   LAUFBAND – BEGRENZTE CONTENTBREITE
========================================= */

.marquee-container {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 14px;

    width: calc(100% - 48px);
    max-width: 1320px;
    margin-inline: auto;

    overflow: hidden;

    /* Pills verschwinden weich an den Containerrändern */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 6%,
        #000 94%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 6%,
        #000 94%,
        transparent 100%
    );
}
/* =========================================
   REIHEN
========================================= */

.marquee-track-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 5px 0;
}

.marquee-track {
    --marquee-duration: 35s;
    --marquee-gap: 14px;

    display: flex;
    align-items: center;
    gap: var(--marquee-gap);
    width: max-content;
    min-width: 100%;

    will-change: transform;
    animation-duration: var(--marquee-duration);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee-left {
    animation-name: iunixx-marquee-left;
}

.marquee-right {
    animation-name: iunixx-marquee-right;
}

/* =========================================
   GRUPPEN
========================================= */

.marquee-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--marquee-gap);
    min-width: max-content;
}

/* =========================================
   PILLS
========================================= */

.marquee-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    flex: 0 0 auto;

    min-height: 58px;
    padding: 14px 24px;

    border: 1px solid var(--marquee-pill-border);
    border-radius: 999px;

    background: var(--marquee-pill-bg);
    box-shadow: 0 4px 18px var(--marquee-pill-shadow);

    color: var(--marquee-text);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.25;
    white-space: nowrap;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    color 0.3s ease;
}

/* Kleiner farbiger Punkt */

.marquee-dot {
    display: block;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;

    border-radius: 50%;
    background: var(--color-quattro-lime);

    box-shadow: 0 0 0 4px rgba(20, 153, 254, 0.10);
}

/* =========================================
   HOVER
========================================= */

.marquee-track-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-pill:hover {
    color: var(--color-quattro-orange);
    border-color: var(--marquee-accent);
    box-shadow: 0 6px 24px rgba(20, 153, 254, 0.12);
}

/* =========================================
   ENDLOSE ANIMATION

   Zwei identische Gruppen.
   Die halbe Track-Breite plus halber Gap
   ergibt genau eine Gruppenlänge.
========================================= */

@keyframes iunixx-marquee-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(
            calc(-50% - var(--marquee-gap) / 2)
        );
    }
}

@keyframes iunixx-marquee-right {
    from {
        transform: translateX(
            calc(-50% - var(--marquee-gap) / 2)
        );
    }

    to {
        transform: translateX(0);
    }
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

    .marquee-section {
        padding: 70px 0 80px;
    }

    .marquee-heading {
        width: calc(100% - 40px);
    }

    .marquee-pill {
        min-height: 54px;
        padding: 13px 21px;
        font-size: 14px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .marquee-section {
        padding: 60px 0 70px;
    }

    .marquee-heading {
        width: calc(100% - 32px);
        max-width: 520px;
        margin-bottom: 28px;
    }

    .marquee-eyebrow {
        margin-bottom: 12px;
        font-size: 10px;
    }

    .marquee-heading h2 {
        font-size: clamp(2rem, 7.5vw, 2.8rem);
    }

    .marquee-heading p {
        font-size: 14px;
    }

    .marquee-container {
        gap: 10px;

        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 5%,
            #000 95%,
            transparent 100%
        );

        mask-image: linear-gradient(
            to right,
            transparent 0%,
            #000 5%,
            #000 95%,
            transparent 100%
        );
    }

    .marquee-track {
        --marquee-gap: 10px;
    }

    .marquee-pill {
        min-height: 48px;
        gap: 9px;
        padding: 11px 17px;
        font-size: 13px;
    }

    .marquee-dot {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }
}

/* =========================================
   REDUZIERTE BEWEGUNG
========================================= */

@media (prefers-reduced-motion: reduce) {

    .marquee-track {
        animation: none;
        transform: none;
        will-change: auto;
    }

    .marquee-track-wrapper {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .marquee-container {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .marquee-group[aria-hidden="true"] {
        display: none;
    }
}

/* =========================================
   IUNIXX – VIER LAUFBÄNDER AUF MOBILE
========================================= */

@media (max-width: 768px) {

    .marquee-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Alle vier Reihen anzeigen */
    .marquee-track-wrapper {
        display: block;
        width: 100%;
        padding: 4px 0;
    }

    /* Kompakte Darstellung */
    .marquee-pill {
        min-height: 46px;
        padding: 10px 17px;
        font-size: 13px;
    }

    /* Laufrichtung abwechseln */
    .marquee-track-wrapper:nth-child(odd)
    .marquee-track {
        animation-name: iunixx-marquee-left;
    }

    .marquee-track-wrapper:nth-child(even)
    .marquee-track {
        animation-name: iunixx-marquee-right;
    }

    /* Unterschiedliche Geschwindigkeiten */
    .marquee-track-wrapper:nth-child(1)
    .marquee-track {
        --marquee-duration: 32s;
    }

    .marquee-track-wrapper:nth-child(2)
    .marquee-track {
        --marquee-duration: 38s;
    }

    .marquee-track-wrapper:nth-child(3)
    .marquee-track {
        --marquee-duration: 35s;
    }

    .marquee-track-wrapper:nth-child(4)
    .marquee-track {
        --marquee-duration: 40s;
    }
}

/* =========================================
   IUNIXX – RESPONSIVE LAUFBÄNDER
========================================= */

/* Desktop und Tablet: 2 Laufbänder */

.marquee-section .marquee-desktop {
    display: flex;
}

.marquee-section .marquee-mobile {
    display: none;
}

/* Smartphone: 4 Laufbänder */

@media (max-width: 768px) {

    .marquee-section .marquee-desktop {
        display: none;
    }

    .marquee-section .marquee-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}
