@import url('tokens.css');

/* Link local vars to tokens or define locally scoped vars */
.success-stories-container {
    --card-width: 320px;
    --gap: var(--spacing-xl);
}

/* --- Section and Header Styling --- */
.success-stories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 96px 24px;
}

.stories-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    max-width: 1400px;
}

.stories-header h2 {
    font-weight: 400;
    font-size: var(--font-size-3xl);
    text-align: center;
    width: 100%;
}

.stories-nav {
    position: absolute;
    right: 0;
}

.arrow {
    background: var(--color-bg-light-blue);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-circle);
    margin-left: 8px;
    cursor: pointer;
    font-size: var(--font-size-lg);
    transition: background 0.3s;
}

.arrow:hover {
    background: var(--color-bg-light-button-blue);
}

.arrow img {
    width: 24px;
    height: 24px;
}

/* --- CAROUSEL FADE EFFECT CONTAINER --- */
.carousel-mask-container {
    overflow: hidden;
    position: relative;
    /* Add padding to prevent the mask from hiding content entirely */
    padding: 0 8px;
    width: 100%;
    max-width: 100vw;
}


/* --- Testimonial Track Styling --- */
.testimonials-track {
    display: flex;
    padding-bottom: 24px;
    /* Smooth JS movement */
    transition: transform 0.6s ease-out;
    width: fit-content;
}

.testimonial-card {
    background: var(--color-bg-stories);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    /* Use flex-shrink: 0 to maintain fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    width: var(--card-width);
    height: 320px;
    margin-right: var(--gap);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.user-info img {
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.name,
.role {
    font-weight: 400;
    margin: 0;
}

.role {
    padding-top: 4px;
    font-size: var(--font-size-xs);
    font-weight: 300;
    color: var(--color-text-slate);
}

.story-content {
    max-height: initial;
    overflow: initial;
}

.quote {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 300;
}

.logo-box {
    font-weight: 300;
    color: var(--color-primary);
}

.testimonial-card.card-faded-edge {
    /* Apply the requested opacity */
    opacity: 0.6;
    /* Ensure the opacity change is smooth */
    transition: opacity 0.6s ease-out;
}

@media (max-width: 500px) {
    .success-stories-container {
        padding: 32px 0;
    }

    .stories-nav {
        display: none;
    }

    .carousel-mask-container {
        max-width: 100vw;
    }

    .stories-header {
        margin-bottom: 8px;
    }

    .stories-header h2 {
        font-size: var(--font-size-2xl);
    }
}