/* konténer longhand */
.testimony {
    container-type: inline-size;
    container-name: testimony;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 81px;
    font-family: "Plus Jakarta Sans";
    padding: 34px 24px 128px;
}

/* háttér dísz */
.testimony-isolation {
    position: absolute;
    top: 756px;
    right: -144px;
    width: min(680px, 100% + 288px);
    max-width: 680px;
    height: 511px;
    pointer-events: none;
    user-select: none;
}

/* címek */
.testimony-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
.testimony-title {
    color: var(--primary);
    font-size: 58px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.3;
}
.testimony-subtitle {
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
}

/* sor */
.testimony-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.testimony-col {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* egyetlen rács 6 kártyának */
.testimony-client {
    width: 100%;
    max-width: 1581px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

/* kártya (egységes) */
.card-testi {
    box-shadow: 0 4px 35px rgba(0, 0, 0, 0.09);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.91);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    overflow: visible; /* ne vágjon */
}

/* kártyafej */
.card-testi-head {
    display: flex;
    align-items: center;
    gap: 16px;
}
.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #c4c4c4;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.who {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.name {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.15;
    color: #000;
}
.name-underline {
    height: 16px;
    width: auto;
}

/* szöveg */
.text {
    color: #000;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
}

/* nyíl ikon */
.testimony-arrow-chevron {
    width: 114px;
    height: 114px;
    flex-shrink: 0;
}

/* reszponzív oszlopszám */
@media (max-width: 1500px) {
    .testimony-client {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 1024px) {
    .testimony-client {
        grid-template-columns: 1fr;
    }
}
/* 1) A szekció ne engedjen vízszintes kilógást */
.testimony {
    overflow-x: hidden; /* fallback */
    overflow-x: clip; /* modern */
}

/* 2) A sor törhessen, és a rács legyen középre zárva */
.testimony-row {
    position: relative; /* az abszolút nyílhoz kell */
    flex-wrap: wrap;
}

.testimony-col {
    width: 100%;
    max-width: 1581px;
    margin-inline: auto; /* középre */
}

/* 3) A nyíl ne vegyen részt a flex layoutban (ne szélesítsen) */
.testimony-arrow-chevron {
    position: absolute;
    inset-inline-end: -8px; /* kissé “kilógó” hatás, de már nem scrolloz */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* 4) (opcionális) kicsi kijelzőn a nyilat rejtsük el / zsugorítsuk */
@media (max-width: 1024px) {
    .testimony-arrow-chevron {
        display: none;
    }
}

/* 5) (opcionális) a dísz-SVG ne lógjon túl “mérhetetlenül” */
.testimony-isolation {
    right: 0; /* negatív right helyett */
    width: clamp(420px, 35vw, 680px);
}
@media (max-width: 900px) {
    .avatar img {
        height: auto;
    }
}
