.trusted-by-businesses {
    padding: 100px 0;
    background: var(--text-icon-white, #fff);

    @media (max-width: 768px) {
        padding: 40px 0;
    }

    .heading-container {
        span {
            color: #0080ea;
        }

        .distinct--text {
            margin-bottom: 48px !important;

            @media (max-width: 768px) {
                margin-bottom: 24px !important;
                text-align: left;
            }
        }
    }
}

.trusted-by-businesses__header {
    text-align: center;
    margin-bottom: 80px;

    @media (max-width: 768px) {
        margin-bottom: 60px;
    }
}

.trusted-by-businesses__title {
    color: var(--text-icon-emphasize, #202223);
    font-family: 'Plus Jakarta Sans';
    font-size: 48px;
    font-style: normal;
    font-weight: 800;
    line-height: 56px;
    margin-bottom: 24px;

    @media (max-width: 768px) {
        font-size: 32px;
        line-height: 40px;
        margin-bottom: 16px;
    }

    span {
        color: var(--Fills-Action, #0080ea);
    }
}

.trusted-by-businesses__subtitle {
    color: var(--text-icon-secondary, #636c7a);
    font-family: Inter;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px;
    max-width: 800px;
    margin: 0 auto;

    @media (max-width: 768px) {
        font-size: 18px;
        line-height: 26px;
    }
}

/* Two-column flexbox layout */
.trusted-by-businesses__grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 16px;

    @media (max-width: 992px) {
        flex-direction: column;
    }
}

.trusted-by-businesses__item {
    border-radius: 16px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; /* Default: full width for quote/metric items */

    @media (max-width: 768px) {
        padding: 24px;
        min-height: 180px;
        flex-direction: column;
        justify-content: flex-start;
    }

    .icon-hover {
        position: absolute;
        right: 24px;
        top: 24px;
        opacity: 0;
        font-size: 28px;
        color: #4e4b66;
    }

    &:hover {
        .trusted-by-businesses__item-link {
            background-color: rgba(0, 0, 0, 0.1);
        }
        .icon-hover {
            opacity: 1;
        }
    }
}

/* Stat items should be 50% width within their column */
.trusted-by-businesses__item--stat {
    grid-column: span 2 / span 2;
    display: flex;
    gap: 42px;
    flex-direction: column;
    min-height: 257px;
    justify-content: space-between;
    @media (max-width: 992px) {
        grid-column: span 4 / span 4;
    }

    @media (max-width: 640px) {
        grid-column: span 8 / span 8;
    }

    img {
        max-height: 40px;
    }

    &.trusted-by-businesses__item--default {
        background-color: #ebeef5;
    }
}

/* Items flow naturally - first 4 items in column 1, next 4 in column 2 */

/* Background color variations */
.trusted-by-businesses__item--default {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-default, #e3e4ee);
}

.trusted-by-businesses__item--orange {
    background: #fceeda;
}

.trusted-by-businesses__item--purple {
    background: #f3f1ff;
}

.trusted-by-businesses__item--blue {
    background: #e8f4ff;
}

.trusted-by-businesses__item--green {
    background: #e8f7f0;
}

.trusted-by-businesses__item--pink {
    background: #fff0f3;
}

.trusted-by-businesses__item--yellow {
    background: #fff9e6;
}

/* Background image support */
.trusted-by-businesses__item--has-bg-image {
    background-color: transparent !important;

    .trusted-by-businesses__stat-number,
    .trusted-by-businesses__metric-value {
        color: var(--base-foreground, #18181b);
        font-family: var(--typography-font-family-font-sans, Inter);
        font-size: var(--typography-base-sizes-4x-large-font-size, 36px);
        font-style: normal;
        font-weight: var(--font-weight-semibold, 600);
        line-height: 120%;
    }

    .trusted-by-businesses__stat-description,
    .trusted-by-businesses__metric-description {
        color: var(--base-foreground, #18181b);

        /* text base/leading-normal/medium */
        font-family: var(--typography-font-family-font-sans, Inter);
        font-size: var(--typography-base-sizes-base-font-size, 16px);
        font-style: normal;
        font-weight: var(--font-weight-medium, 500);
        line-height: var(--typography-base-sizes-base-line-height, 24px); /* 150% */
    }

    .trusted-by-businesses__quote,
    .trusted-by-businesses__author-name {
        color: #202223;
    }

    .trusted-by-businesses__author-title {
        color: var(--text-icon-secondary, #636c7a);
    }

    /* Ensure content is above overlay */
    > * {
        position: relative;
        z-index: 2;
    }
}

/* Clickable overlay link */
.trusted-by-businesses__item-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: block;
    text-decoration: none;
    color: transparent;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s all;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Logo styling */
.trusted-by-businesses__logo {
    display: flex;
    align-items: center;

    img {
        max-width: 120px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    @media (max-width: 768px) {
        img {
            max-width: 100px;
        }
    }
}

/* Statistics card styling */
.trusted-by-businesses__stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trusted-by-businesses__stat-number {
    color: var(--base-foreground, #18181b);

    /* text 4x large/leading-1.2%/semibold */
    font-family: var(--typography-font-family-font-sans, Inter);
    font-size: var(--typography-base-sizes-4x-large-font-size, 36px);
    font-style: normal;
    font-weight: var(--font-weight-semibold, 600);
    line-height: 120%; /* 43.2px */
}

.trusted-by-businesses__stat-description {
    color: #202223;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;

    @media (max-width: 768px) {
        font-size: 14px;
        line-height: 20px;
    }
}

/* Metric card styling */
.trusted-by-businesses__metric {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trusted-by-businesses__metric-value {
    color: #202223;
    font-family: 'Plus Jakarta Sans';
    font-size: 48px;
    font-style: normal;
    font-weight: 800;
    line-height: 56px;
    margin-bottom: 8px;

    @media (max-width: 768px) {
        font-size: 36px;
        line-height: 44px;
    }
}

.trusted-by-businesses__metric-description {
    color: #202223;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;

    @media (max-width: 768px) {
        font-size: 14px;
        line-height: 20px;
    }
}

/* Quote card styling */
.trusted-by-businesses__quote-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.trusted-by-businesses__quote {
    color: #202223;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0 0 24px 0;
    flex: 1;
    padding-right: 20px;

    @media (max-width: 768px) {
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 20px;
    }
}

.trusted-by-businesses__author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.trusted-by-businesses__author-info {
    flex: 1;
}

.trusted-by-businesses__author-name {
    color: var(--text-icon-emphasize, #202223);
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

.trusted-by-businesses__author-title {
    color: var(--text-icon-distinct, #6e7191);

    /* 14 Text Regular */
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px; /* 142.857% */
}

.trusted-by-businesses__company-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 32px;

    img {
        max-height: 32px;
        max-width: 80px;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    @media (max-width: 768px) {
        height: 24px;

        img {
            max-height: 24px;
            max-width: 60px;
        }
    }
}

.trusted-by-businesses__item--quote {
    min-height: 256px;
    grid-column: span 4 / span 4;

    @media (max-width: 640px) {
        grid-column: span 8 / span 8;

        min-height: 290px;
    }

    .trusted-by-businesses__company-logo {
        width: auto;
        height: auto;
        img {
            width: 100%;
            height: auto;
            object-fit: none;
            max-width: 100%;
            max-height: 100%;
        }
    }

    .trusted-by-businesses__quote {
        color: var(--text-icon-moderate, #333241);
        font-family: Inter;
        font-size: 18px;
        font-style: normal;
        font-weight: 500;
        line-height: 28px;
    }
}

.trusted-by-businesses__item--metric {
    display: flex;
    flex-direction: column;
    min-height: 256px;
    grid-column: span 4 / span 4;
    justify-content: space-between;

    @media (max-width: 992px) {
        grid-column: span 4 / span 4;
    }

    @media (max-width: 640px) {
        grid-column: span 8 / span 8;
    }

    .trusted-by-businesses__metric-value {
        color: var(--text-icon-emphasize, #202223);

        /* text 5x large/leading-1.2%/semibold */
        font-family: var(--typography-font-family-font-sans, Inter);
        font-size: var(--typography-base-sizes-5x-large-font-size, 48px);
        font-style: normal;
        font-weight: var(--font-weight-semibold, 600);
        line-height: 120%; /* 57.6px */

        @media (max-width: 992px) {
            color: var(--base-foreground, #18181b);

            /* text 4x large/leading-1.2%/semibold */
            font-family: var(--typography-font-family-font-sans, Inter);
            font-size: var(--typography-base-sizes-4x-large-font-size, 36px);
            font-style: normal;
            font-weight: var(--font-weight-semibold, 600);
            line-height: 120%; /* 43.2px */
        }
    }
}

.textmagic-badges {
    padding-top: 100px;
    background: none;
    background-size: cover;
}

@media (max-width: 1024px) {
    .textmagic-badges {
        padding-top: 80px;
    }
}

@media (max-width: 767.98px) {
    .textmagic-badges {
        padding-top: 40px;
    }
}
.textmagic-badges .container {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.textmagic-badges .container img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

@media (max-width: 1023.98px) {
    .textmagic-badges .container {
        gap: 24px;
    }
    .textmagic-badges .container img {
        max-width: 94px;
    }
}
@media (max-width: 768px) {
    .textmagic-badges .container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 24px;

        img {
            width: 13%;
        }
    }
    .textmagic-badges .container img {
        max-width: 100%;
    }
}

@media (max-width: 540px) {
    .textmagic-badges .container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 24px;

        img {
            width: 28%;
        }
    }
}
