/* Customer Success cards — clean & flat */

.cr-card {
    position: relative;
    display: flex;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgb(226 232 240 / 0.95);
    border-radius: 0.875rem;
    background: #fff;
    box-shadow: 0 8px 16px -8px rgb(15 23 42 / 0.08);
}

.cr-card--muted {
    background: #fafafa;
}

.cr-card--stat {
    flex-direction: column;
    width: min(86vw, 20rem);
}

.cr-card--testimonial {
    flex-direction: column;
    width: min(86vw, 20rem);
}

@media (min-width: 640px) {
    .cr-card--stat,
    .cr-card--testimonial {
        width: 35rem;
    }

    .cr-card--testimonial.cr-card--portrait {
        width: 38rem;
    }

    .cr-card--testimonial {
        flex-direction: row;
    }

    .cr-card--testimonial.cr-card--reverse {
        flex-direction: row-reverse;
    }
}

/* Stat */
.cr-card--stat {
    align-items: stretch;
}

.cr-card__stat-top {
    flex-shrink: 0;
}

.cr-card__chart {
    padding: 0.75rem 0.75rem 0;
}

@media (min-width: 640px) {
    .cr-card__chart {
        padding: 1rem 1rem 0;
    }
}

.cr-card__chart img {
    display: block;
    width: 100%;
    max-height: 8.5rem;
    border-radius: 0.5rem;
    object-fit: contain;
}

@media (min-width: 640px) {
    .cr-card__chart img {
        max-height: 10rem;
    }
}

.cr-card__stat-copy {
    padding: 0.875rem 1rem 0;
}

@media (min-width: 640px) {
    .cr-card__stat-copy {
        padding: 1rem 1.25rem 0;
    }
}

.cr-card__headline {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
}

@media (min-width: 640px) {
    .cr-card__headline {
        font-size: 1.125rem;
    }
}

.cr-card__metrics {
    display: flex;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
}

.cr-card__metric {
    min-width: 0;
    flex: 1 1 0;
    padding: 0.75rem 0.875rem;
}

.cr-card__metric + .cr-card__metric {
    border-left: 1px solid #f1f5f9;
}

@media (min-width: 640px) {
    .cr-card__metric {
        padding: 0.875rem 1.25rem;
    }
}

.cr-card__metric-value {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}

@media (min-width: 640px) {
    .cr-card__metric-value {
        font-size: 1.25rem;
    }
}

.cr-card__metric-label {
    margin-top: 0.3125rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
}

/* Testimonial */
.cr-card__media {
    flex-shrink: 0;
    overflow: hidden;
    background: #f8fafc;
}

.cr-card__media--natural {
    width: 100%;
    background: inherit;
}

.cr-card__media--natural img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center top;
}

/* Portrait testimonial — reference layout (Eugen / Mr Foodis) */
.cr-card--portrait .cr-card__media--natural {
    padding: 1rem 1rem 0;
    overflow: visible;
    background: inherit;
}

.cr-card--portrait .cr-card__media--natural img {
    aspect-ratio: 4 / 5;
    border-radius: 0.875rem;
}

.cr-card--portrait .cr-card__body {
    padding: 1rem 1.125rem 1.125rem;
}

.cr-card--portrait .cr-card__quote {
    margin-top: 1rem;
}

.cr-card__media--cutout,
.cr-card__media--cutout-fill {
    height: 9rem;
    width: 100%;
}

@media (min-width: 640px) {
    .cr-card--portrait .cr-card__media--natural {
        width: 38%;
        max-width: 14.5rem;
        flex-shrink: 0;
        padding: 1.25rem 0 1.25rem 1.25rem;
        align-self: stretch;
    }

    .cr-card--portrait.cr-card--reverse .cr-card__media--natural {
        padding: 1.25rem 1.25rem 1.25rem 0;
    }

    .cr-card--portrait .cr-card__media--natural img {
        width: 100%;
        height: 100%;
        min-height: 15rem;
        aspect-ratio: auto;
        border-radius: 1rem;
    }

    .cr-card--portrait .cr-card__body {
        padding: 1.375rem 1.5rem 1.375rem 1.25rem;
    }

    .cr-card--portrait.cr-card--reverse .cr-card__body {
        padding: 1.375rem 1.25rem 1.375rem 1.5rem;
    }

    .cr-card--portrait .cr-card__footer {
        padding-top: 1.5rem;
    }

    .cr-card__media--cutout,
    .cr-card__media--cutout-fill {
        width: 12rem;
        height: auto;
        min-height: 12rem;
        align-self: stretch;
    }
}

.cr-card__media--cutout img,
.cr-card__media--cutout-fill img {
    display: block;
    width: 100%;
    height: 100%;
}

.cr-card__media--cutout img {
    object-fit: contain;
    object-position: bottom center;
}

.cr-card__media--cutout-fill img {
    object-fit: cover;
    object-position: top center;
}

.cr-card__body {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0.875rem 1rem 1rem;
}

@media (min-width: 640px) {
    .cr-card__body {
        padding: 1.125rem 1.25rem 1.25rem;
    }
}

.cr-card--testimonial .cr-card__logo-wrap {
    display: flex;
    height: 2.25rem;
    align-items: center;
}

@media (min-width: 640px) {
    .cr-card--testimonial .cr-card__logo-wrap {
        height: 2.75rem;
    }
}

.cr-card--testimonial .cr-card__logo {
    max-height: 100%;
    width: auto;
    max-width: 13rem;
    object-fit: contain;
}

@media (min-width: 640px) {
    .cr-card--testimonial .cr-card__logo {
        max-width: 15rem;
    }
}

.cr-card--testimonial .cr-card__quote {
    margin: 0.75rem 0 0;
    flex: 1 1 auto;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
}

@media (min-width: 640px) {
    .cr-card--portrait .cr-card__quote {
        margin-top: 1.25rem;
    }

    .cr-card--testimonial .cr-card__quote {
        margin-top: 0.875rem;
        font-size: 1.125rem;
        line-height: 1.4;
    }
}

.cr-card--testimonial .cr-card__footer {
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f1f5f9;
}

.cr-card--portrait.cr-card--testimonial .cr-card__footer {
    margin-top: auto;
    border-top: none;
}

.cr-card--testimonial .cr-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

@media (min-width: 640px) {
    .cr-card--testimonial .cr-card__name {
        font-size: 1rem;
    }
}

.cr-card--testimonial .cr-card__role {
    margin-top: 0.1875rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

@media (min-width: 640px) {
    .cr-card--testimonial .cr-card__role {
        font-size: 0.875rem;
    }
}

/* Marquee */
.cr-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    -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%);
}

.cr-marquees {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cr-track {
    display: flex;
    width: max-content;
    gap: 0.75rem;
    will-change: transform;
    transform: translateZ(0);
}

.cr-track--desktop {
    display: flex;
    align-items: stretch;
}

.cr-track--mobile {
    display: none;
    align-items: flex-start;
}

/* Desktop animations */
@media (min-width: 640px) {
    .cr-marquees {
        gap: 1.25rem;
    }

    .cr-track {
        gap: 1.25rem;
    }

    .cr-track--desktop.cr-track--left {
        animation: cr-scroll-left var(--cr-duration, 60s) linear infinite;
    }

    .cr-track--desktop.cr-track--right {
        animation: cr-scroll-right var(--cr-duration, 60s) linear infinite;
    }

    @keyframes cr-scroll-left {
        from { transform: translateX(0); }
        to { transform: translateX(calc(-50% - 0.625rem)); }
    }

    @keyframes cr-scroll-right {
        from { transform: translateX(calc(-50% - 0.625rem)); }
        to { transform: translateX(0); }
    }

    @media (hover: hover) {
        .cr-marquee:hover .cr-track--desktop {
            animation-play-state: paused;
        }
    }
}

/* Mobile slider */
@media (max-width: 639px) {
    .cr-marquees {
        gap: 0.5rem;
    }

    .cr-marquee {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 2%, #000 98%, transparent 100%);
    }

    .cr-track--desktop {
        display: none;
    }

    .cr-track--mobile {
        display: flex;
        gap: 0.5rem;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        animation: cr-scroll-left-mobile var(--cr-mobile-duration, var(--cr-duration, 60s)) linear infinite;
        animation-delay: var(--cr-delay, 0s);
    }

    @keyframes cr-scroll-left-mobile {
        from { transform: translateX(0); }
        to { transform: translateX(calc(-50% - 0.25rem)); }
    }

    .cr-stats-column {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        flex-shrink: 0;
        width: clamp(10.5rem, 44vw, 12.75rem);
        align-self: flex-start;
    }

    .cr-stats-column .cr-card--stat {
        width: 100%;
        margin-top: 0 !important;
    }

    .cr-stats-column .cr-card--stat .cr-card__chart img {
        max-height: 6.5rem;
    }

    .cr-stats-column .cr-card--stat .cr-card__headline {
        font-size: 0.6875rem;
        line-height: 1.4;
    }

    .cr-stats-column .cr-card--stat .cr-card__stat-copy {
        padding: 0.5rem 0.625rem 0;
    }

    .cr-stats-column .cr-card--stat .cr-card__metric {
        padding: 0.5rem 0.3125rem;
    }

    .cr-stats-column .cr-card--stat .cr-card__metric-value {
        font-size: 0.8125rem;
    }

    .cr-card {
        height: auto;
        align-self: flex-start;
        width: clamp(10.5rem, 44vw, 12.75rem);
        flex-shrink: 0;
    }

    .cr-card--testimonial,
    .cr-card--stat {
        width: clamp(10.5rem, 44vw, 12.75rem);
        flex-direction: column;
    }

    .cr-card__body {
        flex: none;
    }

    .cr-card--testimonial .cr-card__quote {
        flex: none;
    }

    .cr-card--portrait.cr-card--testimonial .cr-card__footer,
    .cr-card--stat .cr-card__metrics {
        margin-top: 0.625rem;
    }

    .cr-card--stat .cr-card__metrics {
        margin-top: 0.5rem;
    }

    .cr-marquee--row-a .cr-track--mobile > *:nth-child(4n + 2) {
        margin-top: 1.125rem;
    }

    .cr-marquee--row-a .cr-track--mobile > *:nth-child(4n + 3) {
        margin-top: 2rem;
    }

    .cr-marquee--row-b .cr-track--mobile > *:nth-child(4n + 1) {
        margin-top: 1.25rem;
    }

    .cr-marquee--row-b .cr-track--mobile > *:nth-child(4n + 3) {
        margin-top: 2.25rem;
    }

    .cr-card--portrait .cr-card__media--natural {
        padding: 0.5rem 0.5rem 0;
        overflow: hidden;
        background: inherit;
        height: auto;
    }

    .cr-card--portrait .cr-card__media--natural img {
        aspect-ratio: 4 / 5;
        border-radius: 0.625rem;
        height: auto;
        width: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .cr-card--portrait .cr-card__body {
        padding: 0.625rem 0.75rem 0.75rem;
    }

    .cr-card--portrait .cr-card__quote {
        margin-top: 0.5rem;
    }

    .cr-card--portrait.cr-card--testimonial .cr-card__footer {
        padding-top: 0.625rem;
        border-top: 1px solid #f1f5f9;
    }

    .cr-card__media--cutout {
        height: 8.75rem;
        aspect-ratio: auto;
        background: inherit;
    }

    .cr-card__media--cutout-fill {
        height: 10rem;
        aspect-ratio: auto;
        background: inherit;
    }

    .cr-card--testimonial .cr-card__logo-wrap {
        height: 1.75rem;
    }

    .cr-card--testimonial .cr-card__logo {
        max-width: 100%;
    }

    .cr-card--testimonial .cr-card__body {
        padding: 0.625rem 0.75rem 0.75rem;
    }

    .cr-card--testimonial .cr-card__quote {
        margin-top: 0.5rem;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.45;
    }

    .cr-card--testimonial .cr-card__footer {
        margin-top: 0.625rem;
        padding-top: 0.625rem;
    }

    .cr-card--testimonial .cr-card__name {
        font-size: 0.75rem;
    }

    .cr-card--testimonial .cr-card__role {
        font-size: 0.6875rem;
        line-height: 1.35;
    }

    .cr-card--stat .cr-card__chart {
        padding: 0.5rem 0.5rem 0;
    }

    .cr-card--stat .cr-card__chart img {
        max-height: 5.5rem;
    }

    .cr-card--stat .cr-card__stat-copy {
        padding: 0.5rem 0.625rem 0;
    }

    .cr-card--stat .cr-card__headline {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .cr-card--stat .cr-card__metric {
        padding: 0.5rem 0.3125rem;
    }

    .cr-card--stat .cr-card__metric-value {
        font-size: 0.875rem;
    }

    .cr-card--stat .cr-card__metric-label {
        font-size: 0.625rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cr-track--desktop,
    .cr-track--mobile {
        animation: none !important;
    }
}

.cr-results-grid {
    display: flex;
    flex-direction: column;
}

