/* STUDIO Testimonials als Karussell (partials/components/testimonials-marquee.hbs).
   Rückt alle paar Sekunden eine Karte weiter, läuft endlos. Am Handy wischen, am Computer Pfeile beim Drüberfahren.
   Gleiche Breite und Abstände wie "Über mich" und die Logo-Reihen (about-intro.css). */

.tm-section {
    --tm-max: 1200px;
    --tm-gutter: max(26px, 1.8vw);
    --tm-block-gap: max(88px, calc(7vw * var(--scale)));
    --tm-gap: max(10px, calc(.7vw * var(--scale)));
    --tm-radius: max(14px, calc(1.11vw * var(--scale)));
    --tm-per-view: 3;
    position: relative;
    z-index: 7;
    max-width: calc(var(--tm-max) + 2 * var(--tm-gutter));
    /* schließt an die Logo-Reihen an: gleicher Abstand wie zwischen diesen, abzüglich Innenabstand von "Über mich" */
    margin: calc(var(--tm-block-gap) - max(67px, 4.65vw)) auto 0;
    padding: 0 var(--tm-gutter) max(67px, 4.65vw);
    background-color: var(--background-color);
    color: var(--text-color);
}

.tm-section[hidden] {
    display: none;
}

.tm-title {
    display: block;
    margin: 0 0 max(24px, calc(1.8vw * var(--scale)));
    text-align: center;
}

.tm-viewport {
    position: relative;
}

.tm-list {
    position: relative;
    list-style: none;
    display: flex;
    gap: var(--tm-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.tm-list::-webkit-scrollbar {
    display: none;
}

.tm-list:focus-visible {
    outline: 2px solid var(--text-color);
    outline-offset: 4px;
}

.tm-card {
    flex: 0 0 calc((100% - (var(--tm-per-view) - 1) * var(--tm-gap)) / var(--tm-per-view));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    row-gap: max(28px, calc(2.2vw * var(--scale)));
    padding: max(22px, calc(1.8vw * var(--scale)));
    border-radius: var(--tm-radius);
    background-color: #F5F5F5;
    scroll-snap-align: start;
}

.tm-quote {
    margin: 0;
    font-size: 1rem; /* so groß wie der Text im Blogartikel */
    line-height: 1.45;
    letter-spacing: -.005em;
}

.tm-person {
    display: flex;
    align-items: center;
    column-gap: 12px;
}

.tm-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 100%;
    object-fit: cover;
    background-color: #E6E6E6;
}

.tm-name,
.tm-company {
    font-size: max(14px, calc(.97vw * var(--scale)));
    line-height: 1.35;
}

.tm-company {
    opacity: .6;
}

/* Pfeile: nur mit Maus, erscheinen beim Drüberfahren. Mit genug Weißraum sitzen sie neben den Karten. */
.tm-arrow {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .tm-arrow {
        position: absolute;
        top: 50%;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 12px;
        border-radius: 100%;
        background-color: var(--text-color);
        color: var(--background-color);
        opacity: 0;
        transform: translateY(-50%) scale(.9);
        transition: opacity .25s ease, transform .25s var(--ease-transition);
    }

    .tm-prev {
        left: 12px;
    }

    .tm-prev svg {
        transform: rotate(180deg);
    }

    .tm-next {
        right: 12px;
    }

    .tm-viewport:hover .tm-arrow,
    .tm-arrow:focus-visible {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 1360px) {
    /* Pfeile im Weißraum neben den Karten. Der Hover-Bereich wächst mit, damit sie beim Hinfahren bleiben. */
    .tm-viewport {
        margin-inline: -80px;
        padding-inline: 80px;
    }

    .tm-prev {
        left: 16px;
    }

    .tm-next {
        right: 16px;
    }
}

@media screen and (max-width: 1080px) {
    .tm-section {
        --tm-per-view: 2;
    }
}

@media screen and (max-width: 767px) {
    .tm-card {
        flex-basis: 85%;
    }
}
