/* ===== V1 Products: Hero + Supporting ===== */
.products-hero {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 3rem;
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.products-hero:hover {
    transform: translateY(-4px);
}

.products-hero:hover .hero-cta {
    background: var(--header-color);
    color: white;
}

.products-hero-text {
    flex: 1 1 40%;
    min-width: 0;
}

.products-hero-text img {
    height: 48px;
    margin-bottom: 1rem;
}

.products-hero-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.products-hero-text p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.module-grid {
    flex: 1 1 55%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-surface);
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.module-item:hover {
    transform: translateY(-3px);
}

.module-item img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.module-item span {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hero-cta {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--cost-foreground-color);
    padding: 0.75rem 1.75rem;
    border-radius: 5rem;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform 0.2s, background-color 0.2s;
}

.hero-cta:hover {
    background: var(--header-color);
    color: white;
    transform: translateY(-2px);
}

.hero-cta-mobile {
    display: none;
    align-self: center;
}

.supporting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.supporting-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.supporting-card:hover {
    transform: translateY(-4px);
}

.supporting-card img {
    height: 56px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.supporting-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.supporting-card p {
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.supporting-card .card-button {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--cost-foreground-color);
    padding: 0.75rem 1.75rem;
    border-radius: 5rem;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform 0.2s, background-color 0.2s;
}

.supporting-card:hover .card-button {
    background: var(--header-color);
    color: white;
}

/* ===== V1 Customers: Auto-scrolling Marquee ===== */
#customers {
    padding-top: 4rem;
    padding-bottom: 4rem;
    overflow: hidden;
}

#customers > .content {
    margin-top: 0;
    margin-bottom: 0;
}

.marquee {
    overflow-x: auto;
    cursor: grab;
    width: 100%;
    padding: 1.5rem 0 5rem;
}

.marquee:active {
    cursor: grabbing;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track.marquee-dragging {
    animation-play-state: paused !important;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-card {
    flex-shrink: 0;
    width: 340px;
    height: 200px;
    margin: 0 1.5rem;
    background: var(--bg-surface);
    border-radius: 1em;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.marquee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 30px 50px 0px rgba(15, 38, 92, 0.18);
}

.marquee-card a,
.marquee-card-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.marquee-card img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.customers-stories {
    margin-top: 3.5rem;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(5rem, 1fr) minmax(0, 48rem) minmax(5rem, 1fr);
    column-gap: clamp(0.75rem, 2vw, 1.5rem);
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

.customer-story-window {
    position: relative;
    grid-column: 2;
    z-index: 1;
    overflow: visible;
    padding: 0.5rem 0;
    width: 100%;
}

.customer-story-track {
    display: grid;
    overflow: visible;
}

.customer-story {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-120vw);
    width: 100%;
    padding: 0;
}

.customer-story.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.customer-story.is-entering-from-left {
    animation: customer-story-enter-from-left 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.customer-story.is-entering-from-right {
    animation: customer-story-enter-from-right 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.customer-story.is-exiting-to-right {
    animation: customer-story-exit-to-right 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    opacity: 1;
}

.customer-story.is-exiting-to-left {
    animation: customer-story-exit-to-left 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    opacity: 1;
}

@keyframes customer-story-enter-from-left {
    from {
        opacity: 1;
        transform: translateX(-120vw);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes customer-story-enter-from-right {
    from {
        opacity: 1;
        transform: translateX(120vw);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes customer-story-exit-to-right {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 1;
        transform: translateX(120vw);
    }
}

@keyframes customer-story-exit-to-left {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 1;
        transform: translateX(-120vw);
    }
}

.customer-story-nav {
    position: relative;
    z-index: 5;
    align-self: center;
    justify-self: center;
    width: 4.75rem;
    min-height: 7.5rem;
    border: none;
    border-radius: 1rem;
    background-color: transparent;
    box-shadow: none;
    color: var(--button-background-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    line-height: 1;
    padding: 0;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.customer-story-nav-icon {
    display: block;
    width: 2.55rem;
    height: 4.15rem;
    color: currentColor;
    overflow: visible;
    pointer-events: none;
}

.customer-story-nav-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 4.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.customers-stories.is-sliding .customer-story-nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
}

.customer-story-nav-prev {
    grid-column: 1;
}

.customer-story-nav-next {
    grid-column: 3;
}

.customer-story-nav:hover,
.customer-story-nav:focus,
.customer-story-nav:focus-visible {
    background-color: rgba(15, 38, 92, 0.06);
    box-shadow: 0 18px 36px rgba(15, 38, 92, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.customer-story-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 1.25rem 2.5rem;
    border-radius: 1rem;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.customer-story-link:hover,
.customer-story-link:focus-visible {
    background: rgba(15, 38, 92, 0.06);
    box-shadow: 0 18px 36px rgba(15, 38, 92, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.customer-story-quote {
    flex: 1 1 40rem;
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.45;
    color: var(--button-background-color);
    font-style: italic;
    border-left: 4px solid var(--button-background-color);
    padding: 0.65rem 0 0.65rem 1.25rem;
    text-align: left;
}

.customer-story-product {
    display: flex;
    flex: 0 0 7rem;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}

.customer-story-product-logo {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    border-radius: 1rem;
    background: var(--bg-surface);
    box-shadow: var(--shadow);
}

.customer-story-product-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.customer-story-quote cite {
    display: block;
    margin-top: 0.7rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-style: normal;
    font-weight: 700;
    white-space: normal;
}

@media (max-width: 1100px) {
    .customers-stories {
        grid-template-columns: 4rem minmax(0, 1fr) 4rem;
        column-gap: 0.75rem;
        padding-inline: 1.25rem;
    }

    .customer-story-window {
        overflow: hidden;
    }

    .customer-story-link {
        gap: 1.25rem;
        padding-inline: 1rem;
    }

    .customer-story-quote {
        flex-basis: auto;
        font-size: 1.2rem;
    }

    .customer-story-product {
        flex-basis: 6rem;
    }

    .customer-story-nav {
        width: 3.5rem;
        min-height: 5.75rem;
    }

    .customer-story-nav-icon {
        width: 2rem;
        height: 3.25rem;
    }
}

/* ===== V1 Responsive ===== */
@media (max-width: 768px) {
    .products-hero {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .products-hero-text {
        flex: none;
        width: 100%;
    }

    .products-hero-text .hero-cta {
        display: none;
    }

    .hero-cta-mobile {
        display: inline-block;
    }

    .module-grid {
        flex: none;
        width: 100%;
    }

    .supporting-grid {
        grid-template-columns: 1fr;
    }

    .marquee-card {
        width: 260px;
        height: 160px;
        margin: 0 1rem;
        padding: 1.5rem;
    }

    .marquee-card img {
        max-height: 110px;
    }

    .customers-stories {
        grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
        column-gap: 0.25rem;
        margin-top: 2.5rem;
        padding-inline: 0;
    }

    .customer-story-window {
        overflow: hidden;
        padding: 0.25rem 0 1.5rem;
    }

    .customer-story-nav {
        width: 2.75rem;
        min-height: 4.75rem;
    }

    .customer-story-nav-icon {
        width: 1.7rem;
        height: 2.65rem;
    }

    .customer-story-link {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
        padding: 0.75rem 0.75rem 1.25rem 1.25rem;
        position: relative;
        text-align: center;
    }

    .customer-story-link::before {
        content: "";
        position: absolute;
        top: 0.75rem;
        bottom: 1.25rem;
        left: 0;
        width: 4px;
        background: var(--button-background-color);
    }

    .customer-story-product {
        align-items: center;
        flex-direction: column;
        flex-basis: auto;
        justify-content: center;
        width: 100%;
        gap: 0.6rem;
    }

    .customer-story-product-logo {
        width: 4rem;
        height: 4rem;
        border-radius: 0.85rem;
    }

    .customer-story-quote {
        border-left: 0;
        width: 100%;
        flex: none;
        font-size: 1.05rem;
        line-height: 1.45;
        padding: 0;
        text-align: left;
    }

    .customer-story-quote cite {
        display: block;
        margin-top: 0.5rem;
        white-space: normal;
    }
}

@media only screen and (max-width: 500px) {
    .marquee-card {
        width: 210px;
        height: 130px;
        margin: 0 0.75rem;
        padding: 1rem;
    }

    .marquee-card img {
        max-height: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }

    .marquee-card {
        transition: none;
    }
}
