/* --- CARD STYLING --- */
.testimonial-card {
    background: white;
    border-radius: 26px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Prevent masonry breakage */
    break-inside: avoid;
    /* Prevent mobile flex shrinking */
    flex-shrink: 0;
    position: relative;
	margin:0px !important;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
}

/* Avatar is now an image */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    background: #eee;
}

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

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 16px;
    color: #212121;
}

.user-meta {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.gbp-stars {
    color: #FFC107;
    font-size: 16px;
    display: block;
    line-height: 1.2;
}

.testimonial-content {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 5px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

/* Collapsed state limit */
.testimonial-content.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.5em;
}

.read-more-btn {
    background: none;
    border: none;
    color: #FF5722;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 0;
    display: inline-block;
}

/* --- DESKTOP: MASONRY --- */
.testimonial-container {
    max-width: 1200px;
    margin: 0px auto;
  height: 550px;
  overflow-y: scroll;
  overflow-x: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.masonry-grid {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
	justify-content: center;
    align-items: center;
}
.masonry-column:nth-child(even) {
    margin-top: 100px!important;
}
/* .masonry-grid:nth-child(even) {
    margin-top: 40px;
} */


/* Keep the original stagger for the exact file behaviour */
/* .masonry-column:nth-child(even) {
    margin-top: 40px;
} */

/* --- MOBILE: INFINITE CAROUSEL --- */
.carousel-wrapper {
    display: none;
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0 30px 0;
    touch-action: pan-y;
    /* Allow vertical page scroll */
}

.carousel-track {
    display: flex;
    gap: 15px;
    will-change: transform;
    /* Performance optimization */
    cursor: grab;
    align-items: flex-start;
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-wrapper .testimonial-card {
    width: 85vw;
    max-width: 350px;
}

@media (max-width: 768px) {
    .masonry-grid {
        display: none;
    }

    .carousel-wrapper {
        display: block;
    }
	.testimonial-container {
/*  	 height: 350px; */
 	 height: auto;
  margin: 0px auto;
	}


}
/* Desktop vertical round-robin columns — no masonry height logic */

.masonry-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;            /* consistent spacing */
    min-width: 0;
}
