/* CD Recensioni: carousel with CSS scroll-snap. Works without JS (plain horizontal scroll). */
.cd-rec {
    --cd-rec-verde: #297F67;
    --cd-rec-bordeaux: #864549;
    --cd-rec-gap: 40px;
    --cd-rec-per-vista: 1;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--font-testo, 'Barlow', sans-serif);
}
.cd-rec__vista { position: relative; }
.cd-rec__lista {
    display: flex;
    gap: var(--cd-rec-gap);
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.cd-rec__lista:focus-visible { outline: 3px solid var(--cd-rec-bordeaux); outline-offset: 4px; }
.cd-rec--js .cd-rec__lista { scrollbar-width: none; }
.cd-rec--js .cd-rec__lista::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .cd-rec__lista { scroll-behavior: smooth; }
}

.cd-rec__scheda {
    flex: 0 0 calc((100% - (var(--cd-rec-per-vista) - 1) * var(--cd-rec-gap)) / var(--cd-rec-per-vista));
    scroll-snap-align: start;
    box-sizing: border-box;
    min-height: 470px;
    padding: 30px 25px;
    background: var(--cd-rec-verde);
    color: #fff;   /* 4.85:1 on #297F67; with transparency it falls below 4.5 */
    text-align: center;
}
@media (min-width: 640px) { .cd-rec { --cd-rec-per-vista: 2; } }
@media (min-width: 960px) { .cd-rec { --cd-rec-per-vista: 4; } }
@media (max-width: 959px) { .cd-rec { --cd-rec-gap: 20px; } }

.cd-rec__avatar {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, .2);
}
.cd-rec__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cd-rec__avatar--iniziale {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-titoli, 'Libre Bodoni', serif);
    font-size: 48px;
    line-height: 1;
}

.cd-rec__nome {
    margin: 20px 0 0;
    font-family: var(--font-titoli, 'Libre Bodoni', serif);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
    color: #fff;
}
.cd-rec__nome a { color: inherit; text-decoration: none; }
.cd-rec__nome a:hover, .cd-rec__nome a:focus-visible { text-decoration: underline; }
/* 80% white (not 60%): small text must keep AA contrast on the green */
.cd-rec__data { margin: 20px 0 0; font-size: 13px; line-height: 1.4; color: #fff; }   /* full white: 4.85:1 on the green, any transparency falls below AA */
.cd-rec__stelle { display: block; margin-top: 20px; font-size: 25px; line-height: 1; letter-spacing: 3px; font-family: Times, serif; }
.cd-rec__stelle-piene { color: #FFC700; }
.cd-rec__stelle-vuote { color: #e5e5e5; }
.cd-rec__testo { margin: 20px 0 0; font-size: 15px; line-height: 1.75; color: #fff; }
.cd-rec__testo a { color: #fff; text-decoration: underline; }
.cd-rec__tradotta { font-size: 13px; color: #fff; }

/* Prev/next: only when JS is on */
.cd-rec__prec, .cd-rec__succ {
    display: none;
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 35px;
    height: 35px;
    margin-top: -17px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--cd-rec-bordeaux);
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.cd-rec--js .cd-rec__prec, .cd-rec--js .cd-rec__succ { display: flex; }
.cd-rec__prec { left: 0; }
.cd-rec__succ { right: 0; }
.cd-rec__prec svg, .cd-rec__succ svg { width: 12px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.cd-rec__prec:disabled, .cd-rec__succ:disabled { opacity: .4; cursor: default; }
.cd-rec__prec:focus-visible, .cd-rec__succ:focus-visible, .cd-rec__punto:focus-visible { outline: 3px solid #1d1d1d; outline-offset: 2px; }
@media (min-width: 1300px) {
    .cd-rec__prec { left: -45px; }
    .cd-rec__succ { right: -45px; }
}

.cd-rec__punti { display: flex; justify-content: center; gap: 10px; margin: 25px 0 0; padding: 0; list-style: none; }
.cd-rec__punto {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
}
.cd-rec__punto[aria-current="true"] { background: var(--cd-rec-bordeaux); }

.cd-rec__avviso { margin: 20px 0 0; text-align: center; font-size: 13px; line-height: 1.5; color: #5A5150; }
.cd-rec__google { color: #5A5150; text-decoration: none; }
a.cd-rec__google:hover, a.cd-rec__google:focus-visible { text-decoration: underline; }
