/* ==========================================================================
   estia/reviews — style.css
   Carousel responsivo 12 recensioni. Scope-isolated sotto .estia-reviews.
   Adattato da nuova_home/reviews.css per matchare render.php markup.
   ========================================================================== */

.estia-reviews {
    --rv-gold: #f5be42;
    --rv-gold-hover: #e9ad2e;
    --rv-ink: #1a1a1a;
    --rv-text: #2b2b2b;
    --rv-muted: #6b6b6b;
    --rv-card-bg: #ffffff;
    --rv-card-shadow: none;
    --rv-card-shadow-hover: 0 2px 6px rgba(15, 25, 50, .04), 0 10px 20px rgba(15, 25, 50, .06);
    --rv-radius: 14px;

    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    color: var(--rv-ink);
    background: #f5f3ee;
    padding: clamp(32px, 4vw, 56px) clamp(24px, 4vw, 72px) clamp(64px, 8vw, 112px);
}

.estia-reviews *,
.estia-reviews *::before,
.estia-reviews *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.estia-reviews .reviews-section__header {
    max-width: 1680px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.estia-reviews .reviews-eyebrow {
    display: inline-block;
    color: var(--rv-gold);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.8px;
    margin: 0 0 14px;
}

.estia-reviews .reviews-section__header h2 {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(30px, 3.2vw, 48px);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--rv-ink);
    text-wrap: balance;
    margin: 0;
}

/* ---------- Carousel wrapper ---------- */
.estia-reviews .reviews-carousel {
    max-width: 1680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- Arrow buttons ---------- */
.estia-reviews .reviews-arrow {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .08);
    color: var(--rv-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 2px 6px rgba(15, 25, 50, .04);
}

.estia-reviews .reviews-arrow:hover {
    background: var(--rv-gold);
    border-color: var(--rv-gold);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(245, 190, 66, .35);
}

.estia-reviews .reviews-arrow:active { transform: translateY(0); }

.estia-reviews .reviews-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- Viewport (overflow clip) + Track (translates inside) ----------
   Pattern critico: il track viene traslato con transform translateX. Se il
   track ha overflow:hidden DIRETTAMENTE, il clip-rect si muove con la
   trasformazione e i contenuti finiscono fuori viewport (vedi bug "card
   visibili poi spazio vuoto"). Il viewport wrapper invece resta fermo e
   clippa correttamente il track translato al suo interno. */
.estia-reviews .reviews-viewport {
    flex: 1 1 0;
    overflow: hidden;
    padding: 8px 6px 32px;
}

.estia-reviews .reviews-track {
    display: flex;
    gap: 22px;
    transition: transform .55s cubic-bezier(.22, .8, .2, 1);
    will-change: transform;
}

/* ---------- Card ---------- */
.estia-reviews .reviews-card {
    flex: 0 0 calc((100% - 66px) / 4); /* 4 visible on desktop, 3 gaps @ 22px */
    background: var(--rv-card-bg);
    border-radius: var(--rv-radius);
    padding: 28px 26px 26px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: var(--rv-card-shadow);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
    min-height: 320px;
}

.estia-reviews .reviews-card:hover {
    box-shadow: var(--rv-card-shadow-hover);
    transform: translateY(-3px);
}

/* ---------- Card head: quote + name ---------- */
.estia-reviews .reviews-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.estia-reviews .reviews-card__quote {
    color: var(--rv-gold);
    flex-shrink: 0;
    line-height: 0;
}

.estia-reviews .reviews-card__quote svg {
    width: 32px;
    height: 26px;
    display: block;
}

.estia-reviews .reviews-card__name {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--rv-ink);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* ---------- Card body text ---------- */
.estia-reviews .reviews-card__body {
    color: var(--rv-text);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 20px;
    flex-grow: 1;
    text-wrap: pretty;
}

/* ---------- Footer: source + stars ---------- */
.estia-reviews .reviews-card__footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.estia-reviews .reviews-card__source {
    color: var(--rv-muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.estia-reviews .reviews-card__source b {
    font-weight: 700;
    color: var(--rv-text);
}

/* ---------- Stars (gold tile + white star glyph) ---------- */
.estia-reviews .reviews-stars {
    display: inline-flex;
    gap: 4px;
}

.estia-reviews .reviews-star {
    width: 30px;
    height: 30px;
    background: var(--rv-gold);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.estia-reviews .reviews-star.is-empty {
    background: #e9e6de;
}

.estia-reviews .reviews-star svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ---------- Dots ---------- */
.estia-reviews .reviews-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    max-width: 1680px;
    margin-left: auto;
    margin-right: auto;
}

.estia-reviews .reviews-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .15);
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background .2s ease, width .3s ease;
}

.estia-reviews .reviews-dot.is-active {
    background: var(--rv-gold);
    width: 28px;
    border-radius: 4px;
}

.estia-reviews .reviews-dot:hover:not(.is-active) { background: rgba(0, 0, 0, .3); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .estia-reviews .reviews-card { flex-basis: calc((100% - 44px) / 3); } /* 3 visible */
}

@media (max-width: 900px) {
    .estia-reviews .reviews-card { flex-basis: calc((100% - 22px) / 2); } /* 2 visible */
}

@media (max-width: 600px) {
    .estia-reviews .reviews-card { flex-basis: 85%; min-height: 280px; }
    .estia-reviews .reviews-arrow { display: none; }
    .estia-reviews .reviews-viewport { padding-left: 0; padding-right: 0; }
    .estia-reviews .reviews-track { margin: 0; }
}
