/* ═══════════════════════════════════════════════════════════════
   testimonials.css — Testimonials Section
   ═══════════════════════════════════════════════════════════════ */

.testimonials-section {
    padding: clamp(3rem, 2vw, 6rem) 0;
    background-color: var(--color-dark-bg);
    background-image: url("../assets/service-section/service-section-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* ── GSAP Pin Spacer ── */
/* Added to fill the extra space during horizontal scroll pinning */
.pin-spacer {
    background-color: var(--color-bg-section);
}

/* Low-poly polygon background */
.testimonials-section .poly-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    width: 100%;
    height: 100%;
}

/* ── Body wrapper ── */
.testimonials-body {
    position: relative;
    z-index: var(--z-normal);
    max-width: 1400px;
    margin: 0 auto 0 8%;
    padding-right: 0;
}

/* ── Top row: label + heading ── */
.testimonials-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: flex-start;
    gap: 10%;
    margin-bottom: 2.5rem;
}

.testimonials-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testimonials-label img {
    width: 28px;
    filter: brightness(0) invert(1);
}

.testimonials-label span {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: var(--label-span-font-size);
    font-weight: var(--label-span-font-weight);
    letter-spacing: var(--label-span-letter-spacing);
    text-transform: uppercase;
}

.testimonials-heading {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.15;
    text-align: left;
    margin: 0 auto;
    max-width: 700px;
}

/* ── Bottom grid: sidebar + cards ── */
.testimonials-grid {
    position: relative;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    align-items: stretch;
    padding-top: var(--space-md);
}

.testimonials-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: calc(-50vw + 40%);
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* ── Left sidebar ── */
.testimonials-sidebar {
    padding-top: 2.5rem;
    flex-shrink: 0;
}

/* Rating */
.testi-rating-score {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 34px;
    color: var(--color-white);
    line-height: 1;
}

.testi-stars {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.testi-stars img {
    width: 20px;
    height: 20px;
}

.testi-reviews-count {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 20px;
    color: var(--color-white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8rem;
}

/* ── Platform badges ── */
.testi-platforms {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.testi-platforms .testi-badge {
    width: 130px;
}

.testi-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    width: fit-content;
    box-sizing: border-box;
    text-decoration: none;
}

.testi-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Upwork */
.testi-badge.upwork {
    color: var(--color-upwork-green);
    border: 1.5px solid var(--color-upwork-green);
    background: transparent;
}

.testi-badge.upwork:hover {
    background: rgba(34, 197, 94, 0.08);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

/* Contra */
.testi-badge.contra {
    font-size: 1.1rem;
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    background: transparent;
}

.testi-badge.contra img {
    filter: brightness(0) invert(1);
}

.testi-badge.contra:hover {
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.06);
}

/* ── Right: swiper track ── */
.testimonials-right {
    overflow: hidden;
}

.testimonials-track-wrap {
    overflow: hidden;
    width: calc(100% + (50vw - 50%));
    margin-right: calc(-50vw + 50%);
}

.swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* ── Single card ── */
.testi-card {
    background: transparent;
    border: none;
    border-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding: 2.5rem;
    width: 470px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.testi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.testi-card-stars {
    display: flex;
    gap: 3px;
}

.testi-card-stars img {
    width: 20px;
    height: 20px;
}

.testi-quote-img {
    margin: 8px 0 10px;
}

.testi-quote-img img {
    width: 26px;
    height: 26px;
    opacity: 0.8;
}

.testi-card-text {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 18px;
    line-height: 170%;
    letter-spacing: 1%;

    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.testi-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.testi-reviewer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testi-reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-primary-hover);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-white);
    overflow: hidden;
}

.testi-reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.testi-reviewer-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 5%;

    margin-bottom: 4px;
}

.testi-reviewer-location {
    font-family: var(--font-inter);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1%;
    color: rgba(255, 255, 255, 0.45);
}

.testi-play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.testi-play-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.testi-play-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--color-white);
    margin-left: 2px;
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer; /* Lets user know they can click to close */
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    z-index: 10000;
}

.close-video-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.video-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ════════════════════════════════
   RESPONSIVE — consolidated
════════════════════════════════ */

/* ── Large tablets / small laptops (≤ 1240px) ── */
@media (max-width: 1240px) {
    .testimonials-body {
        margin: 0 auto;
        padding: 0 2.5rem;
    }

    .testimonials-heading {
        text-align: left;
        margin: 0 auto;
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .testimonials-top-row {
        gap: 35%;
        grid-template-columns: 220px 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 220px 1fr;
    }

    .testi-card {
        width: 320px;
    }
}

/* ── Tablets (≤ 1024px): stack layout ── */
@media (max-width: 1024px) {
    .testimonials-body {
        padding: 0 var(--space-xl);
    }

    .testimonials-label {
        justify-content: center;
    }

    .testimonials-heading {
        text-align: center;
        margin: 0 auto;
        font-size: clamp(1.4rem, 5vw, 3rem);
    }

    .testimonials-top-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    /* Sidebar becomes centered stack */
    .testimonials-sidebar {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: var(--space-lg);
        gap: 0.3rem;
    }

    .testi-reviews-count {
        align-self: center;
        margin-bottom: 1.2rem;
    }

    .testi-platforms {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: var(--space-md);
        margin-top: var(--space-sm);
    }

    .testimonials-track-wrap {
        width: 100vw;
        margin-left: calc(-1 * var(--space-xl));
        padding-left: var(--space-xl);
        overflow: visible;
    }

    .testi-card {
        width: 300px;
        padding: var(--space-xl) 1.8rem;
    }

    .testi-card-header .testi-badge.upwork,
    .testi-card-header .testi-badge.contra {
        padding: var(--space-sm);
        font-size: 1rem;
    }

    .testi-card-header .testi-badge {
        border-radius: 50%;
    }

    .testi-card-header .testi-badge.upwork span,
    .testi-card-header .testi-badge.contra span {
        display: none;
    }

    .testi-card-header .testi-badge img {
        width: 1.3rem;
        height: 1.3rem;
    }

    .testimonials-grid::before {
        right: 0;
    }

    .testi-stars {
        margin-top: 5px;
        margin-bottom: 5px;
    }
}

/* ── Small tablets (≤ 768px) ── */
@media (max-width: 768px) {
    .testimonials-body {
        padding: 0 var(--space-lg);
    }

    .testimonials-track-wrap {
        margin-left: calc(-1 * var(--space-lg));
        padding-left: var(--space-lg);
    }

    .testi-card {
        width: 320px;
        padding: 1.75rem var(--space-lg);
    }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .testimonials-body {
        padding: 0 1.25rem;
    }

    .testimonials-heading {
        font-size: clamp(1.3rem, 6.5vw, 1.7rem);
        letter-spacing: 1px;
    }

    .testimonials-label span {
        font-size: 18px;
    }

    .testi-badge {
        padding: 0.55rem;
        font-size: 0.9rem;
    }

    .testimonials-track-wrap {
        margin-left: -1.25rem;
        padding-left: 1.25rem;
    }

    .testi-card {
        width: 295px;
        padding: var(--space-lg) 1.25rem;
    }

    .testi-card-text {
        font-size: 0.9rem;
        -webkit-line-clamp: 5;
        line-clamp: 5;
    }

    .testi-reviewer-name {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
    }
}

/* ── Very small mobile (≤ 360px) ── */
@media (max-width: 360px) {
    .testimonials-heading {
        font-size: 1.2rem;
    }

    .testi-card {
        width: 305px;
        padding: 1.25rem var(--space-md);
    }

    .testi-badge {
        padding: 0.6rem 0.7rem;
    }
}
