/* TESTIMONIALS — section #5 (after About)
   Figma: 1726 × 1177, two rows:
   - TOP: 3 video story cards (left) + title block (right)
   - BOTTOM: 4 Google review cards (gray bg) */

.testimonials {
    width: 100%;
    background: #fff;
    padding: 60px 24px 80px;
    overflow: hidden;
}

.testimonials__inner {
    max-width: 1380px;                       /* SAME as About/Services/Press for consistent right edge */
    margin: 0 auto;
}

/* ===== Top row: 3 video stories (left) + title block (right) =====
   In RTL natural flex, DOM 1 (intro) → RIGHT, DOM 2 (stories) → LEFT.
   Videos block has fixed-width cards + overflow:hidden — the 3rd (leftmost
   visual) card gets clipped at ~30% per user request. */
.testimonials__top {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 60px;
    min-width: 0;                            /* allow flex children to shrink/clip */
}

.testimonials__intro {
    flex: 0 0 380px;                         /* fixed width on RIGHT side */
    text-align: right;
}
.testimonials__tag {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.2;
    color: #1d1d1b;
    margin: 0 0 20px;
}
.testimonials__title {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 42px;
    line-height: 52px;
    color: var(--c-blk);
    margin: 0 0 40px;
}
.testimonials__social {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
    direction: rtl;
}
.testimonials__avatars {
    display: flex;
    flex-direction: row-reverse;            /* overlap left-to-right */
}
.testimonials__avatars img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    margin-right: -14px;                    /* overlap */
    display: block;
}
.testimonials__avatars img:first-child {
    margin-right: 0;
}
.testimonials__social-text {
    font-family: var(--ff-he);
    font-size: 23px;
    color: #1d1d1b;
}
.testimonials__social-text strong {
    font-weight: 900;
}
.testimonials__nav {
    display: flex;
    gap: 12px;
}
.testimonials__nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: 0;                              /* no border per user feedback */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s var(--ease);
    opacity: 0.85;
}
.testimonials__nav-btn:hover {
    opacity: 1;
}
.testimonials__nav-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* Arrow directions (per user feedback):
   - LEFT button (visually) → LEFT-pointing arrow (scaleX(-1))
   - RIGHT button (visually) → RIGHT-pointing arrow (natural)
   In RTL flex, DOM 1 (.--prev) → RIGHT visual, DOM 2 (.--next) → LEFT visual */
.testimonials__nav-btn--prev img {
    transform: none;                /* RIGHT button: natural right-pointing arrow */
}
.testimonials__nav-btn--next img {
    transform: scaleX(-1);          /* LEFT button: mirrored left-pointing arrow */
}

.testimonials__stories-wrap {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
}
.testimonials__stories {
    width: 100%;
    overflow: hidden;                       /* clip 3rd (leftmost) video card on desktop */
    display: flex;
    gap: 22px;
    align-items: center;
}
.testimonials__stories-nav {
    display: none;                          /* hidden on desktop, shown on mobile */
}
.testimonials__story {
    flex: 0 0 320px;                        /* fixed width — don't shrink to fit */
    width: 320px;
    text-align: center;
}
.testimonials__story:first-child {
    flex: 0 0 353px;
    width: 353px;
}
.testimonials__story-card {
    position: relative;
    width: 100%;
    aspect-ratio: 320 / 559;
    border-radius: 18px;
    overflow: hidden;
    background: #1d1d1b;
    cursor: pointer;
    margin-bottom: 16px;
}
.testimonials__story:first-child .testimonials__story-card {
    aspect-ratio: 353 / 623;
}
.testimonials__story-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}
.testimonials__story-card:hover .testimonials__story-img {
    transform: scale(1.05);
}
.testimonials__story-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    z-index: 2;
    pointer-events: none;
}
.testimonials__story:first-child .testimonials__story-play {
    width: 114px;
    height: 114px;
}
.testimonials__story-caption {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 18px;
    color: #1d1d1b;
    margin: 0;
}

/* ===== Bottom row: 4 review cards ===== */
.testimonials__reviews-wrap {
    max-width: 1380px;                      /* cap reviews width — don't span full 1726 */
    margin: 0 auto;
    position: relative;
    padding: 0 70px;                        /* room for nav arrows on outsides */
}

.testimonials__reviews {
    display: flex;
    gap: 22px;
    /* No row-reverse — natural RTL order, DOM 1 → RIGHT */
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.testimonials__review {
    flex: 1 1 0;
    min-width: 0;                           /* allow shrink, prevent overflow of last card */
    max-width: 305px;
    background: #f6f6f6;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    text-align: right;
    direction: rtl;
    border-radius: 4px;
}
.testimonials__review-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.testimonials__review-quote {
    width: 24px;
    height: 24px;
}
.testimonials__review-google {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
}
.testimonials__review-stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
    margin-bottom: 16px;
}
.testimonials__review-stars img {
    width: 22px;
    height: 22px;
}
.testimonials__review-text {
    font-family: var(--ff-he);
    font-weight: 400;
    font-size: 17px;
    line-height: 28px;
    color: #1d1d1b;
    margin: 0 0 auto;
    flex: 1 1 auto;
}
.testimonials__review-name {
    font-family: var(--ff-he);
    font-weight: 700;
    font-size: 20px;
    color: #1d1d1b;
    margin: 24px 0 0;
    text-align: right;
}

/* Review nav arrows (chevrons at edges) */
.testimonials__reviews-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonials__reviews-nav img {
    width: 100%;
    height: 100%;
}
.testimonials__reviews-nav--prev {
    right: -40px;
}
.testimonials__reviews-nav--next {
    left: -40px;
}
.testimonials__reviews-nav--next img {
    transform: scaleX(-1);
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .testimonials {
        padding: 40px 16px 50px;
    }
    .testimonials__top {
        flex-direction: column;
        gap: 24px;
        margin-bottom: 40px;
    }
    .testimonials__intro {
        flex: none;
        padding-top: 0;
        text-align: center;
    }
    .testimonials__title {
        font-size: 24px;
        line-height: 30px;
        margin: 0 0 20px;
    }
    .testimonials__tag {
        font-size: 16px;
        margin: 0 0 12px;
    }
    .testimonials__social {
        justify-content: center;
        margin-bottom: 20px;
    }
    .testimonials__social-text {
        font-size: 16px;
    }
    .testimonials__nav {
        justify-content: center;
    }
    /* ===== Videos slider mobile (peek-style with arrows ON the slider) =====
       Main card centered, ~20% of prev/next visible on each side.
       Card width ~250px → side padding ~62px shows neighbor edge. */
    .testimonials__stories-wrap {
        position: relative !important;
        width: 100% !important;
        flex: 0 0 auto !important;
        overflow: visible !important;        /* override desktop overflow:hidden which hides children */
    }
    .testimonials__stories {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        display: flex !important;
        gap: 14px !important;
        padding: 0 62px 8px !important;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 62px;
        -webkit-overflow-scrolling: touch;
        align-items: stretch !important;
        scrollbar-width: none;
    }
    .testimonials__stories::-webkit-scrollbar {
        display: none;
    }
    .testimonials__story {
        flex: 0 0 250px !important;
        width: 250px !important;
        scroll-snap-align: center;
    }
    .testimonials__story:first-child {
        flex: 0 0 250px !important;
        width: 250px !important;
    }
    .testimonials__story-card,
    .testimonials__story:first-child .testimonials__story-card {
        aspect-ratio: 250 / 440;
    }
    .testimonials__story-play,
    .testimonials__story:first-child .testimonials__story-play {
        width: 64px;
        height: 64px;
    }
    .testimonials__story-caption {
        font-size: 14px;
        line-height: 1.4;
    }
    /* Arrows ON the videos slider (mobile only) */
    .testimonials__stories-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
        border: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        z-index: 4;
        cursor: pointer;
        color: var(--c-gold-flat);
        padding: 0;
    }
    .testimonials__stories-nav--prev {
        right: 16px;
    }
    .testimonials__stories-nav--next {
        left: 16px;
    }
    .testimonials__stories-nav svg {
        width: 18px;
        height: 18px;
    }
    .testimonials__stories-nav--next svg {
        transform: scaleX(-1);
    }
    /* Hide the intro nav block on mobile (arrows moved to slider) */
    .testimonials__nav {
        display: none !important;
    }

    /* ===== Reviews mobile — show ONLY 1 card, FULL width, NO peek of neighbors ===== */
    .testimonials__reviews-wrap {
        position: relative;
        max-width: 100%;
        padding: 0 !important;
        overflow: hidden;                   /* clip neighbors completely — no peek */
    }
    .testimonials__reviews {
        overflow-x: auto;
        gap: 0;
        padding: 0 !important;
        scroll-snap-type: x mandatory;
        scroll-padding: 0;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        width: 100%;
        scrollbar-width: none;
    }
    .testimonials__reviews::-webkit-scrollbar {
        display: none;
    }
    .testimonials__review {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        scroll-snap-align: start;
        margin: 0;
    }
    /* Show the reviews nav arrows ON the slider (mobile) */
    .testimonials__reviews-nav {
        display: flex !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
        z-index: 4;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .testimonials__reviews-nav--prev {
        right: 4px;
        left: auto;
    }
    .testimonials__reviews-nav--next {
        left: 4px;
        right: auto;
    }
    .testimonials__reviews-nav img {
        width: 22px;
        height: 22px;
    }
}
