.google-reviews-wrapper {
    position: relative;
    background: #f8f9fa00;
    padding: 24px;
}

.google-reviews-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    position: relative;
    margin: 0 40px;
    min-height: 200px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.google-reviews-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    max-width: 300px;
    margin-bottom: 20px;
    flex: 0 0 auto;
    box-shadow: 0 1px 2px rgba(60,64,67,0.1), 0 1px 3px rgba(60,64,67,0.15);
}

.review-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.reviewer-initial {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f3f4;
    color: #70757a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

.reviewer-initial img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info {
    flex-grow: 1;
    min-width: 0;
}

.reviewer-name {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-date {
    color: #70757a;
    font-size: 13px;
    line-height: 1.3;
}

.review-stars {
    color: #fbbc04;
    font-size: 16px;
    margin: 8px 0;
    letter-spacing: 1px;
    line-height: 1;
}

.star {
    display: inline-block;
}

.star.empty {
    color: #e7eaed;
}

.review-text {
    color: #202124;
    line-height: 20px;
    font-size: 14px;
}

.review-text-content {
    margin-bottom: 4px;
}

.read-more {
    color: #70757a;
    font-size: 14px;
    cursor: pointer;
    padding-top: 4px;
    display: inline-block;
}

.read-more:hover {
    color: #202124;
}

/* Navigation arrows */
.google-reviews-nav {
    position: absolute;
    height: 0;
    top: 50%;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

.nav-prev, .nav-next {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: absolute;
    top: -20px;
}

.nav-prev:hover, .nav-next:hover {
    background-color: white;
}

.nav-prev:active, .nav-next:active {
    transform: scale(0.95);
    background-color: white;
}

.nav-prev:before, .nav-next:before {
    width: 14px; /* Increase the size */
    height: 14px; /* Increase the size */
    display: block;
    content: "";
    border-top: solid 3px #666; /* Adjust the thickness */
    border-left: solid 3px #666; /* Adjust the thickness */
    transform-origin: center;
}

.nav-next {
    right: 15px;
}

.nav-next:before {
    transform: rotate(135deg);
    margin-right: 4px;
}

.nav-prev {
    left: 15px;
}

.nav-prev:before {
    transform: rotate(-45deg);
    margin-left: 4px;
}
/* Update the SVG styles */
.google-reviews-nav svg {
    width: 24px;
    height: 24px;
    fill: #5f6368;
    pointer-events: none;
}
.google-icon {
    width: 18px;
    height: 18px;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.65;
}

/* Target screens smaller than 768px (mobile and small tablets) */
@media screen and (max-width: 768px) {
    .google-reviews-container {
        display: flex;
        gap: 16px;
        overflow-x: auto; /* Enable horizontal scrolling */
        position: relative;
        margin: 0 16px; /* Adjust margins for smaller screens */
        min-height: auto; /* Dynamically adjust height */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .google-reviews-container::-webkit-scrollbar {
        display: none;
    }

    .review-card {
        flex: 0 0 auto; /* Prevent collapsing */
        background: #ffffff;
        border-radius: 8px;
        padding: 16px; /* Adjust padding for smaller devices */
        min-width: 260px; /* Ensure cards fit better on mobile */
        max-width: 260px;
        height: auto; /* Dynamically adjust height */
        overflow: visible; /* Ensure content is not clipped */
        box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.15);
    }

    /* Navigation buttons adjustments for mobile */
    .nav-prev,
    .nav-next {
        width: 40px; /* Smaller size for mobile */
        height: 40px;
        top: 50%; /* Keep aligned with reviews */
        transform: translateY(-50%);
        background: white;
        z-index: 10;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.15);
    }

    .nav-prev {
        left: 8px; /* Adjust for mobile spacing */
    }

    .nav-next {
        right: 8px; /* Adjust for mobile spacing */
    }

    /* Add smooth scrolling for a better experience */
    .google-reviews-container {
        scroll-behavior: smooth;
    }
}

/* Target screens smaller than 480px (small phones) */
@media screen and (max-width: 480px) {
    .google-reviews-container {
        gap: 12px; /* Reduce spacing */
        margin: 0 12px; /* Adjust margins further */
    }

    .review-card {
        min-width: 240px; /* Adjust card width for very small screens */
        max-width: 240px;
        padding: 12px; /* Adjust padding */
    }

    .nav-prev,
    .nav-next {
        width: 36px; /* Slightly smaller navigation buttons */
        height: 36px;
    }
}


/* Responsive centered layout */
.google-reviews-wrapper {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 15px;
    box-sizing: border-box;
}

/* Center each review card inside swiper slide */
.swiper-slide {
    display: flex;
    justify-content: center;
}

/* Review card responsiveness */
.review-card {
    max-width: 320px;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}


/* Prevent overflow issues on the wrapper */
.google-reviews-wrapper {
    overflow: hidden;
}


/* Fix for Elementor shortcode widget container overflow */
.elementor-widget-shortcode .elementor-widget-container {
    overflow: hidden;
}


/* Fix overlapping pagination by moving it below the review cards */
.swiper-pagination-bullets.swiper-pagination-horizontal {
    position: absolute;
    bottom: -20px;
    width: 100%;
    left: 0;
    z-index: 0;
}


/* Correct pagination visibility and spacing */
.swiper-pagination-bullets.swiper-pagination-horizontal {
    position: relative;
    margin-top: 20px;
    z-index: 1;
    text-align: center;
}

/* Ensure full review texts on mobile without truncation */
@media only screen and (max-width: 767px) {
    .review-text .review-content {
        -webkit-line-clamp: unset !important;
        overflow: visible !important;
        display: block !important;
    }
    
    /* .review-text .read-more-toggle { display: none !important; } */

    .review-date {
        display: block !important; /* Ensure date always visible on mobile */
    }
}

/* "Read more" for Desktop & Tablet only */
@media only screen and (min-width: 768px) {
    .review-text .review-content {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
    }

    .review-text .read-more-toggle {
        color: #007bff !important;
        cursor: pointer;
        display: inline-block;
        margin-top: 4px;
    }

    .review-date {
        display: block !important;
    }
}
