/* =========================================================
   OPINIE — Termo Garaż
   Chrome tg-. Karty jak dawny Trustindex (shell, hairline, avatar, gwiazdy).
   ========================================================= */

.tg-reviews {
    position: relative;
    background-color: var(--tg-base);
    color: var(--tg-ink);
    padding-block: clamp(4.5rem, 9.5vh, 7.75rem);
    scroll-margin-top: 5.5rem;
}

.tg-reviews__head {
    max-width: 38rem;
    margin: 0 auto clamp(2.5rem, 5.5vh, 4rem);
    text-align: center;
    opacity: 0;
    transform: translateY(14px);
}

.tg-reviews.is-in .tg-reviews__head {
    animation: tg-rise 0.72s var(--tg-ease-out) forwards;
}

.tg-reviews__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin: 0 0 1.1rem;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tg-faint);
}

.tg-reviews__eyebrow::before,
.tg-reviews__eyebrow::after {
    content: "";
    width: clamp(1.5rem, 4vw, 2.5rem);
    height: 1px;
    background-color: var(--tg-line-strong);
}

.tg-reviews__title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tg-reviews__lead {
    margin: 0 auto;
    max-width: 32rem;
    font-size: clamp(1.05rem, 1.4vw, 1.1875rem);
    line-height: 1.5;
    color: var(--tg-muted);
    text-wrap: pretty;
}

.tg-reviews__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.tg-reviews__card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 15.5rem;
    min-width: 0;
    padding: 1.5rem;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 58%),
        #121212;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    color: var(--tg-muted);
    opacity: 0;
    transform: translateY(14px);
    transition: background-color 0.3s var(--tg-ease);
}

.tg-reviews__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.5rem;
    width: 2.5rem;
    height: 2px;
    background: var(--tg-accent);
}

.tg-reviews.is-in .tg-reviews__card:nth-child(1) {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.1s forwards;
}

.tg-reviews.is-in .tg-reviews__card:nth-child(2) {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.18s forwards;
}

.tg-reviews.is-in .tg-reviews__card:nth-child(3) {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.26s forwards;
}

.tg-reviews__card:hover,
.tg-reviews__card:focus-within {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 58%),
        #191919;
}

.tg-reviews__who {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 0.85rem;
}

.tg-reviews__avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(225, 29, 46, 0.55);
    border-radius: 50%;
    background: #1c1c1c;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tg-reviews__name {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.tg-reviews__meta {
    margin: 0.15rem 0 0;
    color: var(--tg-muted);
    font-size: 0.72rem;
    line-height: 1.3;
    opacity: 0.78;
}

.tg-reviews__stars {
    display: flex;
    gap: 0.18rem;
    margin: 0.05rem 0 1rem;
}

.tg-reviews__stars svg {
    display: block;
    width: 1rem;
    height: 1rem;
}

.tg-reviews__text {
    margin: 0;
    color: var(--tg-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.tg-reviews__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-top: clamp(2rem, 4vh, 2.75rem);
    opacity: 0;
    transform: translateY(14px);
}

.tg-reviews.is-in .tg-reviews__actions {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.32s forwards;
}

/* =========================================================
   Breakpointy 1450 / 1201 / 1024 / 768 / 375
   ========================================================= */

@media (max-width: 1200px) {
    .tg-reviews__title {
        font-size: clamp(1.9rem, 4vw, 2.75rem);
    }
}

@media (max-width: 1023px) {
    .tg-reviews {
        padding-block: clamp(3.75rem, 8vh, 6.25rem);
    }

    .tg-reviews__grid {
        gap: 0.9rem;
    }
}

@media (max-width: 767px) {
    .tg-reviews {
        padding-block: clamp(3.15rem, 7vh, 4.75rem);
    }

    .tg-reviews__grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .tg-reviews__card {
        min-height: 15rem;
        padding: 1.25rem;
        border-radius: 10px;
    }

    .tg-reviews__card::before {
        left: 1.25rem;
    }

    .tg-reviews__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tg-reviews__actions .tg-btn,
    .tg-reviews__actions .tg-link {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 479px) {
    .tg-reviews__title {
        font-size: 1.85rem;
    }

    .tg-reviews__lead {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-reviews__head,
    .tg-reviews__card,
    .tg-reviews__actions,
    .tg-reviews.is-in .tg-reviews__head,
    .tg-reviews.is-in .tg-reviews__card,
    .tg-reviews.is-in .tg-reviews__actions {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
