/**
 * Stacked layout styles.
 */

.glowrev-testimonials-stacked {
    display: grid;
    grid-template-columns: repeat(var(--glowrev-stacked-cols, 3), minmax(0, 1fr));
    gap: 22px;
}

.glowrev-stacked-1-cols { --glowrev-stacked-cols: 1; }
.glowrev-stacked-2-cols { --glowrev-stacked-cols: 2; }
.glowrev-stacked-3-cols { --glowrev-stacked-cols: 3; }
.glowrev-stacked-4-cols { --glowrev-stacked-cols: 4; }

.glowrev-stacked-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    padding: 20px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
}

.glowrev-stacked-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
}

.glowrev-stacked-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid #eef2ff;
    background: #f8fafc;
}

.glowrev-stacked-avatar img,
.glowrev-stacked-avatar .avatar,
.glowrev-stacked-avatar .glowrev-stacked-avatar-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.glowrev-stacked-identity {
    min-width: 0;
}

.glowrev-stacked-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glowrev-stacked-company,
.glowrev-stacked-designation,
.glowrev-stacked-position {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glowrev-stacked-rating {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.glowrev-stacked-rating .rating-star {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: currentColor;
    color: #f59e0b;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.25;
}

.glowrev-stacked-rating .rating-star.filled {
    opacity: 1;
}

.glowrev-stacked-rating .rating-star.empty {
    color: #cbd5e1;
    opacity: 0.7;
}

.glowrev-stacked-body .glowrev-testimonial-text {
    color: #334155;
    font-size: 1rem;
    line-height: 1.7;
}

.glowrev-stacked-meta {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .glowrev-testimonials-stacked {
        grid-template-columns: 1fr;
    }

    .glowrev-stacked-head {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .glowrev-stacked-rating {
        justify-content: flex-start;
    }
}

/* Stacked Entrance Animation */
@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

.glowrev-stacked-card {
    animation: flipIn 0.6s ease-out forwards;
    transform-style: preserve-3d;
}

.glowrev-stacked-card:nth-child(1) { animation-delay: 0s; }
.glowrev-stacked-card:nth-child(2) { animation-delay: 0.1s; }
.glowrev-stacked-card:nth-child(3) { animation-delay: 0.2s; }
.glowrev-stacked-card:nth-child(4) { animation-delay: 0.3s; }
.glowrev-stacked-card:nth-child(5) { animation-delay: 0.4s; }
.glowrev-stacked-card:nth-child(6) { animation-delay: 0.5s; }

/* Stacked Hover Effects */
.glowrev-stacked-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    z-index: 10;
}

/* Avatar Rotation on Hover */
.glowrev-stacked-card:hover .glowrev-stacked-avatar {
    animation: avatarWiggle 0.5s ease-in-out;
}

@keyframes avatarWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Rating Stars Pop Effect */
.glowrev-stacked-card:hover .glowrev-stacked-rating .rating-star.filled {
    animation: starPop 0.4s ease-out;
}

@keyframes starPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Staggered Shadow Effect */
.glowrev-stacked-card:nth-child(1) { z-index: 6; }
.glowrev-stacked-card:nth-child(2) { z-index: 5; }
.glowrev-stacked-card:nth-child(3) { z-index: 4; }
.glowrev-stacked-card:nth-child(4) { z-index: 3; }
.glowrev-stacked-card:nth-child(5) { z-index: 2; }
.glowrev-stacked-card:nth-child(6) { z-index: 1; }
