.customer-stories {
    --cs-navy: #071a36;
    --cs-blue: #256bd6;
    --cs-cyan: #42d4ca;
    position: relative;
    overflow: hidden;
    padding: clamp(3.25rem, 6vw, 5.5rem) 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(66, 212, 202, .12), transparent 28rem),
        radial-gradient(circle at 90% 90%, rgba(58, 121, 231, .18), transparent 30rem),
        linear-gradient(145deg, #071a36, #0b2a52 60%, #09213f);
    color: #fff;
    isolation: isolate;
}

.customer-stories::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.customer-stories__heading {
    position: relative;
    max-width: 810px;
    margin: 0 auto clamp(1.8rem, 4vw, 3rem);
    padding: 0 clamp(.75rem, 2vw, 1.5rem);
    background: transparent;
    text-align: center;
}

.customer-stories__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .8rem;
    padding: .42rem .9rem;
    border: 1px solid rgba(112, 232, 223, .18);
    border-radius: 999px;
    background: rgba(66, 212, 202, .07);
    color: #70e8df;
    font-size: .9rem;
    font-weight: 800;
}

.customer-stories__eyebrow::before,
.customer-stories__eyebrow::after {
    width: 14px;
    height: 1px;
    background: currentColor;
    content: "";
}

.customer-stories__heading h2 {
    margin: 0 0 .75rem;
    color: #fff;
    font-size: clamp(1.55rem, 3.3vw, 2.35rem);
    font-weight: 900;
    line-height: 1.65;
    text-align: center;
}

.customer-stories__heading p {
    max-width: 670px;
    margin: 0 auto;
    color: #b9cbe1;
    line-height: 2;
    text-align: center;
}

.customer-stories__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(.7rem, 1.4vw, 1.15rem);
}

.customer-story-card {
    min-width: 0;
}

.customer-story-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    padding: 0;
    aspect-ratio: 9 / 16;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    background: linear-gradient(155deg, #16477c, #081b34 70%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
    color: #fff;
    cursor: pointer;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.customer-story-card__media:hover,
.customer-story-card__media:focus-visible {
    border-color: rgba(112, 232, 223, .72);
    box-shadow: 0 24px 52px rgba(0, 0, 0, .38);
    outline: none;
    transform: translateY(-7px);
}

.customer-story-card__preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .4s ease;
}

.customer-story-card__preview.is-loaded {
    opacity: 1;
}

.customer-story-card__media:hover .customer-story-card__preview {
    transform: scale(1.035);
}

.customer-story-card__shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(2, 13, 29, .72), transparent 55%);
}

.customer-story-card__number {
    position: absolute;
    top: .8rem;
    inset-inline-start: .8rem;
    z-index: 3;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(3, 21, 42, .46);
    font-size: .75rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.customer-story-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    display: grid;
    width: clamp(48px, 4.3vw, 62px);
    height: clamp(48px, 4.3vw, 62px);
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
    transform: translate(-50%, -50%);
    transition: transform .2s ease, background .2s ease;
}

.customer-story-card__play i {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid var(--cs-blue);
}

.customer-story-card__media:hover .customer-story-card__play {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.customer-story-card__placeholder {
    position: absolute;
    right: 0;
    bottom: 1rem;
    left: 0;
    z-index: 3;
    color: rgba(255, 255, 255, .58);
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.customer-story-card__preview.is-loaded ~ .customer-story-card__placeholder {
    display: none;
}

.customer-story-card__content {
    display: flex;
    padding: 1rem .35rem 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.customer-story-card__content h3 {
    width: 100%;
    margin: 0 0 .3rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.65;
    text-align: center !important;
}

.customer-story-card__content p {
    width: 100%;
    margin: 0;
    color: #9eb4cf;
    font-size: .78rem;
    line-height: 1.8;
    text-align: center !important;
}

.customer-story-player[hidden] {
    display: none;
}

.customer-story-player {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: grid;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    padding: 1.25rem;
    place-items: center;
    background: rgba(0, 7, 18, .96);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    overscroll-behavior: none;
    touch-action: none;
}

.customer-story-player:fullscreen {
    background: #000;
}

.customer-story-player__stage {
    display: flex;
    width: min(100%, 520px);
    height: min(88svh, 900px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;
}

.customer-story-player__video {
    display: block;
    width: auto;
    max-width: 100%;
    height: calc(100% - 2.4rem);
    max-height: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    background: #000;
    object-fit: contain;
    touch-action: auto;
}

.customer-story-player__name {
    min-height: 1.5rem;
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.customer-story-player__close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    inset-inline-end: max(1rem, env(safe-area-inset-right));
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

body.customer-story-is-open {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (max-width: 1199.98px) {
    .customer-stories__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

@media (max-width: 575.98px) {
    .customer-stories { padding: 3rem 0; }
    .customer-stories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .customer-story-card__media { border-radius: 15px; }
    .customer-story-card__content { padding-top: .75rem; }
    .customer-story-card__content h3 { font-size: .9rem; }
    .customer-story-card__content p { font-size: .7rem; }
    .customer-story-player { padding: .75rem; }
    .customer-story-player__video { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .customer-story-card__media,
    .customer-story-card__preview,
    .customer-story-card__play { transition: none; }
}
