/* ==========================================================
   TESTIMONIALS - עדכוני אווטאר + Modal "כל ההמלצות"
   ========================================================== */

/* ===== עדכוני avatar (אייקון משתמש / תמונת מוצר) ===== */
.author-avatar-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
    color: var(--color-sage);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-sage-light);
    flex-shrink: 0;
}
.author-avatar-icon svg {
    width: 24px;
    height: 24px;
}
.author-avatar-link {
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.author-avatar-link:hover { transform: scale(1.05); }
.author-avatar-product {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-sage-light);
    background: var(--color-cream);
    box-shadow: 0 2px 8px rgba(61, 79, 57, 0.08);
}

/* ===== כפתור "כל ההמלצות" ===== */
.testimonials-cta {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}
.testimonials-cta .btn {
    background: white;
    color: var(--color-forest);
    border: 1.5px solid var(--color-sage);
    backdrop-filter: none;
}
.testimonials-cta .btn:hover {
    background: var(--color-sage);
    color: white;
    border-color: var(--color-sage);
}

/* ==========================================================
   MODAL - כל ההמלצות
   ========================================================== */
.testimonials-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 79, 57, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(4px);
}
.testimonials-modal-overlay.open { opacity: 1; visibility: visible; }

.testimonials-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 95%;
    max-width: 1100px;
    max-height: 88vh;
    background: var(--color-cream);
    border-radius: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(61, 79, 57, 0.25);
}
.testimonials-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.testimonials-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(61, 79, 57, 0.1);
    background: white;
    flex-shrink: 0;
}
.testimonials-modal-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-forest);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.testimonials-modal-title svg { color: var(--color-rose-deep); }
.testimonials-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-cream);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-forest);
    transition: all 0.2s;
}
.testimonials-modal-close:hover {
    background: var(--color-sage);
    color: white;
    transform: rotate(90deg);
}

.testimonials-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}
.testimonials-modal-body::-webkit-scrollbar { width: 8px; }
.testimonials-modal-body::-webkit-scrollbar-track { background: transparent; }
.testimonials-modal-body::-webkit-scrollbar-thumb { background: var(--color-sage-light); border-radius: 4px; }

.testimonials-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.testimonials-modal-grid .testimonial-card {
    margin: 0;
    min-width: 0;
    background: white;
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    box-shadow: 0 4px 20px rgba(61, 79, 57, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}
.testimonials-modal-grid .testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(61, 79, 57, 0.12);
}
.testimonials-modal-grid .testimonial-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}
.testimonials-modal-grid .testimonial-author { gap: 0.7rem; }

/* loading state */
.testimonials-modal-loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-sage);
    font-size: 0.9rem;
    display: none;
}
.testimonials-modal-loading.is-loading { display: block; }
.testimonials-modal-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid var(--color-sage-light);
    border-top-color: var(--color-sage);
    border-radius: 50%;
    animation: testimonialsSpin 0.6s linear infinite;
    vertical-align: middle;
}
.testimonials-modal-loading.is-end::before { display: none; }
.testimonials-modal-loading.is-end {
    color: var(--color-sage);
    opacity: 0.6;
    font-style: italic;
}
@keyframes testimonialsSpin { to { transform: rotate(360deg); } }

body.tp-no-scroll-modal { overflow: hidden; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .testimonials-modal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .testimonials-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    .testimonials-modal.open { transform: none; }
    .testimonials-modal-grid { grid-template-columns: 1fr; gap: 1rem; }
    .testimonials-modal-body { padding: 1.2rem; }
    .testimonials-modal-header { padding: 1rem 1.2rem; }
    .testimonials-modal-title { font-size: 1.1rem; }
}
