/* =============================================================
   testimonials.css — Inner page styles for Testimonials
   Extends: css/index.css (shared design system)
   ============================================================= */

.testimonials-section {
    padding: 7rem 0;
    background-color: var(--bg-light);
    position: relative;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header typography */
.testi-header {
    text-align: center;
    margin-bottom: 5rem;
}

.testi-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: block;
}

.testi-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Swiper slider area */
.testimonials-slider-wrapper {
    position: relative;
    padding: 2.5rem 0;
}

.testimonials-swiper {
    width: 100%;
    padding: 2.5rem 0.5rem !important; /* Extra padding for avatar overlap & card shadows */
    overflow: hidden;
}

.testimonials-swiper .swiper-slide {
    height: auto;
}

/* Testimonial Card Styling */
.testimonial-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    border: 1px solid rgba(150, 178, 174, 0.15);
    box-shadow: var(--shadow-subtle);
    padding: 2.5rem 1.8rem 1.8rem;
    text-align: center;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: box-shadow 0.4s var(--transition-smooth);
}

.testimonial-card:hover {
    box-shadow: var(--shadow-medium);
}

/* Avatar container overlapping the card */
.testi-avatar-container {
    width: 64px;
    height: 64px;
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.testi-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
}

/* Monogram Avatar fallback */
.testi-avatar-monogram {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--bg-white);
}

/* Platform badge (Google logo) overlay */
.testi-platform-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background-color: var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.testi-platform-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Text Details inside Card */
.testi-name {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
    margin-top: 0.5rem;
}

.testi-date {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    display: block;
}

/* Stars Rating */
.testi-stars-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 1.2rem;
}

.testi-star {
    width: 16px;
    height: 16px;
    fill: #FFC107;
}

.testi-verified {
    width: 14px;
    height: 14px;
    fill: #1E88E5;
    margin-left: 2px;
    display: inline-block;
}

/* Review content text */
.testi-content {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

/* Only clamp when it has the has-readmore class and is not expanded */
.testimonial-card.has-readmore .testi-content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testimonial-card.has-readmore.expanded .testi-content {
    display: block;
    -webkit-line-clamp: none;
}

/* Read more trigger */
.testi-readmore-btn {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition-quick);
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.testi-readmore-btn:hover {
    color: var(--primary-color);
}

/* Swiper navigation adjustments */
.testimonials-slider-wrapper .swiper-button-prev,
.testimonials-slider-wrapper .swiper-button-next {
    color: var(--text-light);
    width: 44px;
    height: 44px;
    background-color: var(--bg-white);
    border: 1px solid rgba(150, 178, 174, 0.2);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.testimonials-slider-wrapper .swiper-button-prev:after,
.testimonials-slider-wrapper .swiper-button-next:after {
    font-size: 1.1rem;
    font-weight: bold;
}

.testimonials-slider-wrapper .swiper-button-prev:hover,
.testimonials-slider-wrapper .swiper-button-next:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.testimonials-slider-wrapper .swiper-button-prev {
    left: -22px;
}

.testimonials-slider-wrapper .swiper-button-next {
    right: -22px;
}

/* Swiper pagination dots */
.testimonials-swiper-pagination {
    bottom: -15px !important;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.testimonials-swiper-pagination .swiper-pagination-bullet {
    background-color: var(--text-light) !important;
    opacity: 0.35;
    width: 8px;
    height: 8px;
    transition: var(--transition-quick);
}

.testimonials-swiper-pagination .swiper-pagination-bullet-active {
    background-color: var(--primary-color) !important;
    width: 24px;
    border-radius: 4px;
    opacity: 1;
}

/* ── Responsive breakpoints ────────────────────────────────── */

@media (max-width: 1250px) {
    .testimonials-slider-wrapper .swiper-button-prev {
        left: 5px;
    }
    
    .testimonials-slider-wrapper .swiper-button-next {
        right: 5px;
    }
}

@media (max-width: 992px) {
    .testimonials-section {
        padding: 5rem 0;
    }
    .testi-header {
        margin-bottom: 4rem;
    }
}

@media (max-width: 768px) {
    .testimonials-slider-wrapper .swiper-button-prev,
    .testimonials-slider-wrapper .swiper-button-next {
        display: none; /* Hide arrow navigation on small mobile */
    }
}
