/* ===== SECTION BG ===== */
.tersrt {
    background: #c2c2c2;
    padding: 80px 0 100px;
}

/* ===== WRAPPER ===== */
.testimonialSection {
    width: 90%;
    margin: auto;
}

/* ===== HEADER ===== */
.testiHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.testiHeaderLeft {
    max-width: 520px;
}

.testiSmall {
    font-size: 14px;
    color: #ff2b5b;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


.testiTitle {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin: 12px 0;
}

.testiDesc {
    color: #f1f1f1;
    font-size: 15px;
    line-height: 26px;
}

/* ===== BUTTON ===== */
.testiViewMoreBtn {
    background: #ff2b5b;
    color: #fff;
    padding: 14px 44px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
}

/* ===== CAROUSEL ===== */
.testiCarousel .owl-stage {
    display: flex;
    align-items: center;
}

.testiCarousel .owl-item {
    display: flex;
    justify-content: center;
}

/* ===== CARD ===== */
.testiCard {
    width: 820px;       /* fixed width */
    height: 280px;      /* fixed height */
    background: #fff;
    padding: 40px 55px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    opacity: 0.35;
    transform: scale(0.85);
    transition: all 0.4s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* CENTER CARD */
.testiCarousel .owl-item.center .testiCard {
    opacity: 1;
    transform: scale(1);
}

/* ===== TEXT ===== */
.testiText {
    font-size: 16px;
    line-height: 26px;
    color: #333;

    overflow: hidden;
    text-overflow: ellipsis;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; /* Number of visible lines */
}
/* ===== NAME ===== */
.testiName {
    font-size: 18px;
    font-weight: 700;
    margin-top: 22px;
    color: #111;
}

/* ===== STARS ===== */
.testiStars {
    font-size: 20px;
    color: #ffb400;
    margin-top: 10px;
}

/* ===== DOTS ===== */
.testiCarousel .owl-dots {
    margin-top: 45px;
}

.testiCarousel .owl-dot span {
    width: 8px;
    height: 8px;
    background: #fff;
    opacity: 0.6;
}

.testiCarousel .owl-dot.active span {
    width: 10px;
    height: 10px;
    background: #ff2b5b;
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .testiHeader {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .testiTitle {
        font-size: 32px;
    }

    .testiCard {
        width: 100%;
        height: 300px;   /* still fixed */
        padding: 30px;
        transform: scale(1);
        opacity: 1;
    }

    .testiText {
        -webkit-line-clamp: 6;
    }
}


/* page */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= CARD ================= */
.review-card {
    height: 260px;
    /* fixed equal height */
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-card:hover {
    transform: translateY(-4px);
}

.review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    text-align: center;

    /* truncate */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* handle long text/no spaces */
    word-break: break-word;
    overflow-wrap: anywhere;
}

.review-author {
    margin-top: 12px;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

.stars {
    margin-top: 8px;
    color: #ff9800;
    font-size: 18px;
    text-align: center;
}

/* ================= MODAL ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 999;
}

.modal-content {
    background: #fff;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    /* limit height */
    padding: 32px;
    border-radius: 18px;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    overflow-y: auto;
    /* scroll if long */
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    cursor: pointer;
}

/* popup text */
#modalReviewText {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;

    word-break: break-word;
    overflow-wrap: anywhere;
}

#modalAuthor {
    font-weight: bold;
    font-size: 15px;
}

#modalStars {
    margin-top: 12px;
    font-size: 20px;
    color: #ff9800;
}

/* optional scrollbar */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}