/* --- General Layout --- */
.swiper-container-wrapper {
    width: 100%;
    max-width: 1100px; /* Slightly reduced for a tighter look */
    position: relative;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mySwiper {
    padding-top: 40px;
    padding-bottom: 70px;
}

/* ✅ Vertically center all slides */
.swiper-wrapper {
    align-items: center; 
}

/* --- Slide Styling --- */
.swiper-slide {
    opacity: 0.5;
    transform: scale(0.88);
    transition: all 0.4s ease;
    filter: blur(2px);
    /* The active slide will have its own box-shadow */
    box-shadow: none; 
}

.swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    z-index: 10;
}

/* --- Card Styling --- */
.testimonial-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
    border: 1px solid #f0f0f0; /* Subtle border */
}

.swiper-slide-active .testimonial-card {
     box-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.12);
}

/* --- Media Section (Image/Video) --- */
.testimonial-media {
    position: relative;
    width: 100%;
    padding-top: 60%; /* Aspect ratio for the media */
}
.testimonial-image, .testimonial-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.testimonial-image {
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
}
.testimonial-video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%; display: flex;
    justify-content: center; align-items: center;
    cursor: pointer; transition: all 0.3s ease;
    backdrop-filter: blur(4px); z-index: 5;
}
.play-icon:hover { transform: translate(-50%, -50%) scale(1.1); }
.play-icon svg { width: 22px; height: 22px; fill: #333; }

/* --- Content Section --- */
.testimonial-content {
    padding: 20px;
    text-align: left;
}

.testimonial-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Positions name and badge */
    margin-bottom: 2px; /* ✅ Reduced gap */
}
.testimonial-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #111;
}

/* ✅ Verified Badge Styling */
.verified-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e6f4ea; /* Light green */
    color: #34a853; /* Dark green */
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    flex-shrink: 0; /* Prevents badge from shrinking */
}
.verified-icon {
    width: 14px;
    height: 14px;
    fill: #34a853; /* Dark green */
    margin-right: 4px;
}

/* ✅ Location Style */
.testimonial-location {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px; /* ✅ Reduced gap */
}
.location-icon {
    width: 16px;
    height: 16px;
    fill: #ec4899; /* Pink color */
    margin-right: 6px;
}

.stars {
    color: #ffc107;
    margin-bottom: 12px;
    font-size: 1rem; /* ✅ Increased star size */
}

.review-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

/* --- Inactive Slide Content Visibility --- */
.swiper-slide:not(.swiper-slide-active) .review-text,
.swiper-slide:not(.swiper-slide-active) .stars,
.swiper-slide:not(.swiper-slide-active) .verified-badge {
    display: none;
}
.swiper-slide:not(.swiper-slide-active) .testimonial-content {
    padding: 12px 16px;
}
.swiper-slide:not(.swiper-slide-active) .testimonial-name {
    font-size: 0.9rem;
}
.swiper-slide:not(.swiper-slide-active) .testimonial-location {
    font-size: 0.8rem;
}

/* --- Navigation & Pagination --- */
.swiper-button-prev, .swiper-button-next {
    width: 44px; height: 44px;
    background-color: #fff; border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    top: 50%; transform: translateY(-50%);
}
.swiper-button-prev::after, .swiper-button-next::after {
    font-size: 16px; font-weight: bold; color: #333;
}
.swiper-pagination { bottom: 20px !important; }
.swiper-pagination-bullet { width: 8px; height: 8px; background-color: #d1d5db; opacity: 1; }
.swiper-pagination-bullet-active { background-color: #ec4899; width: 24px; border-radius: 5px; }

/* --- Mobile Responsiveness --- */
@media (max-width: 767px) {
    .swiper-slide {
        transform: scale(1); /* No scaling needed for 1 slide view */
        opacity: 1;
        filter: none;
    }
    /* ✅ Arrows are now visible on mobile by default */
    .swiper-button-prev, .swiper-button-next {
        width: 36px;
        height: 36px;
    }
    .swiper-button-prev::after, .swiper-button-next::after {
        font-size: 14px;
    }
}
