/*
 * Recenziile clientilor: slider infinit (web/views/includes/recenzii_slider.php, miscarea vine din js/recenzii.js).
 * Comun pentru prima pagina (doua randuri), paginile certificarilor (un rand, .hp-rev--certificat)
 * si constructorul de pagini (.hp-rev--constructor: panou rotunjit in coloana; slider sau grila .hp-rev--static).
 * Se incarca dupa css-ul paginii, ca regulile de aici sa castige peste resetari ca `.cp section`.
 */

.hp-rev {
    --hp-navy: #091057;
    --hp-albastru: #376FF7;
    --hp-verde: #80C454;
    --hp-cer: #8FC3FF;
    --hp-cer-text: #C8E1FF;
    --hp-cer-stins: #93A6D8;
    --hp-titluri: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    --hp-ease: cubic-bezier(.2, .7, .2, 1);
}

.hp-rev .hp-verde {
    color: var(--hp-verde);
}

.hp-rev .hp-ico {
    width: 18px;
    height: 18px;
    flex: none;
}

section.hp-rev {
    position: relative;
    padding: 64px 0 104px;
    overflow: hidden;
    background:
        radial-gradient(42% 46% at 50% 58%, rgba(55, 111, 247, .2) 0%, rgba(55, 111, 247, 0) 100%),
        var(--hp-navy);
    color: #fff;
}

.hp-rev h2,
.hp-rev p,
.hp-rev figure,
.hp-rev blockquote {
    margin: 0;
}

.hp-rev h2 {
    font-family: var(--hp-titluri);
    text-wrap: balance;
}

.hp-rev__head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.hp-rev__summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin-top: 20px !important;
    color: var(--hp-cer-text);
    font-size: 1rem;
    line-height: 1.5;
}

.hp-rev__summary strong {
    color: #fff;
    font-family: var(--hp-titluri);
    font-size: 1.1rem;
    font-weight: 800;
    font-variant-numeric: lining-nums tabular-nums;
}

.hp-rev__g {
    width: 20px;
    height: 20px;
    flex: none;
}

.hp-rev__stars {
    display: inline-flex;
    gap: 3px;
}

.hp-rev__stars svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: rgba(143, 195, 255, .22);
}

.hp-rev__stars .is-plin svg {
    fill: var(--hp-verde);
}

.hp-rev__stars--mari svg {
    width: 19px;
    height: 19px;
}

/* randurile: marginile se estompeaza in fundal */
.hp-rev__rows {
    display: grid;
    gap: 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

/* fara JS: fiecare rand se deruleaza orizontal */
.hp-rev__row {
    overflow-x: auto;
    padding: 4px 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.hp-rev__row::-webkit-scrollbar {
    display: none;
}

/* cu JS: banda continua, trasa cu mouse-ul sau degetul */
.hp-rev__row.is-activ {
    overflow: hidden;
    scroll-snap-type: none;
    cursor: grab;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.hp-rev__row.is-trage {
    cursor: grabbing;
}

/* .hp-rev in fata: pe paginile certificarilor, `.cp ul` reseteaza padding-ul listelor */
.hp-rev .hp-rev__track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0 0 0 max(16px, calc((100vw - 1140px) / 2));
    list-style: none;
}

.hp-rev__row.is-activ .hp-rev__track {
    padding-left: 0;
    will-change: transform;
}

.hp-rev__item {
    display: flex;
    flex: none;
    width: 392px;
    padding-right: 22px;
    scroll-snap-align: start;
}

.hp-rev__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    padding: 28px 28px 24px;
    border: 1px solid rgba(143, 195, 255, .14);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .065) 0%, rgba(255, 255, 255, .025) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: border-color .35s ease, background-color .35s ease, transform .45s var(--hp-ease);
}

/* ghilimeaua mare, discreta */
.hp-rev__card::before {
    content: "\201C";
    position: absolute;
    top: 14px;
    right: 24px;
    color: rgba(143, 195, 255, .13);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 96px;
    line-height: 1;
    pointer-events: none;
}

.hp-rev__card:hover {
    border-color: rgba(143, 195, 255, .3);
    background-color: rgba(255, 255, 255, .03);
}

.hp-rev__quote {
    flex: 1 1 auto;
}

.hp-rev__quote p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    color: #E6EDFF;
    font-size: 1rem;
    line-height: 1.65;
}

.hp-rev__who {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-top: 18px;
    border-top: 1px solid rgba(143, 195, 255, .12);
}

.hp-rev__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(160deg, var(--hp-cer) 0%, var(--hp-albastru) 100%);
    box-shadow: 0 0 0 2px rgba(143, 195, 255, .16);
    color: var(--hp-navy);
    font-family: var(--hp-titluri);
    font-size: .9rem;
    font-weight: 800;
}

.hp-rev__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
}

.hp-rev__id {
    min-width: 0;
}

.hp-rev__id .hp-rev__name {
    display: block;
    font-style: normal;
    overflow: hidden;
    color: #fff;
    font-family: var(--hp-titluri);
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-rev__id small {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    margin-top: 2px;
    color: var(--hp-cer-stins);
    font-size: .8rem;
    line-height: 1.4;
}

.hp-rev__id small .hp-rev__g {
    width: 13px;
    height: 13px;
}

.hp-rev__tradus {
    margin-top: -8px !important;
    color: var(--hp-cer-stins);
    font-size: .78rem;
    font-style: italic;
    cursor: help;
}

.hp-rev__foot {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.hp-rev__pause {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px 0 14px;
    border: 1px solid rgba(143, 195, 255, .24);
    border-radius: 999px;
    background: transparent;
    color: var(--hp-cer-text);
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.hp-rev__pause[hidden] {
    display: none;
}

.hp-rev__pause:hover {
    border-color: rgba(143, 195, 255, .45);
    background-color: rgba(255, 255, 255, .06);
    color: #fff;
}

.hp-rev__pause:focus-visible {
    outline: 3px solid var(--hp-cer);
    outline-offset: 3px;
}

.hp-rev__pause .hp-ico {
    width: 16px;
    height: 16px;
}

.hp-rev__pause-ico {
    display: inline-flex;
}

.hp-rev__pause-ico--play,
.hp-rev__pause[aria-pressed="true"] .hp-rev__pause-ico--pauza {
    display: none;
}

.hp-rev__pause[aria-pressed="true"] .hp-rev__pause-ico--play {
    display: inline-flex;
}

@media (max-width: 767.98px) {
    section.hp-rev {
        padding: 48px 0 80px;
    }

    .hp-rev__head {
        margin-bottom: 36px;
    }

    .hp-rev__rows {
        gap: 16px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    }

    .hp-rev__item {
        width: min(84vw, 330px);
        padding-right: 14px;
    }

    .hp-rev__card {
        gap: 16px;
        padding: 22px 22px 20px;
        border-radius: 22px;
    }

    .hp-rev__card::before {
        right: 18px;
        font-size: 80px;
    }

    .hp-rev__quote p {
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-rev * {
        transition: none !important;
    }
}

/* ---------- Pagina unei certificari: un singur rand, lipit de continut (fundalul e acelasi navy) ---------- */

section.hp-rev--certificat {
    padding: 8px 0 88px;
}

.hp-rev--certificat .hp-rev__head {
    margin-bottom: 40px;
}

@media (max-width: 767.98px) {
    section.hp-rev--certificat {
        padding: 0 0 64px;
    }

    .hp-rev--certificat .hp-rev__head {
        margin-bottom: 30px;
    }
}

/* ---------- Constructorul de pagini: panou navy rotunjit, in coloana in care e pus elementul ---------- */

section.hp-rev--constructor {
    margin: 0 0 1.25rem;
    padding: 56px 0 44px;
    border-radius: 32px;
}

section.hp-rev--constructor.hp-rev--static {
    padding-bottom: 56px;
}

.hp-rev--constructor > .container {
    max-width: none;
    padding-left: clamp(16px, 4%, 40px);
    padding-right: clamp(16px, 4%, 40px);
}

.hp-rev--constructor .hp-rev__head {
    margin-bottom: 40px;
}

/* titlul propriu (paginile din constructor nu incarca stilurile .hp-h2 / .cp-h2) */
.hp-rev__title {
    margin: 0;
    color: #fff;
    font-family: var(--hp-titluri);
    font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
}

/* fara JS, banda incepe la marginea panoului, nu a ecranului */
.hp-rev--constructor .hp-rev__track {
    padding-left: 24px;
}

/* ---------- Grila statica: 3 sau 4 pe rand, apoi 2 si 1 dupa latimea coloanei ---------- */

.hp-rev--static > .container:last-child {
    container-type: inline-size;
}

.hp-rev .hp-rev__grid {
    --rev-coloane: 3;
    --rev-spatiu: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--rev-spatiu);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-rev__grid[data-coloane="1"] { --rev-coloane: 1; }
.hp-rev__grid[data-coloane="2"] { --rev-coloane: 2; }
.hp-rev__grid[data-coloane="4"] { --rev-coloane: 4; }

.hp-rev__grid .hp-rev__item {
    flex: 0 0 calc((100% - (var(--rev-coloane) - 1) * var(--rev-spatiu)) / var(--rev-coloane));
    width: auto;
    min-width: 0;
    padding-right: 0;
}

/* in grila textul se vede intreg (nu exista copii de derulat) */
.hp-rev__grid .hp-rev__quote p {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

@container (max-width: 1060px) {
    .hp-rev__grid[data-coloane="4"] { --rev-coloane: 2; }
}

@container (max-width: 860px) {
    .hp-rev__grid[data-coloane="3"] { --rev-coloane: 2; }
}

@container (max-width: 560px) {
    .hp-rev .hp-rev__grid { --rev-coloane: 1; --rev-spatiu: 16px; }
}

@media (max-width: 767.98px) {
    section.hp-rev--constructor {
        padding: 40px 0 32px;
        border-radius: 24px;
    }

    section.hp-rev--constructor.hp-rev--static {
        padding-bottom: 40px;
    }

    .hp-rev--constructor .hp-rev__head {
        margin-bottom: 28px;
    }

    .hp-rev--constructor .hp-rev__track {
        padding-left: 16px;
    }
}
