/* Success Stories Page – redesign matching mockup */

.success-stories-section {
    padding: 64px 6% 100px;
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.success-stories-section .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    color: #0a0a0a;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 18px;
    color: #6b7280;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Filter Tabs – orange active, bordered inactive */
.stories-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #374151;
}

.filter-btn:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.filter-btn.active {
    background-color: #e85c29;
    color: #ffffff;
    border-color: #e85c29;
}

/* Cards Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Card – white, rounded, shadow */
.story-card {
    display: flex;
    flex-direction: column;
}

a.story-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.story-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #e85c29;
}

/* Image wrapper – metric badge overlapping top-left */
.story-img-wrapper {
    position: relative;
    width: 100%;
    height: 299.53px;
    overflow: hidden;
}

.story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.story-metric-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background-color: #e85c29;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}

/* Content area */
.story-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 295.49px;
}

.story-category {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.story-client {
    display: flex;
    align-items: center;
    gap: 12px;
}

.story-client-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}

.story-client--volvo .story-client-logo {
    background: #000;
}

.story-client--qlooch .story-client-logo {
    background: #000;
}

.story-client--planworks .story-client-logo {
    background: #39adef;
}

.story-client--commitbiz .story-client-logo {
    background: rgb(136, 16, 19);
}

.story-client--qra .story-client-logo {
    background: #1a2744;
}

/* Maison: white container with border */
.story-client-logo-wrap--maison {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #f0e0d6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px;
    box-sizing: border-box;
}
.story-client--maison .story-client-logo-wrap--maison .story-client-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}

/* Liqart: black background */
.story-client-logo-wrap--liqart {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px;
    box-sizing: border-box;
}
.story-client--liqart .story-client-logo-wrap--liqart .story-client-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    filter: brightness(0) invert(1);
}

.story-client--cloudsync .story-client-logo,
.story-client--cloudsync .story-client-logo-placeholder {
    background: #7c3aed;
}

.story-client--purevibe .story-client-logo,
.story-client--purevibe .story-client-logo-placeholder {
    background: #059669;
}

.story-client--taskflow .story-client-logo,
.story-client--taskflow .story-client-logo-placeholder {
    background: #e85c29;
}

.story-client--stylehub .story-client-logo,
.story-client--stylehub .story-client-logo-placeholder {
    background: #ec4899;
}

.story-client--fitlife .story-client-logo,
.story-client--fitlife .story-client-logo-placeholder {
    background: #dc2626;
}

.story-client-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.3;
}

.story-client-label {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.story-client-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.story-client-logo-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 0;
    color: #fff;
    flex-shrink: 0;
}

.story-client--volvo .story-client-logo-placeholder {
    background: #000;
}

.story-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 4px 0 0 0;
    line-height: 1.35;
}

.story-desc {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

.story-link {
    font-size: 14px;
    font-weight: 600;
    color: #e85c29;
    text-decoration: none;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.story-link:hover,
a.story-card-link:hover .story-link {
    color: #d64d1f;
}

/* Trusted by leading brands – reuses .trusted-clients-section .clients-logos .client-logo from style.css */
.trusted-brands-section {
    margin-top: 40px;
    padding: 40px 0;
    text-align: center;
    background-color: #ffffff;
}

.trusted-brands-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #6b7280;
    margin: 0 0 40px 0;
    text-transform: uppercase;
}

.trusted-brands-clients.trusted-clients-section {
    margin-top: 0;
    margin-bottom: 0;
}

.trusted-brands-logos-wrap {
    position: relative;
}

.trusted-brands-section .clients-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 64px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0.8;
}

.trusted-brand-item {
    flex-shrink: 0;
}

.trusted-brands-section .clients-logos .client-logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.trusted-brands-dots {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .success-stories-section {
        padding: 60px 20px 80px;
    }

    .page-title {
        font-size: 36px;
    }

    .page-subtitle {
        font-size: 16px;
    }

    .stories-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .story-img-wrapper {
        height: 180px;
    }

    .trusted-brands-section {
        margin-top: 32px;
        padding: 32px 0;
    }

    .trusted-brands-title {
        font-size: 12px;
        margin-bottom: 28px;
    }

    .trusted-brands-section .clients-logos {
        gap: 44px;
    }

    /* Mobile: one logo at a time, swipable, dots */
    .trusted-brands-logos-wrap {
        padding: 0 16px;
    }

    .trusted-brands-section .clients-logos {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0;
        padding: 0 0 16px;
        max-width: none;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .trusted-brands-section .clients-logos::-webkit-scrollbar {
        display: none;
    }

    .trusted-brand-item {
        scroll-snap-align: center;
        scroll-snap-stop: always;
        flex: 0 0 100%;
        min-width: 100%;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .trusted-brands-section .clients-logos .client-logo {
        height: 48px;
        max-width: 140px;
    }

    .trusted-brands-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }

    .trusted-brands-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #d1d5db;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .trusted-brands-dot.is-active {
        background: #e85c29;
        transform: scale(1.1);
    }
}
