
.ilmi-reviews-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    color: #1b1d29;
}

.ilmi-reviews-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
}

.ilmi-reviews-subtitle {
    font-size: 15px;
    color: #6f7285;
    margin-bottom: 26px;
}

/* ===== STACK ===== */

.review-stack {
    margin-left: -16px !important;
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    height: 260px;               /* фикс высота под 3 карты */
    cursor: pointer;
}

/* один слой в стопке */
.review-card-stack-item {
    position: absolute;
    inset: 0;
    transition: transform 0.28s ease, opacity 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
    will-change: transform, opacity;
}

/* контент карточки */
.review-card-inner {
    background: #ffffff;
    border-radius: 24px;
    padding: 20px 22px 18px;
    text-align: left;
    box-shadow: 0 20px 48px rgba(15,23,42,0.32);
}

/* позиции стопки: 0 — верхняя, 1 — средняя, 2 — нижняя */
/* уходит вправо-вниз */

.stack-pos-0 {
    z-index: 3;
    transform: translate(0px, 0px) scale(1);
    opacity: 1;
    filter: saturate(1);
}

.stack-pos-1 {
    z-index: 2;
    transform: translate(14px, 16px) scale(0.97);
    opacity: 0.94;
    filter: saturate(0.93);
}

.stack-pos-2 {
    z-index: 1;
    transform: translate(28px, 32px) scale(0.94);
    opacity: 0.80;
    filter: saturate(0.85);
}

/* лёгкий ховер по верхней карте */
.review-stack:hover .stack-pos-0 .review-card-inner {
    box-shadow: 0 24px 56px rgba(15,23,42,0.38);
}

/* ===== HEADER (AVATAR + NAME + STARS) ===== */

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4fc;
    color: #1b1d29;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.review-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 1;
    margin-left: 8px;
}

.review-stars span {
    color: #ffb02e;
    font-size: 18px;
}

/* ===== BUBBLE ВНУТРИ КАРТОЧКИ ===== */

.review-bubble {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff5ff, #f5f4ff);
    border: 1px solid rgba(255, 60, 166, 0.18);
}

.review-bubble p.review-text {
    font-size: 15px;
    line-height: 1.5;
    color: #44485a;
    white-space: pre-line;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 650px) {
    .ilmi-reviews {
        padding: 56px 12px 70px;
    }

    .review-stack {
        height: 290px;
    }

    .review-card-inner {
        padding: 18px 18px 16px;
    }

    .review-bubble p.review-text {
        font-size: 14.5px;
    }
}

@media (max-width: 420px) {
    .ilmi-reviews-subtitle {
        font-size: 14px;
    }

    .review-stack {
        height: 320px;
    }
}

.review-card {
    width: 100%;
    max-width: 360px;
    padding: 22px;
    border-radius: 20px;

    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;

    /* высоту проставим скриптом */
    overflow: hidden;
}

/* переопределяем фиксированную высоту, чтобы ей управлял JS */
.review-stack {
    height: auto;
}
