/* =========================================================
   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: 38rem;
    margin: 0 auto clamp(2.5rem, 5.5vh, 4rem);
    text-align: center;
    opacity: 0;
    transform: translateY(14px);
}

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

.tg-offer__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-offer__eyebrow::before,
.tg-offer__eyebrow::after {
    content: "";
    width: clamp(1.5rem, 4vw, 2.5rem);
    height: 1px;
    background-color: var(--tg-line-strong);
}

.tg-offer__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-offer__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;
}

/* ——— Siatka trzech konstrukcji ——— */

.tg-offer__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 2.4vw, 2.5rem);
    align-items: stretch;
}

.tg-offer__card {
    opacity: 0;
    transform: translateY(14px);
    min-width: 0;
}

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

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

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

.tg-offer__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

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

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

.tg-offer__body {
    padding: 1.35rem 1rem 1rem;
    margin-top: 0;
    border-radius: var(--tg-radius);
}

.tg-offer__name {
    margin: 0 0 0.5rem;
    font-size: clamp(1.25rem, 1.8vw, 1.625rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--tg-muted);
    transition: color 0.35s var(--tg-ease);
}

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

.tg-offer__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--tg-muted);
}

.tg-offer__cta svg {
    width: 0.8rem;
    height: 0.8rem;
    display: block;
}

@media (min-width: 1024px) {
    .tg-offer__link:hover .tg-offer__name,
    .tg-offer__link:focus-visible .tg-offer__name {
        color: var(--tg-ink);
    }
}

.tg-offer__link:focus-visible {
    outline: 2px solid var(--tg-accent);
    outline-offset: 6px;
    border-radius: var(--tg-radius);
}

/* =========================================================
   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: clamp(1.05rem, 1.4vw, 1.1875rem);
    line-height: 1.5;
    color: var(--tg-muted);
    text-wrap: pretty;
}

.tg-cat__text {
    margin: 0 0 1rem;
    font-size: 1rem;
    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__name {
        color: var(--tg-ink);
        transition: none;
    }

    .tg-offer__grid {
        gap: 1.25rem;
    }

    .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__grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .tg-offer__media,
    .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 {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .tg-offer__name {
        transition: none;
    }
}
