/**
 * Results Section (homepage) — testimonial swiper + rating widget
 * Figma: Landing Page REVAMP, "Testimonial" 24706:38894 (1440px)
 * Hand-written plain CSS (not part of the Tailwind build) so this
 * section doesn't depend on a Tailwind rebuild.
 */

.results-section {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 42px 0 60px;
}

/* `.container-section-tablet` steps max-width at 1024/1440/1920, leaving
   gaps mid-range. Stretch full width until 1920 takes over. */
@media (min-width: 1024px) and (max-width: 1919px) {
    .results-section .container-section-tablet {
        max-width: 100%;
    }
}

.results-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 4px;
}

.results-title {
    font-family: 'Everfit Denim AllOn', Inter, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    line-height: 1;
    letter-spacing: -0.04em;
    font-size: 24px;
}

.results-rating {
    display: flex;
    align-items: stretch;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.results-rating__score {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #dbfc37;
    padding: 12px;
}

.results-rating__number {
    font-family: 'TWK Everett', Inter, sans-serif;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #000;
    font-size: 32px;
}

.results-rating__stars {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.results-rating__stars img {
    height: 16px;
    width: auto;
}

.results-rating__caption {
    font-family: 'Geist Mono', Inter, sans-serif;
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: #000;
    font-size: 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.results-rating__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 13px;
}

.results-rating__badge--g2 {
    background: #000;
}

.results-rating__badge--capterra {
    background: #454545;
}

.results-rating__badge img {
    height: 21px;
    width: auto;
}

/* ── Cards swiper ─────────────────────────────────────────── */

/* Bleeds past the section's right padding so the next card visibly
   peeks off the edge — matches Figma, where the card track isn't
   clipped to the same bounds as the header/nav (24706:38894). */
.results-swiper {
    width: calc(100% + 20px);
}

.results-card {
    width: 210px;
    height: 281px;
}

.results-card__inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    height: 100%;
    min-height: 281px;
    background: #f6f6f6;
    border-radius: 12px;
    padding: 16px;
}

/* Stat cards alternate gray-fill / white-with-border (24762:49597) */
.results-card--alt .results-card__inner {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.results-card__top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results-card__stat-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.results-card__number {
    display: inline-block;
    width: fit-content;
    background: #dbfc37;
    font-family: 'Everfit Denim AllOn', Inter, sans-serif;
    font-weight: 500;
    line-height: 0.78;
    letter-spacing: -0.05em;
    color: #000;
    font-size: 42px;
    text-box-edge: cap alphabetic;
    text-box-trim: trim-both;
}

.results-card__label {
    font-family: Inter, sans-serif;
    font-weight: 500;
    text-transform: capitalize;
    line-height: 1;
    letter-spacing: -0.05em;
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
}

.results-card__quote {
    font-family: Inter, sans-serif;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.04em;
    color: #000;
    font-size: 14px;
}

.results-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}

.results-card__person {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.results-card__name {
    font-family: Inter, sans-serif;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #000;
    font-size: 12px;
}

.results-card__position {
    font-family: Inter, sans-serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: rgba(0, 0, 0, 0.6);
    font-size: 10px;
}

.results-card__avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.results-card--video {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

/* Frosted bottom scrim behind the quote/name — separate from the click
   overlay so the blur only affects the lower band. Fixed 197px, not a
   percentage of card height: confirmed identical (197px) on both the
   385px-tall 768 card (24762:49640) and the 494px-tall 1440 card
   (24711:116110) — the height doesn't scale with the card. */
.results-card--video::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.4) 100%);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
}

/* Playing: scrim + gradient step aside so the video plays unobstructed */
.results-card--video.is-playing::before {
    opacity: 0;
}

.results-card__video {
    width: 100%;
    height: 100%;
    min-height: 281px;
    object-fit: cover;
    display: block;
}

.results-card__video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 16px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.results-card__video-text {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
    transition: gap 0.35s ease;
}

.results-card__video-quote {
    font-family: Inter, sans-serif;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-indent: -0.45em;
    color: #fff;
    font-size: 14px;
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
}

/* Hover: quote dims slightly, play button brightens */
.results-card__video-overlay:hover .results-card__video-quote {
    opacity: 0.5;
}

/* Playing: quote fades + collapses gently, name stays, icon swaps to pause */
.results-card--video.is-playing .results-card__video-quote {
    opacity: 0;
    max-height: 0;
}

.results-card--video.is-playing .results-card__video-text {
    gap: 0;
}

.results-card__video-name {
    font-family: Inter, sans-serif;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.results-card__play-btn {
    position: relative;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.results-card__play-icon,
.results-card__pause-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.results-card__pause-icon {
    display: none;
}

.results-card--video.is-playing .results-card__play-icon {
    display: none;
}

.results-card--video.is-playing .results-card__pause-icon {
    display: block;
}

.results-card__play-icon-bg,
.results-card__play-icon-glyph {
    transition: fill-opacity 0.2s ease;
}

.results-card__video-overlay:hover .results-card__play-icon-bg {
    fill-opacity: 0.4;
}

.results-card__video-overlay:hover .results-card__play-icon-glyph {
    fill-opacity: 1;
}

/* ── Nav arrows ───────────────────────────────────────────── */

.results-nav {
    display: none;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.results-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(6px);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.results-nav-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.results-nav-btn img {
    width: 9px;
    height: 12px;
}

.results-nav-btn.results-nav--prev img {
    transform: rotate(180deg);
}

.results-nav-btn.results-nav--disabled,
.results-nav-btn[disabled] {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ── Breakpoints ──────────────────────────────────────────── */

/* Bleed matches the container's own padding at each tier (px-5 sm:px-12
   lg:px-[67px] 2xl:px-[80px] 4xl:px-[120px]) — independent of the
   card/header size changes below, which follow the "Testimonial" frame
   specs at 375/768/1024/1920 (24762:50217 / :49597 / :50550 / 24711:95915). */
@media (min-width: 640px) {
    .results-swiper {
        width: calc(100% + 48px);
    }
}

@media (min-width: 768px) {
    .results-header {
        margin-bottom: 40px;
    }

    .results-title {
        font-size: 40px;
    }

    .results-rating__score {
        gap: 10px;
        padding: 14px 20px;
    }

    .results-rating__number {
        font-size: 38px;
    }

    .results-rating__stars img {
        height: 18px;
    }

    .results-rating__badge {
        align-items: center;
        justify-content: flex-start;
        padding: 16px;
    }

    .results-rating__badge img {
        height: 25px;
    }

    .results-card {
        width: 288px;
        height: 385px;
    }

    .results-card__inner {
        min-height: 385px;
        padding: 24px;
    }

    .results-card__top {
        gap: 30px;
    }

    .results-card__number {
        font-size: 64px;
        letter-spacing: -3.2px;
    }

    .results-card__label {
        font-size: 16px;
    }

    .results-card__quote {
        font-size: 16px;
    }

    .results-card__footer {
        align-items: flex-start;
    }

    .results-card__name {
        font-size: 16px;
    }

    .results-card__position {
        font-size: 13px;
    }

    .results-card__avatar {
        width: 52px;
        height: 52px;
    }

    .results-card__video {
        min-height: 385px;
    }

    .results-card__video-overlay {
        padding: 24px;
    }

    .results-card__video-quote {
        font-size: 16px;
    }

    .results-card__play-btn {
        width: 32px;
        height: 32px;
    }

    .results-header {
        padding: 0;
    }

    .results-section {
        padding: 40px 0 0;
    }
}

/* Header switches to a row here, which — at only 1024px — leaves less
   room next to it, so the title and rating widget briefly shrink back
   down before growing again at 1440px (24762:50550's own spec, not a
   rounding artifact). */
@media (min-width: 1024px) {
    .results-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

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

    .results-rating__score {
        gap: 8px;
        padding: 12px;
    }

    .results-rating__number {
        font-size: 32px;
    }

    .results-rating__stars img {
        height: 16px;
    }

    .results-rating__badge {
        align-items: center;
        justify-content: center;
        padding: 16px 13px;
    }

    .results-rating__badge img {
        height: 21px;
    }

    .results-swiper {
        width: calc(100% + 67px);
    }

    .results-section {
        padding: 90px 0 0;
    }

    .results-header {
        margin-bottom: 50px;
    }
}

@media (min-width: 1440px) {
    .results-section {
        padding: 150px 0 0;
    }

    .results-header {
        margin-bottom: 50px;
    }

    .results-title {
        font-size: 50px;
        letter-spacing: -2px;
    }

    .results-rating__score {
        gap: 10px;
        padding: 14px 20px;
        background: #d5f71e;
    }

    .results-rating__number {
        font-size: 38px;
    }

    .results-rating__stars img {
        height: 18px;
    }

    .results-rating__badge {
        align-items: flex-end;
        justify-content: flex-start;
        padding: 16px;
    }

    .results-rating__badge img {
        height: 25px;
    }

    .results-swiper {
        width: calc(100% + 80px);
    }

    .results-card {
        width: 370px;
        height: 494px;
    }

    .results-card__inner {
        min-height: 494px;
    }

    .results-card__number {
        font-size: 88px;
        letter-spacing: -4.4px;
    }

    .results-card__quote {
        font-size: 20px;
        letter-spacing: -0.8px;
    }

    .results-card__position {
        font-size: 16px;
    }

    .results-card__avatar {
        width: 60px;
        height: 60px;
    }

    .results-card__video {
        min-height: 494px;
    }

    .results-card__video-quote {
        font-size: 20px;
        letter-spacing: -0.8px;
    }

    .results-nav {
        display: flex;
    }

    .results-nav {
        margin-top: 40px;
    }

    .results-card--video::before {
        height: 197px;
    }
}

@media (min-width: 1920px) {

    .results-section {
        padding: 120px 0 0;
    }

    .results-swiper {
        width: calc(100% + 120px);
    }

    .results-card {
        width: 412px;
        height: 550px;
    }

    .results-card__inner {
        min-height: 550px;
    }

    .results-card__video {
        min-height: 550px;
    }

    .results-nav {
        margin-top: 50px;
    }
}
