/* =========================================================
   S-TECH GOOGLE REVIEWS
   COMPACT + CAROUSEL + GRID
   ========================================================= */


.stech-google-reviews {

    --stech-review-bg: #ffffff;
    --stech-review-text: #202124;
    --stech-review-muted: #6b7280;
    --stech-review-border: #e5e7eb;
    --stech-review-star: #fbbc04;
    --stech-review-button: #1a73e8;
    --stech-review-button-hover: #1557b0;
    --stech-review-surface: #f8fafc;

    width: 100%;

    position: relative;

    color:
        var(--stech-review-text);

    box-sizing: border-box;
}


.stech-google-reviews *,
.stech-google-reviews *::before,
.stech-google-reviews *::after {

    box-sizing: border-box;
}


/* =========================================================
   TITLE
   ========================================================= */


.stech-reviews-heading {

    margin-bottom: 24px;
}


.stech-reviews-title {

    margin: 0;

    font-size:
        clamp(
            30px,
            4vw,
            46px
        );

    line-height: 1.12;

    font-weight: inherit;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */


.stech-reviews-main {

    display: block;

    width: 100%;
}


.stech-reviews-content {

    min-width: 0;
}


/* =========================================================
   SUMMARY
   ========================================================= */


.stech-reviews-summary {

    margin-bottom: 26px;
}


.stech-business-name {

    margin-bottom: 8px;

    font-size: 18px;

    font-weight: 700;

    line-height: 1.35;
}


.stech-summary-rating {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 6px;
}


.stech-overall-rating {

    font-size: 20px;

    font-weight: 700;
}


.stech-overall-stars {

    display: inline-flex;

    gap: 1px;
}


.stech-total-reviews {

    margin-bottom: 10px;

    color:
        var(--stech-review-muted);

    font-size: 14px;
}


.stech-google-maps-brand {

    display: inline-flex;

    margin-bottom: 14px;

    color:
        var(--stech-review-button);

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;
}


.stech-google-maps-brand:hover {

    color:
        var(--stech-review-button-hover);

    text-decoration: underline;
}


/* =========================================================
   STARS
   ========================================================= */


.stech-star {

    color: #d1d5db;

    font-size: 18px;

    line-height: 1;
}


.stech-star-active {

    color:
        var(--stech-review-star);
}


/* =========================================================
   TRACK
   ========================================================= */


.stech-reviews-carousel-wrap {

    position: relative;

    width: 100%;
}


.stech-reviews-track {

    display: flex;

    align-items: stretch;

    gap: 20px;

    overflow-x: auto;

    scroll-snap-type:
        x mandatory;

    scroll-behavior: smooth;

    scrollbar-width: none;

    overscroll-behavior-x:
        contain;

    padding:
        2px 2px 12px;
}


.stech-reviews-track::-webkit-scrollbar {

    display: none;
}


/* =========================================================
   REVIEW CARD BASE
   ========================================================= */


.stech-review-card {

    flex:
        0 0
        calc(
            33.333% - 14px
        );

    min-width: 0;

    background:
        var(--stech-review-bg);

    border:
        1px solid
        var(--stech-review-border);

    border-radius: 16px;

    padding: 20px;

    scroll-snap-align: start;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


.stech-review-card:hover {

    transform:
        translateY(-2px);

    border-color: #d8dde5;

    box-shadow:
        0 10px 26px
        rgba(
            15,
            23,
            42,
            0.06
        );
}


/* =========================================================
   REVIEW HEADER
   ========================================================= */


.stech-review-header {

    display: flex;

    align-items: center;

    gap: 11px;

    margin-bottom: 12px;
}


.stech-review-avatar-link {

    display: inline-flex;

    flex-shrink: 0;
}


.stech-review-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    object-fit: cover;

    background: #f3f4f6;
}


.stech-review-avatar-placeholder {

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 16px;

    font-weight: 700;

    color: #374151;
}


.stech-review-author-meta {

    flex: 1;

    min-width: 0;
}


.stech-review-author {

    display: block;

    overflow: hidden;

    color:
        var(--stech-review-text);

    text-decoration: none;

    text-overflow: ellipsis;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.3;
}


.stech-review-author:hover {

    text-decoration: underline;
}


.stech-review-time {

    margin-top: 2px;

    color:
        var(--stech-review-muted);

    font-size: 12px;

    line-height: 1.3;
}


.stech-review-google-link {

    flex-shrink: 0;

    color:
        var(--stech-review-button);

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;
}


.stech-review-google-link:hover {

    color:
        var(--stech-review-button-hover);

    text-decoration: underline;
}


/* =========================================================
   REVIEW BODY
   ========================================================= */


.stech-review-stars {

    display: flex;

    align-items: center;

    gap: 1px;

    margin-bottom: 11px;
}


.stech-review-stars
.stech-star {

    font-size: 17px;
}


.stech-review-text {

    color:
        var(--stech-review-text);

    font-size: 14px;

    line-height: 1.55;

    overflow-wrap: anywhere;
}


.stech-review-expand {

    display: inline-flex;

    margin-top: 8px;

    padding: 0;

    border: 0;

    appearance: none;

    background: transparent;

    color:
        var(--stech-review-button);

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;
}


.stech-review-expand:hover {

    color:
        var(--stech-review-button-hover);

    text-decoration: underline;
}


/* =========================================================
   BUTTONS
   ========================================================= */


.stech-google-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 40px;

    padding:
        9px 15px;

    border:
        1px solid
        var(--stech-review-button);

    border-radius: 8px;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.stech-write-review {

    background:
        var(--stech-review-button);

    color: #ffffff;
}


.stech-write-review:hover {

    background:
        var(--stech-review-button-hover);

    color: #ffffff;
}


.stech-view-google {

    background: transparent;

    color:
        var(--stech-review-button);
}


.stech-reviews-footer {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    margin-top: 18px;
}


/* =========================================================
   CAROUSEL ARROWS
   ========================================================= */


.stech-carousel-button {

    position: absolute;

    top: 50%;

    transform:
        translateY(-50%);

    z-index: 5;

    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    border:
        1px solid
        var(--stech-review-border);

    border-radius: 50%;

    background: #ffffff;

    color:
        var(--stech-review-text);

    font-family:
        Arial,
        sans-serif;

    font-size: 24px;

    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 6px 18px
        rgba(
            15,
            23,
            42,
            0.10
        );
}


.stech-carousel-button:disabled {

    opacity: 0.25;

    cursor: default;
}


.stech-carousel-prev {

    left: -18px;
}


.stech-carousel-next {

    right: -18px;
}


/* =========================================================
   COMPACT LAYOUT
   ========================================================= */


.stech-google-reviews--compact
.stech-reviews-main {

    display: grid;

    grid-template-columns:
        minmax(180px, 220px)
        minmax(0, 1fr);

    gap: 32px;

    align-items: start;
}


.stech-google-reviews--compact
.stech-reviews-summary {

    margin: 0;

    padding-top: 4px;
}


.stech-google-reviews--compact
.stech-business-name {

    font-size: 17px;
}


.stech-google-reviews--compact
.stech-review-card {

    flex:
        0 0
        calc(
            33.333% - 14px
        );

    min-height: auto;

    padding: 14px 4px 12px;

    border: 0;

    border-radius: 0;

    background: transparent;

    box-shadow: none;

    border-right:
        1px solid
        var(--stech-review-border);
}


.stech-google-reviews--compact
.stech-review-card:last-child {

    border-right: 0;
}


.stech-google-reviews--compact
.stech-review-card:hover {

    transform: none;

    box-shadow: none;
}


.stech-google-reviews--compact
.stech-review-header {

    margin-bottom: 9px;
}


.stech-google-reviews--compact
.stech-review-avatar {

    width: 36px;

    height: 36px;
}


.stech-google-reviews--compact
.stech-review-text {

    font-size: 13.5px;

    line-height: 1.5;
}


.stech-google-reviews--compact
.stech-review-stars {

    margin-bottom: 9px;
}


.stech-google-reviews--compact
.stech-carousel-prev {

    left: -12px;
}


.stech-google-reviews--compact
.stech-carousel-next {

    right: -12px;
}


/* =========================================================
   STANDARD CAROUSEL
   ========================================================= */


.stech-google-reviews--carousel
.stech-review-card {

    min-height: 260px;
}


/* =========================================================
   GRID
   ========================================================= */


.stech-google-reviews--grid
.stech-reviews-track {

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    overflow: visible;

    align-items: stretch;
}


.stech-google-reviews--grid
.stech-review-card {

    width: 100%;

    min-height: 260px;
}


.stech-google-reviews--grid
.stech-carousel-button {

    display: none;
}


/* =========================================================
   STATUS
   ========================================================= */


.stech-reviews-loading,
.stech-reviews-error {

    padding: 14px 0;

    font-size: 13px;
}


.stech-reviews-loading {

    color:
        var(--stech-review-muted);
}


.stech-reviews-error {

    color: #b42318;
}


.stech-no-reviews {

    width: 100%;

    padding: 20px;

    border:
        1px solid
        var(--stech-review-border);

    border-radius: 12px;

    background:
        var(--stech-review-surface);

    color:
        var(--stech-review-muted);
}


/* =========================================================
   TABLET
   ========================================================= */


@media
(max-width: 900px) {


    .stech-review-card {

        flex-basis:
            calc(
                50% - 10px
            );
    }


    .stech-google-reviews--compact
    .stech-reviews-main {

        grid-template-columns:
            1fr;

        gap: 22px;
    }


    .stech-google-reviews--compact
    .stech-reviews-summary {

        display: flex;

        flex-wrap: wrap;

        align-items: center;

        gap: 10px 16px;
    }


    .stech-google-reviews--compact
    .stech-business-name {

        width: 100%;
    }


    .stech-google-reviews--grid
    .stech-reviews-track {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* =========================================================
   MOBILE
   ========================================================= */


@media
(max-width: 600px) {


    .stech-reviews-title {

        font-size: 30px;
    }


    .stech-review-card {

        flex-basis: 88%;

        padding: 16px;
    }


    .stech-google-reviews--compact
    .stech-review-card {

        flex-basis: 88%;

        padding:
            12px 16px;

        border:
            1px solid
            var(--stech-review-border);

        border-radius: 14px;

        background:
            var(--stech-review-bg);
    }


    .stech-google-reviews--compact
    .stech-review-card:last-child {

        border:
            1px solid
            var(--stech-review-border);
    }


    .stech-review-avatar {

        width: 40px;

        height: 40px;
    }


    .stech-carousel-button {

        display: none;
    }


    .stech-google-reviews--grid
    .stech-reviews-track {

        grid-template-columns:
            1fr;
    }


    .stech-google-button {

        width: 100%;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */


@media
(prefers-reduced-motion: reduce) {


    .stech-review-card,
    .stech-google-button {

        transition: none;
    }


    .stech-reviews-track {

        scroll-behavior: auto;
    }

}