/* =========================================================
   OFERTA — Termo Garaż
   Hub trzech konstrukcji na home + cienka podstrona kategorii.
   ========================================================= */

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

.tg-offer__head {
    max-width: min(100%, 58rem);
    margin: 0 auto clamp(2.25rem, 5vh, 3.25rem);
    padding-inline: clamp(0rem, 2vw, 1rem);
    text-align: center;
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition:
        opacity 0.72s var(--tg-ease-out),
        transform 0.72s var(--tg-ease-out);
    will-change: opacity, transform;
}

.tg-offer.is-in .tg-offer__head {
    opacity: 1;
    transform: none;
}

.tg-offer__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tg-offer__lead {
    margin: 0;
    max-width: 40rem;
    font-size: var(--tg-fs-lead);
    line-height: 1.55;
    color: var(--tg-muted);
    text-wrap: pretty;
}

/* ——— Trzy garaże, potem cztery konstrukcje ——— */

.tg-offer__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.15rem;
    align-items: stretch;
}

.tg-offer__card {
    grid-column: span 4;
}

.tg-offer__card:nth-child(n + 4) {
    grid-column: span 3;
}

.tg-offer__card {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    min-width: 0;
    transition:
        opacity 0.72s var(--tg-ease-out),
        transform 0.72s var(--tg-ease-out);
    will-change: opacity, transform;
}

.tg-offer.is-in .tg-offer__card {
    opacity: 1;
    transform: none;
}

.tg-offer.is-in .tg-offer__card:nth-child(1) {
    transition-delay: 0.1s;
}

.tg-offer.is-in .tg-offer__card:nth-child(2) {
    transition-delay: 0.18s;
}

.tg-offer.is-in .tg-offer__card:nth-child(3) {
    transition-delay: 0.26s;
}

.tg-offer.is-in .tg-offer__card:nth-child(4) {
    transition-delay: 0.34s;
}

.tg-offer.is-in .tg-offer__card:nth-child(5) {
    transition-delay: 0.42s;
}

.tg-offer.is-in .tg-offer__card:nth-child(6) {
    transition-delay: 0.5s;
}

.tg-offer.is-in .tg-offer__card:nth-child(7) {
    transition-delay: 0.58s;
}

.tg-offer__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.35rem 1.25rem 1.25rem;
    border: 1px solid rgba(46, 54, 62, 0.12);
    border-radius: 10px;
    background: #fff;
}

.tg-offer__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(17, 98, 144, 0.28);
    border-radius: 11px;
    color: var(--tg-accent);
}

.tg-offer__icon svg {
    width: 2rem;
    height: 2rem;
    display: block;
}

.tg-offer__name {
    margin: 0 0 0.55rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--tg-ink);
}

.tg-offer__text {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--tg-muted);
}

.tg-offer__points {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0 0 1.35rem;
    padding: 0;
    list-style: none;
}

.tg-offer__points li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--tg-ink);
}

.tg-offer__points svg {
    flex-shrink: 0;
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.12rem;
    color: var(--tg-accent);
}

.tg-offer__btn {
    width: 100%;
    margin-top: auto;
}

/* =========================================================
   Podstrona kategorii
   ========================================================= */

.tg-cat {
    position: relative;
    background-color: var(--tg-base);
    color: var(--tg-ink);
    padding-block: clamp(3.75rem, 8.5vh, 6.25rem) clamp(4.5rem, 10vh, 7.5rem);
}

.tg-cat__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.tg-cat__copy {
    max-width: 36rem;
}

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

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

.tg-cat__title {
    margin: 0 0 1.15rem;
    font-size: clamp(2.15rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tg-cat__lead {
    margin: 0 0 1.25rem;
    font-size: var(--tg-fs-lead);
    line-height: 1.5;
    color: var(--tg-muted);
    text-wrap: pretty;
}

.tg-cat__text {
    margin: 0 0 1rem;
    font-size: var(--tg-fs-body);
    line-height: 1.6;
    color: var(--tg-muted);
}

.tg-cat__text:last-of-type {
    margin-bottom: 1.75rem;
}

.tg-cat__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.tg-cat__media {
    margin: 0;
    overflow: hidden;
    border-radius: var(--tg-radius-lg);
    background-color: var(--tg-surface);
}

.tg-cat__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 55%;
}

.tg-cat--text .tg-cat__grid {
    grid-template-columns: minmax(0, 38rem);
}

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

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

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

    .tg-offer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .tg-offer__card,
    .tg-offer__card:nth-child(n + 4) {
        grid-column: auto;
    }

    .tg-cat__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tg-cat__media {
        order: -1;
    }
}

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

    .tg-offer__head {
        margin-inline: auto;
        text-align: center;
    }

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

    .tg-offer__card {
        align-items: center;
        text-align: center;
    }

    .tg-offer__points {
        align-items: center;
    }

    .tg-offer__points li {
        justify-content: center;
    }

    .tg-offer__card,
    .tg-offer__card:nth-child(n + 4) {
        grid-column: auto;
    }

    .tg-cat__media {
        border-radius: var(--tg-radius);
    }

    .tg-cat {
        padding-block: clamp(2.75rem, 6.5vh, 4rem) clamp(3.5rem, 8vh, 5.5rem);
        text-align: left;
    }

    .tg-cat__actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-offer__head,
    .tg-offer__card,
    .tg-offer.is-in .tg-offer__head,
    .tg-offer.is-in .tg-offer__card {
        transition: none;
        opacity: 1;
        transform: none;
        will-change: auto;
    }

    .tg-offer__name {
        transition: none;
    }
}
