/* ==========================================================================
   Google Reviews for Elementor — front-end styles
   Scoped to .grw to avoid theme collisions. Mobile-first, fluid.
   ========================================================================== */

.grw, .grw *, .grw *::before, .grw *::after { box-sizing: border-box; }
.grw { font-family: Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; color: #202124; line-height: 1.5; }
.grw a { text-decoration: none; }
.grw-error { padding: 12px 16px; background: #fdecea; border: 1px solid #f5c2c0; color: #b32d2e; border-radius: 6px; }
.grw-empty { padding: 24px; text-align: center; color: #5f6368; }

/* --- Stars --- */
.grw-stars { display: inline-flex; gap: 2px; line-height: 0; vertical-align: middle; }
.grw-star { width: var(--grw-star-size, 16px); height: var(--grw-star-size, 16px); display: inline-block; }
.grw-star--full { fill: #fbbc04; }
.grw-star--empty { fill: #e0e0e0; }
.grw-star--half { fill: #fbbc04; }

/* --- Avatar --- */
.grw-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.grw-avatar--initial { color: #fff; font-weight: 500; text-transform: uppercase; }

/* --- Google G --- */
.grw-google-g { width: 22px; height: 22px; flex-shrink: 0; }

/* --- Shared card --- */
.grw-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.grw-card__head { display: flex; align-items: center; gap: 12px; }
.grw-card__meta { flex: 1; min-width: 0; }
.grw-card__name { font-weight: 500; color: #202124; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grw-card__date { font-size: 13px; color: #5f6368; }
.grw-card__google { display: inline-flex; }
.grw-card__google .grw-google-g { width: 18px; height: 18px; }

.grw-card__body { position: relative; }
.grw-card__text {
    margin: 0;
    color: #3c4043;
    font-size: 15px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.grw-card__text.is-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
}

/* --- Read more button --- */
/* Base — shared reset */
.grw-card__more {
    background: none;
    border: 0;
    padding: 0;
    margin-top: 6px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.grw-card__more-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform .2s ease;
}
.grw-card__more.is-expanded .grw-card__more-icon { transform: rotate(180deg); }

/* Variant: link (default — clean Google-style underlined link) */
.grw-card__more--link {
    color: #5f6368;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.grw-card__more--link:hover { color: #1a73e8; }
.grw-card__more--link .grw-card__more-icon { display: none; }

/* Variant: chip (pill button) */
.grw-card__more--chip {
    padding: 5px 10px 5px 12px;
    border: 1px solid #dadce0;
    border-radius: 999px;
    color: #1a73e8;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}
.grw-card__more--chip:hover {
    background: #f8f9fa;
}

/* ==========================================================================
   Design 1 — Header bar + horizontal SLIDER (always — never wraps)
   ========================================================================== */
.grw--design-1 { width: 100%; --grw-gap: 16px; }

.grw--design-1 .grw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.grw--design-1 .grw-header__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grw--design-1 .grw-header__word { font-weight: 500; color: #202124; }
.grw--design-1 .grw-header__rating { font-weight: 600; color: #202124; }
.grw--design-1 .grw-header__sep { color: #dadce0; }
.grw--design-1 .grw-header__count { color: #5f6368; }
.grw--design-1 .grw-header__cta {
    padding: 9px 18px;
    border: 1px solid #dadce0;
    border-radius: 999px;
    color: #202124;
    font-weight: 500;
    transition: background .15s ease, border-color .15s ease;
}
.grw--design-1 .grw-header__cta:hover { background: #f8f9fa; border-color: #c5c8cc; }

/* --- Slider ---
   Approach: track is display:flex with margin-right gaps (NOT `gap`),
   slides use width: calc(...) (NOT flex-basis) for max browser/Elementor compatibility.
   Slider is FULL WIDTH (matches the header bar). Arrows float on top of the edges.
*/
.grw-slider {
    position: relative;
    box-sizing: border-box;
}
.grw-slider__viewport {
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    /* a little vertical breathing room so card box-shadows don't clip */
    padding: 6px 0 14px;
}
.grw-slider__track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    transition: transform .4s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
    margin: 0;
    padding: 0;
    list-style: none;
}
.grw-slider__slide {
    flex: 0 0 auto;
    width: calc((100% - 16px * 3) / 4);
    margin-right: 16px;
    min-width: 0;
    box-sizing: border-box;
    display: flex; /* let the inner card stretch to slide height */
}
.grw-slider__slide:last-child { margin-right: 0; }
.grw-slider__slide > .grw-card { flex: 1; }

/* Responsive visible counts — recompute width per breakpoint. */
@media (max-width: 1100px) {
    .grw-slider__slide { width: calc((100% - 16px * 2) / 3); }
}
@media (max-width: 820px) {
    .grw-slider__slide { width: calc((100% - 16px) / 2); }
}
@media (max-width: 540px) {
    /* hide the summary banner on mobile when opted in */
    .grw--no-header-mobile .grw-header { display: none !important; }

    .grw-slider__slide {
        /* one card visible on phones, with a small peek of the next */
        width: calc(100% - 12px);
        margin-right: 12px;
    }
    /* Smaller nav arrows on phones, sit just inside the card edges */
    .grw-slider__nav {
        width: 32px;
        height: 32px;
    }
    .grw-slider__nav svg { width: 18px; height: 18px; }
    .grw-slider__nav--prev { left: 4px; }
    .grw-slider__nav--next { right: 4px; }
}

.grw-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid #dadce0;
    background: #fff;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #5f6368;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, color .15s ease, opacity .15s ease, transform .15s ease;
}
.grw-slider__nav svg { width: 20px; height: 20px; fill: currentColor; }
.grw-slider__nav:hover {
    color: #1a73e8;
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}
.grw-slider__nav[disabled] { opacity: 0; pointer-events: none; }
.grw-slider__nav--prev { left: -10px; }
.grw-slider__nav--next { right: -10px; }

.grw-slider__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}
.grw-slider__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #dadce0;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.grw-slider__dot.is-active { background: #1a73e8; transform: scale(1.2); }

/* ==========================================================================
   Design 2 — Grid with summary banner
   ========================================================================== */
.grw--design-2 .grw-summary {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid #e8eaed;
    border-radius: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.grw--design-2 .grw-summary__big { font-size: 48px; font-weight: 700; line-height: 1; color: #202124; }
.grw--design-2 .grw-summary__meta { flex: 1; min-width: 200px; }
.grw--design-2 .grw-summary__count { color: #5f6368; margin-top: 4px; font-size: 14px; }
.grw--design-2 .grw-summary__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1a73e8;
    color: #fff;
    border-radius: 8px;
    font-weight: 500;
    transition: background .15s ease;
}
.grw--design-2 .grw-summary__cta:hover { background: #1765c1; }
.grw--design-2 .grw-summary__cta .grw-google-g { background: #fff; padding: 3px; border-radius: 50%; width: 24px; height: 24px; }

.grw--design-2 .grw-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ==========================================================================
   Design 3 — Carousel (legacy — uses old markup)
   ========================================================================== */
.grw--design-3 .grw-header {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    background: #fff; border-radius: 10px; border: 1px solid #e8eaed; margin-bottom: 18px;
}
.grw--design-3 .grw-header__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grw--design-3 .grw-carousel { position: relative; overflow: hidden; }
.grw--design-3 .grw-carousel__track { display: flex; gap: 18px; transition: transform .35s ease; }
.grw--design-3 .grw-carousel__slide {
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 0;
}
@media (max-width: 900px) { .grw--design-3 .grw-carousel__slide { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 600px) { .grw--design-3 .grw-carousel__slide { flex-basis: 100%; } }

.grw--design-3 .grw-carousel__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid #dadce0; background: #fff;
    cursor: pointer; z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    color: #5f6368; font-size: 14px;
}
.grw--design-3 .grw-carousel__nav:hover { color: #1a73e8; }
.grw--design-3 .grw-carousel__nav--prev { left: -8px; }
.grw--design-3 .grw-carousel__nav--next { right: -8px; }

/* ==========================================================================
   Design 4 — Simple list
   ========================================================================== */
.grw--design-4 .grw-list-head { margin-bottom: 18px; }
.grw--design-4 .grw-list-head__title { margin: 0 0 6px; font-size: 22px; }
.grw--design-4 .grw-list-head__meta { display: flex; gap: 10px; align-items: center; color: #5f6368; }
.grw--design-4 .grw-list { list-style: none; padding: 0; margin: 0; }
.grw--design-4 .grw-list__item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e8eaed; }
.grw--design-4 .grw-list__item:last-child { border-bottom: 0; }
.grw--design-4 .grw-list__body { flex: 1; min-width: 0; }
.grw--design-4 .grw-list__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }

/* ==========================================================================
   Design 5 — Floating badge
   ========================================================================== */
.grw--design-5 {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: #fff;
    border: 1px solid #e8eaed; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.grw--design-5:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.grw--design-5 .grw-google-g { width: 26px; height: 26px; }
.grw-badge__body { display: flex; flex-direction: column; }
.grw-badge__row { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.grw-badge__body small { color: #5f6368; font-size: 12px; }
