/* ==================================================================
   Klantervaringen op de homepage (28 september 2026)

   Links een kaart met het gemiddelde en de echte bestelcijfers, rechts een
   strook kaarten die vanzelf opschuift. Eigen klassen (nr-rv-*): de module
   werkt zo zonder Tailwind-bouw, ook op melknl.

   Sterren: één element met vijf tekens, gekleurd met een verloop tot --pct.
   Zo kan een gemiddelde als 4,7 ook echt 94 % goud tonen.
   ================================================================== */
.nr-rv {
    padding-block: 28px 34px;
}

.nr-rv-rij {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.nr-rv-samen,
.nr-rv-kaart {
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 44, 115, .05);
}

/* ---------- kaart links ---------- */
.nr-rv-samen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 16px;
    text-align: center;
}

.nr-rv-kop {
    margin: 0 0 4px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-secondary, #142C73);
}

.nr-rv-cijfer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.nr-rv-cijfer b {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-secondary, #142C73);
    font-variant-numeric: tabular-nums;
}

.nr-rv-cijfer span {
    margin-top: 4px;
    font-size: .8rem;
    color: #6b7280;
}

.nr-rv-oordeel {
    margin: 0;
    font-size: .86rem;
    color: #374151;
}

.nr-rv-oordeel b {
    color: #111827;
}

.nr-rv-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    padding-top: 12px;
    border-top: 1px solid #eef1f5;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.35;
    color: #374151;
    text-align: left;
}

.nr-rv-stat-ico {
    display: inline-flex;
    flex: none;
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--color-primary, #6CBF4A) 12%, #fff);
    color: var(--color-primary-700, #46812F);
}

.nr-rv-stat-ico svg {
    width: 100%;
    height: 100%;
}

.nr-rv-vlaggen {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 2px 0 0;
}

.nr-rv-vlag {
    display: block;
    flex: none;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
}

/* ---------- sterren ---------- */
.nr-rv-sterren {
    --pct: 100%;
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #F2A516 var(--pct), #d7dce4 var(--pct));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nr-rv-sterren::before {
    content: "★★★★★";
}

/* ---------- strook rechts ---------- */
/* De pijlen staan in een eigen strook links en rechts van de kaarten, zodat
   ze nooit over tekst vallen. */
.nr-rv-slider {
    position: relative;
    min-width: 0;
    padding-inline: 26px;
}

.nr-rv-baan {
    display: flex;
    gap: 14px;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 2px;
}

.nr-rv-baan::-webkit-scrollbar {
    display: none;
}

.nr-rv-baan:focus-visible {
    outline: 2px solid var(--color-primary, #6CBF4A);
    outline-offset: 3px;
    border-radius: 14px;
}

.nr-rv-kaart {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 min(262px, 82vw);
    padding: 14px 16px 14px;
    scroll-snap-align: start;
}

.nr-rv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nr-rv-land {
    display: inline-flex;
}

.nr-rv-meta {
    margin: 0;
    font-size: .78rem;
    color: #6b7280;
}

.nr-rv-meta b {
    font-weight: 600;
    color: #374151;
}

.nr-rv-titel {
    margin: 2px 0 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.nr-rv-tekst {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: .9rem;
    line-height: 1.45;
    color: #374151;
}

.nr-rv-tekst.is-open {
    display: block;
    -webkit-line-clamp: unset;
}

.nr-rv-meer {
    align-self: flex-start;
    padding: 0;
    background: none;
    border: 0;
    font-size: .84rem;
    font-weight: 600;
    color: var(--color-info, #006EB8);
    cursor: pointer;
}

.nr-rv-meer:hover,
.nr-rv-meer:focus-visible {
    text-decoration: underline;
    outline: none;
}

.nr-rv-voet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: auto 0 0;
    padding-top: 8px;
    font-size: .78rem;
}

.nr-rv-product {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary, #6CBF4A) 10%, #fff);
    color: var(--color-primary-700, #46812F);
    font-weight: 600;
    text-decoration: none;
}

.nr-rv-product:hover,
.nr-rv-product:focus-visible {
    text-decoration: underline;
    outline: none;
}

.nr-rv-bron {
    color: #9ca3af;
}

/* ---------- pijlen ---------- */
.nr-rv-pijl {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 11px;
    border: 1px solid #e3e7ee;
    border-radius: 50%;
    background: #fff;
    color: var(--color-secondary, #142C73);
    box-shadow: 0 4px 12px rgba(20, 44, 115, .12);
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color .15s ease, color .15s ease;
}

.nr-rv-pijl svg {
    width: 100%;
    height: 100%;
}

.nr-rv-pijl:hover,
.nr-rv-pijl:focus-visible {
    border-color: var(--color-primary, #6CBF4A);
    color: var(--color-primary-700, #46812F);
    outline: none;
}

.nr-rv-pijl--vorige {
    left: 0;
}

.nr-rv-pijl--vorige svg {
    transform: rotate(180deg);
}

.nr-rv-pijl--volgende {
    right: 0;
}

/* ---------- telefoon en tablet ---------- */
@media (max-width: 767.98px) {
    .nr-rv-rij {
        grid-template-columns: minmax(0, 1fr);
    }

    .nr-rv-samen {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas: "kop kop" "cijfer oordeel" "cijfer sterren" "stat stat" "vlag vlag";
        justify-items: start;
        align-items: center;
        gap: 2px 14px;
        text-align: left;
    }

    .nr-rv-kop { grid-area: kop; }
    .nr-rv-cijfer { grid-area: cijfer; }
    .nr-rv-samen > .nr-rv-sterren { grid-area: sterren; }
    .nr-rv-oordeel { grid-area: oordeel; }
    .nr-rv-stat { grid-area: stat; width: 100%; }
    .nr-rv-vlaggen { grid-area: vlag; justify-content: flex-start; }

    .nr-rv-pijl {
        display: none;
    }

    .nr-rv-slider {
        padding-inline: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nr-rv-baan {
        scroll-behavior: auto;
    }
}
