// =============================================================================
// Customer Reviews Section
// =============================================================================

.frame-type-sitepackage_customerreviews {

    // -------------------------------------------------------------------------
    // Section
    // -------------------------------------------------------------------------
    .customer-reviews-section {
        padding: 3.5rem 0;
        text-align: center;

        @media (max-width: 767px) {
            padding: 2rem 0;
        }

        // ---------------------------------------------------------------------
        // Header
        // ---------------------------------------------------------------------
        .reviews-header-info {
            margin-bottom: 24px;
            text-align: center;

            @media (max-width: 767px) {
                margin-bottom: 2rem;
            }

            .reviews-main-title {
                color: $secondary-color;
                font-size: 44px;
                font-weight: 700;
                margin-bottom: 5px;
                padding-bottom: 0;
                text-align: center;

                @media (max-width: 767px) {
                    font-size: 28px;
                    font-style: normal;
                    font-weight: 400;
                    line-height: normal;
                }
            }

            .reviews-subtitle {
                color: $reviews-text-dark;
                font-size: 1.2rem;
                font-weight: 600;
                margin: 0 0 20px 0;
                padding: 0;
            }
        }

        // ---------------------------------------------------------------------
        // Summary (rating display)
        // ---------------------------------------------------------------------
        .reviews-summary {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;

            .rating-display {
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 44px;
                font-weight: 900;
                color: $reviews-rating-color;
                gap: 0.5rem;
                line-height: 1;

                @media (max-width: 767px) {
                    font-size: 40px;
                    font-weight: 700;
                }

                .rating-source-box {
                    display: flex;
                    align-items: center;
                    gap: 0.4rem;

                    .rating-source-logo {
                        display: block;
                        max-width: 80px;
                    }

                    .rating-source-text {
                        font-weight: 600;
                        color: $reviews-text-dark;
                    }
                }
            }

            .review-count {
                color: $reviews-text-dark;
                font-size: 20px;
                font-weight: 500;
            }
        }

        // ---------------------------------------------------------------------
        // Carousel
        // ---------------------------------------------------------------------
        .reviews-carousel-wrapper {
            max-width: 1450px;
            margin: 0 auto;
            padding: 0 20px;
            position: relative;

            @media (max-width: 767px) {
                padding: 0;
            }
        }

        .reviews-carousel {
            .owl-stage {
                display: flex;
            }

            .owl-item {
                display: flex;
                height: auto;

                .item {
                    display: flex;
                    flex: 1;
                    min-width: 0;
                }
            }

            // Owl Carousel overrides (higher specificity than global .owl-carousel)
            &.owl-carousel {
                padding: 0 80px;

                @media (max-width: 1024px) {
                    padding: 0;
                }

                .owl-nav {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    position: absolute;
                    top: 0;
                    bottom: calc(1rem + -40px); // match owl-stage-outer height (above dots)
                    left: 0;
                    right: 0;
                    pointer-events: none;
                    z-index: 10;

                    @media (max-width: 1024px) {
                        display: none;
                    }

                    button {
                        pointer-events: all;
                        background: transparent;
                        color: #ffffff;
                        width: 52px;
                        height: 52px;
                        border-radius: 50%;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 1.5rem;
                        border: none;
                        cursor: pointer;
                        transition: all 0.3s ease;

                        &:before {
                            font-size: 20px;
                            color: #ffffff;
                            background-color: $reviews-nav-bg;
                            padding: 0 !important;
                            width: 100%;
                            height: 100%;
                            line-height: 52px;
                            text-align: center;
                            font-family: "Font Awesome 5 Pro";
                            font-weight: 900;
                            position: absolute;
                            top: 0;
                            left: 0;
                            box-sizing: border-box;
                            // padding-left: 3px !important;
                            
                        }

                        // &:after {
                        //     padding-right: 3px !important;
                        // }

                        &:hover {
                            opacity: 0.9;
                        }

                        &.owl-prev {
                            margin-left: 0;
                        }

                        &.owl-next {
                            margin-right: 0;
                        }

                        // &.owl-prev.owl-next:before,
                        // &.owl-next.owl-next:before {
                        //     padding-left: 3px !important;
                        // }

                        span {
                            display: none;
                        }
                    }

                    &.disabled {
                        display: none;
                    }
                }

                .owl-dots {
                    margin-top: 1rem;
                    width: 100%;
                    min-height: 23px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    gap: 10px;

                    // Override global _slider.scss display: none !important on mobile
                    @media (max-width: 767.98px) {
                        display: flex !important;
                        gap: 10px;
                    }
                }

                .owl-dot {
                    margin: 0;
                    padding: 0;
                    box-shadow: none;
                    background: transparent;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    align-self: center;
                    width: 23px;
                    min-width: 23px;
                    height: 23px;
                    min-height: 23px;

                    span {
                        width: 18px;
                        height: 18px;
                        background-color: $reviews-dot-inactive;
                        display: block;
                        border-radius: 50%;
                        transition: all 0.3s ease;
                        margin: 0;
                        padding: 0;
                    }

                    &.active span {
                        width: 23px;
                        height: 23px;
                        background-color: $reviews-dot-active;
                    }
                }
            }
        }

        // ---------------------------------------------------------------------
        // Review Card
        // ---------------------------------------------------------------------
        .review-card {
            background-color: $reviews-card-bg;
            padding: 30px;
            text-align: left;
            color: #ffffff;
            min-height: 320px;
            display: flex;
            flex-direction: column;
            flex: 1;
            width: 100%;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

            @media (max-width: 767px) {
                min-height: auto;
                padding: 20px;
            }

            .review-stars-row {
                color: var(--rating-color, $reviews-star-active);
                font-size: 1.75rem;
                margin-bottom: 1.5rem;
                display: flex;
                justify-content: flex-start;

                .symbol-icon {
                    color: rgba(255, 255, 255, 0.35);
                    margin-right: 5px;

                    &:last-child {
                        margin-right: 0;
                    }

                    &.active {
                        color: var(--rating-color, $reviews-star-active);
                    }
                }
            }

            .review-item-title {
                font-size: 18px;
                font-weight: 700;
                margin-bottom: 24px;
                color: #ffffff;
                padding: 0;
            }

            .review-item-content {
                font-size: 16px;
                line-height: 28px;
                margin-bottom: 20px;
                flex-grow: 1;
                color: #ffffff;
                font-weight: 400;

                p {
                    display: -webkit-box;
                    -webkit-line-clamp: 3;
                    line-clamp: 3;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                }
            }

            .review-footer {
                display: flex;
                flex-direction: column;
                align-items: flex-start;
                font-size: 1rem;
                gap: 0.25rem;

                .reviewer-name {
                    font-weight: 500;
                    color: #3C6E9C;
                }

                .review-date {
                    color: #ffffff;
                    font-weight: 500;
                }
            }
        }

    }

    // -------------------------------------------------------------------------
    // Symbol Icons (shared: star, bubble)
    // -------------------------------------------------------------------------
    .symbol-icon {
        display: inline-block;
        width: 24px;
        height: 24px;
        vertical-align: middle;
    }

    .symbol-star {
        width: 18px;
        height: 18px;

        &::before {
            content: '\f005';
            font-family: 'Font Awesome 5 Pro';
            font-weight: 900;
            font-size: 18px;
            display: block;
            line-height: 1;
            text-align: center;
        }
    }

    .symbol-bubble {
        width: 18px;
        height: 18px;

        &::before {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background-color: currentColor;
            -webkit-mask-image: url(/static_assets/Icons/bubble.svg);
            mask-image: url(/static_assets/Icons/bubble.svg);
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-position: center;
            mask-position: center;
            -webkit-mask-size: contain;
            mask-size: contain;
        }
    }

    // When row has symbol-bubble, active shows as round (circle)
    .review-stars-row:has(.symbol-bubble) .symbol-bubble.active::before {
        -webkit-mask-image: none;
        mask-image: none;
        border-radius: 50%;
    }
}
