/* ========================================
   Review section and grid
   ======================================== */

.ig-reviews {
    --ig-gold: #b99b6b;
    --ig-bronze: #796344;
    --ig-charcoal: #262d30;

    box-sizing: border-box;
    max-width: 1480px;
    margin: 64px auto;
    padding: 0 24px;
    color: var(--ig-charcoal);
    font-family: Arial, Helvetica, sans-serif;
}

.ig-reviews *,
.ig-reviews *::before,
.ig-reviews *::after {
    box-sizing: border-box;
}

.ig-reviews__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 23px;
}

.ig-reviews__grid::before,
.ig-reviews__grid::after {
    content: none;
    display: none;
}

.ig-reviews__swipe-hint {
    display: none;
}


/* ========================================
   Review card
   ======================================== */

.ig-reviews .ig-review {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 28px 25px;
    background: #f8f8f7;
    border: 1px solid #e3e3df;
}


/* ========================================
   Reviewer details
   ======================================== */

.ig-reviews .ig-review__person {
    order: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 0 36px 16px 0;
    border: 0;
}

.ig-review__avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    overflow: hidden;
    border-radius: 50%;
    background: #eae5da;
    color: var(--ig-bronze);
    font: 14px Georgia, serif;
}

.ig-review__avatar img {
    display: block;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.ig-review__name {
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ig-review__source {
    display: block;
    margin-top: 5px;
    color: #727971;
    font-size: 10px;
    font-weight: 400;
}


/* ========================================
   Stars, date and Google logo
   ======================================== */

.ig-reviews .ig-review__top {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ig-review__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
}

.ig-review__stars {
    color: #b4945e;
    font-size: 16px;
    letter-spacing: 3px;
}

.ig-review__date {
    color: #727971;
    font: 400 12px/1.5 Arial, Helvetica, sans-serif;
}

.ig-reviews .ig-review__google-logo {
    position: absolute;
    top: 28px;
    right: 25px;
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}


/* ========================================
   Review text and More / Less button
   ======================================== */

.ig-reviews .ig-review__content {
    order: 3;
    margin: 16px 0 0;
}

/* Full text stays visible when JavaScript is unavailable. */
.ig-reviews .ig-review .ig-review__copy {
    margin: 0;
    color: var(--ig-charcoal);
    font: 400 20px/1.5 Georgia, "Times New Roman", serif;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

/* Reserve four lines on desktop and tablet. */
.ig-reviews .ig-review--ready .ig-review__copy {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    min-height: 6em;
    overflow: hidden;
}

.ig-reviews .ig-review--expanded .ig-review__copy {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.ig-review__toggle {
    display: block;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ig-bronze);
    font: 600 14px/1.5 Arial, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.ig-review__toggle[hidden] {
    display: none;
}

.ig-review__toggle:focus-visible {
    outline: 2px solid var(--ig-bronze);
    outline-offset: 4px;
}


/* ========================================
   Tablet: two columns
   ======================================== */

@media (max-width: 1050px) {
    .ig-reviews__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ========================================
   Mobile: one swipeable card at a time
   ======================================== */

@media (max-width: 600px) {
    .ig-reviews {
        margin: 40px auto;
        padding: 0 22px;
    }

    .ig-reviews__grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 100%;
        align-items: start;
        gap: 16px;
        padding-bottom: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--ig-gold) #eee;
    }

    .ig-reviews__grid > .ig-review {
        width: 100%;
        height: auto;
        margin: 0;
        scroll-snap-align: start;
    }

    .ig-reviews .ig-review--ready .ig-review__copy {
        min-height: 0;
    }

    .ig-reviews__swipe-hint {
        display: block;
        margin: 12px 0 0;
        color: var(--ig-bronze);
        font: 14px/1.5 Arial, sans-serif;
        text-align: center;
    }
}