/* ===== RW TESTIMONIALS - CSS VARIABLES ===== */
/* Customize these variables to match your theme */

:root {
    /* Primary Colors */
    --rw-primary: #10B2C7;
    --rw-primary-dark: #276091;
    --rw-accent: #FFBF00;

    /* Neutral Colors */
    --rw-white: #ffffff;
    --rw-black: #000000;
    --rw-gray: #666666;
    --rw-gray-light: #999999;
    --rw-gray-200: #e5e5e5;
    --rw-gray-bg: #F5F5F5;

    /* Brand Colors */
    --rw-blue: #0073aa;
    --rw-blue-light: #00a0d2;
    --rw-blue-dark: #276091;
    --rw-navy: #1e3a5f;
    --rw-orange: #f7941d;

    /* Typography */
    --rw-font-display: "Roboto Condensed", sans-serif;

    /* Star Rating */
    --rw-star-color: #FFBF00;

    /* Card Styles */
    --rw-card-bg: #F5F5F5;
    --rw-card-radius: 10px;
    --rw-carousel-card-radius: 20px;

    /* Quote Mark */
    --rw-quote-color: rgba(39, 96, 145, 0.1);
}


/* ===== LEAVE REVIEW LINKS ===== */

.leave-review-links {
    width: 100%;
    clear: both;
    overflow: hidden;
    padding: 0 0 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(min-content, max-content);
    gap: 20px;
}

@media (min-width: 480px) {
    .leave-review-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 640px) {
    .leave-review-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 800px) {
    .leave-review-links {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 992px) {
    .leave-review-links {
        grid-template-columns: repeat(6, 1fr);
        gap: 30px;
    }
}


/* ===== TESTIMONIALS — FILTER BUTTONS ===== */

.post-type-archive-rw_testimonials .filter-button-group {
    margin: 0 auto 30px;
    text-align: center;
}

.post-type-archive-rw_testimonials .filter-button-group button {
    padding: 10px 20px;
    background-color: var(--rw-white);
    border: 2px solid var(--rw-black);
    color: var(--rw-black);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.post-type-archive-rw_testimonials .filter-button-group button:hover {
    border-color: var(--rw-primary);
    background: var(--rw-primary);
    color: var(--rw-white);
}

/* Selected filter. Matches the hover treatment so the two read as one state,
   and stays put on hover so the selection never appears to move. */
.post-type-archive-rw_testimonials .filter-button-group button.is-active,
.post-type-archive-rw_testimonials .filter-button-group button.is-active:hover {
    border-color: var(--rw-primary);
    background: var(--rw-primary);
    color: var(--rw-white);
    font-weight: 700;
}

.post-type-archive-rw_testimonials .filter-button-group button:focus-visible {
    outline: 2px solid var(--rw-primary-dark);
    outline-offset: 2px;
}

/* ===== TESTIMONIALS — ARCHIVE LOAD MORE ===== */

.rw-testimonials-load-more {
    margin: 10px auto 40px;
    text-align: center;
}

.rw-testimonials-load-more .rw-load-more-button {
    padding: 12px 30px;
    background-color: var(--rw-white);
    border: 2px solid var(--rw-black);
    color: var(--rw-black);
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
}

.rw-testimonials-load-more .rw-load-more-button:hover {
    border-color: var(--rw-primary);
    background: var(--rw-primary);
    color: var(--rw-white);
}

.rw-testimonials-load-more .rw-load-more-button:focus-visible {
    outline: 2px solid var(--rw-primary-dark);
    outline-offset: 2px;
}

.rw-testimonials-load-more .rw-load-more-button[disabled] {
    cursor: default;
    opacity: 0.6;
}

/* Spinner while a batch is in flight. Driven by the .is-loading class the
   script adds, so it covers both a click and the automatic fetch that runs
   when a filter matches nothing loaded yet. currentColor keeps it correct
   against the button's hover and disabled states without restating them. */
.rw-testimonials-load-more .rw-load-more-button.is-loading::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.6em;
    vertical-align: -0.15em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: rw-testimonials-spin 0.7s linear infinite;
}

@keyframes rw-testimonials-spin {
    to {
        transform: rotate( 360deg );
    }
}

/* Anyone who has asked for less motion gets the ring without the spin -- the
   button is still visibly in a loading state, and the status text says so. */
@media (prefers-reduced-motion: reduce) {
    .rw-testimonials-load-more .rw-load-more-button.is-loading::before {
        animation: none;
        border-top-color: currentColor;
        opacity: 0.5;
    }
}

.rw-testimonials-load-more .rw-load-more-status {
    margin: 10px 0 0;
    color: var(--rw-gray);
    font-size: 14px;
    min-height: 1em;
}


/* ===== TESTIMONIALS — ARCHIVE / MASONRY ===== */

.post-type-archive-rw_testimonials .fl-archive .row {
    max-width: 1340px;
}

.rw_testimonials .rw-masonry-grid-container article:nth-child(even) {
    margin-right: 0;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial {
    background: var(--rw-card-bg);
    position: relative;
    border-radius: var(--rw-card-radius);
    background-image: none;
    margin: 0;
    padding: 30px;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial h4 {
    font-style: normal;
    text-align: center;
    font-weight: 700;
    color: var(--rw-blue-dark);
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rating-stars {
    width: 103px;
    margin: 0 auto 20px;
    overflow: hidden;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rating-stars i {
    color: var(--rw-star-color);
}

/* Quotation mark decorations */
.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial::before,
.rw-masonry-grid-container .rw-testimonial::after {
    position: absolute;
    font-size: 210px;
    line-height: 1;
    color: var(--rw-quote-color);
    font-style: normal;
    font-family: Georgia, Times, "Times New Roman", serif;
    z-index: 1;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial::before {
    top: -10px;
    left: 2px;
    content: "\201C";
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-review-image {
    padding-top: 20px;
    text-align: center;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .arrow-down {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--rw-card-bg);
    margin: 0 0 0 45px;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial-author,
.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial-source {
    padding-left: 44px;
    padding-bottom: 0;
}

.post-type-archive-rw_testimonials .rw-masonry-grid-container .rw-testimonial-author {
    font-weight: 700;
}


/* ===== TESTIMONIAL SLIDER (full-width row) ===== */

.rw-testimonial-slider-full-width h2 {
    color: var(--rw-white);
}

.rw-testimonial-slider-full-width .fl-row-content-wrap {
    padding-bottom: 60px;
}

.rw-testimonial-slider-full-width .bx-wrapper {
    width: calc(100% - 120px);
    margin: auto;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    box-shadow: none;
}

/* Slider nav arrows */
.rw-testimonial-slider-full-width .bx-wrapper .bx-controls-direction a {
    width: 40px !important;
    height: 40px !important;
    text-indent: 0 !important;
    margin-top: -20px !important;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-prev,
.rw-testimonial-slider-full-width .bx-wrapper .bx-next {
    background: none;
    background-image: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-prev {
    left: -60px;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-next {
    right: -60px;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-prev .fa,
.rw-testimonial-slider-full-width .bx-wrapper .bx-next .fa {
    color: var(--rw-white);
    font-size: 28px;
    line-height: 40px;
    position: relative;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-prev:hover,
.rw-testimonial-slider-full-width .bx-wrapper .bx-prev:focus,
.rw-testimonial-slider-full-width .bx-wrapper .bx-next:hover,
.rw-testimonial-slider-full-width .bx-wrapper .bx-next:focus {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Slider pager dots */
.rw-testimonial-slider-full-width .rw-testimonial-slider .bx-wrapper .bx-pager {
    position: absolute;
    bottom: 10px;
    width: 100%;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-pager.bx-default-pager a {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.rw-testimonial-slider-full-width .bx-wrapper .bx-pager.bx-default-pager a.active,
.rw-testimonial-slider-full-width .bx-wrapper .bx-pager.bx-default-pager a:focus,
.rw-testimonial-slider-full-width .bx-wrapper .bx-pager.bx-default-pager a:hover {
    background: var(--rw-white) !important;
}

/* Slider content */
.rw-testimonial-slider-full-width .rw-testimonial-slider {
    visibility: hidden;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider ul {
    margin-left: 0 !important;
    padding: 0;
}

.rw-testimonial-slider-full-width ul.rw-testimonial-slider li {
    padding: 30px;
    color: var(--rw-white);
    font-size: 14px;
    text-align: center;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider .rating-stars {
    text-align: center;
    margin-bottom: 10px !important;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider .rating-stars i {
    color: var(--rw-star-color);
    font-size: 20px;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider h4 {
    margin-bottom: 10px !important;
    text-align: center;
    color: var(--rw-white);
    font-size: 26px;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider p {
    margin-bottom: 10px !important;
    color: var(--rw-white);
    font-size: 14px;
    text-align: center;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider a {
    color: rgba(255, 255, 255, 0.8);
}

.rw-testimonial-slider-full-width .rw-testimonial-slider a:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
}

.rw-testimonial-slider-full-width .rw-testimonial-slider p.rw-reviewer-info {
    margin-bottom: 0 !important;
    font-size: 14px;
}

@media (min-width: 600px) {
    .rw-testimonial-slider-full-width .rw-testimonial-slider h4 {
        font-size: 32px;
    }

    .rw-testimonial-slider-full-width ul.rw-testimonial-slider li,
    .rw-testimonial-slider-full-width .rw-testimonial-slider p {
        font-size: 16px;
    }
}


/* ===== SIDEBAR REVIEWS WIDGET ===== */

.fl-module-sidebar .widget_text.rw-sidebar-reviews,
.rw-sidebar-reviews {
    padding: 0 !important;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper {
    width: 100%;
    margin: auto;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper ul {
    padding-left: 0;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper ul li {
    padding: 0;
    font-size: 14px;
    text-align: center;
}

/*
 * Intentionally NOT scoped to a --slider / --carousel modifier. Unlike the
 * .bx-wrapper rules in this block, .rating-stars is rendered by both
 * shortcodes and has always matched both, so narrowing it here would remove
 * styling the carousel previously had.
 */
.rw-sidebar-reviews .rw-testimonial-wrapper .rating-stars {
    margin-bottom: 10px;
}

.rw-sidebar-reviews .rw-testimonial-wrapper .rating-stars i {
    color: var(--rw-star-color);
    font-size: 20px;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper h4 {
    font-size: 20px;
    color: var(--rw-primary);
    margin-bottom: 10px;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper ul li p {
    margin-bottom: 10px;
}

.rw-sidebar-reviews .rw-testimonial-wrapper--slider .bx-wrapper ul li p.rw-reviewer-info {
    margin-top: 0;
    font-size: 14px;
}

.rw-sidebar-reviews .bx-wrapper .bx-controls-auto,
.rw-sidebar-reviews .bx-wrapper .bx-pager {
    bottom: -50px;
}

.rw-sidebar-reviews h4.fl-widget-title {
    font-size: 16px;
}

@media (min-width: 768px) {
    .rw-sidebar-reviews h4.fl-widget-title {
        font-size: 20px;
    }
}


/* ===== MINI REVIEW FADER ===== */

.rw-mini-review-fader-wrapper {
    padding: 5px 0 10px;
}

.rw-mini-review-fader-wrapper .bx-wrapper {
    margin-bottom: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.rw-mini-review-fader div {
    display: inline-block;
    color: var(--rw-gray);
}

.rw-mini-review-fader div i {
    color: var(--rw-gray);
}

.rw-mini-review-fader .rating-stars i {
    color: var(--rw-star-color);
}

.rw-mini-review-fader .rw-mini-quote {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 14px;
}


/* ===== TESTIMONIAL WRAPPER (generic bxSlider) ===== */

.rw-testimonial-wrapper--slider .bx-wrapper {
    width: 100%;
    margin: auto;
}

.rw-testimonial-wrapper--slider .bx-wrapper .bx-prev,
.rw-testimonial-wrapper--slider .bx-wrapper .bx-next {
    display: none;
}

/*
 * bxSlider's own stylesheet resets this via `.bxslider { margin: 0; padding: 0 }`
 * and `ul.bxslider { list-style: none }`. We no longer put that class on the
 * element, so the reset has to live here or the <ul> regains the UA defaults.
 */
.rw-testimonial-slider {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rw-testimonial-slider h4 {
    font-size: 34px;
}

.rw-testimonial-slider p {
    font-size: 15px;
}

@media (min-width: 480px) {
    .rw-testimonial-wrapper--slider .bx-wrapper {
        width: calc(100% - 120px);
    }

    .rw-testimonial-wrapper--slider .bx-wrapper .bx-prev,
    .rw-testimonial-wrapper--slider .bx-wrapper .bx-next {
        display: block;
    }
}

@media (min-width: 800px) {
    .rw-testimonial-slider h4 {
        font-size: 48px;
    }

    .rw-testimonial-slider p {
        font-size: 16px;
    }
}


/* ===== TESTIMONIALS ARCHIVE RESPONSIVE ===== */

@media (max-width: 767px) {
    .filter-button-group {
        width: 100%;
    }

    .filter-button-group button {
        margin-bottom: 5px;
    }

    .post-type-archive-rw_testimonials .rw-masonry-grid-container article {
        padding: 0 15px 30px;
    }
}

@media (min-width: 768px) {
    .archive.post-type-archive-rw_testimonials .rw-masonry-grid-container article {
        padding: 0 15px 30px;
    }
}


/* ===== RW CAROUSEL SHORTCODE ===== */

.rw-testimonial-wrapper--carousel .bx-wrapper {
    box-shadow: none !important;
    border: none !important;
    background: transparent;
}

.rw-testimonial-carousel .rw-review {
    background-color: var(--rw-white);
    border: 1px solid var(--rw-gray-200);
    border-radius: var(--rw-carousel-card-radius);
    height: 332px;
    padding-top: 1px;
}

.rw-testimonial-carousel .rw-review-header {
    display: flex;
    width: 100%;
    padding: 32px 32px 0;
}

.rw-testimonial-carousel .rw-review-header i.fa-star {
    color: var(--rw-orange);
}

.rw-testimonial-carousel .rw-review-header .rw-source-icon {
    position: absolute;
    top: 20px;
    right: 25px;
    height: 30px;
    background-color: var(--rw-white);
}

.rw-testimonial-carousel .rw-review-content {
    height: 160px;
    position: static;
    overflow: auto;
    text-align: left;
    font-size: 15px;
    line-height: 1.7;
    margin: 10px 17px 10px 32px;
    padding-right: 15px;
}

/* Review bodies keep their paragraphs. The content box is a fixed 160px
   scrolling area, so default browser <p> margins read as loose inside it. */
.rw-testimonial-carousel .rw-review-text p {
    margin: 0 0 0.85em;
}

.rw-testimonial-carousel .rw-review-text p:last-child {
    margin-bottom: 0;
}

.rw-testimonial-carousel .rw-review-content::-webkit-scrollbar {
    width: 4px !important;
    margin-right: 10px;
}

.rw-testimonial-carousel .rw-review-content::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3) !important;
    border-radius: 4px !important;
}

.rw-testimonial-carousel .rw-review-content::-webkit-scrollbar-thumb {
    border-radius: 10px !important;
    background: var(--rw-gray-light) !important;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5) !important;
}

.rw-testimonial-carousel .rw-review-content::-webkit-scrollbar-thumb:window-inactive {
    background: var(--rw-gray-light) !important;
}

.rw-testimonial-carousel .rw-stars {
    display: inline-block;
    margin-right: 10px;
}

.rw-testimonial-carousel .rw-review-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 0 32px 32px;
}

.rw-testimonial-carousel .rw-review-footer .testimonial-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--rw-blue), var(--rw-blue-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rw-font-display);
    font-weight: 700;
    font-size: 16px;
    color: var(--rw-white);
}

.rw-testimonial-carousel .rw-review-footer .rw-reviewer-info {
    display: flex;
    flex-direction: column;
}

.rw-testimonial-carousel .rw-review-footer .testimonial-name {
    font-weight: 700;
    color: var(--rw-navy);
    line-height: 1.2;
}

.rw-testimonial-carousel .rw-review-footer .testimonial-role {
    font-size: 13px;
    color: var(--rw-gray);
    line-height: 1.2;
}

/* Carousel pager dots */
.rw-testimonial-carousel .bx-wrapper .bx-pager.bx-default-pager a {
    background: var(--rw-gray-200);
}

.rw-testimonial-carousel .bx-wrapper .bx-pager.bx-default-pager a.active,
.rw-testimonial-carousel .bx-wrapper .bx-pager.bx-default-pager a:focus,
.rw-testimonial-carousel .bx-wrapper .bx-pager.bx-default-pager a:hover {
    background: var(--rw-orange);
}