/* =========================================================
   KATEGORIA OFERTY — Termo Garaż
   Pełny rytm. Na razie płyta warstwowa.
   ========================================================= */

/* Hero pod przezroczysty header, bez rezerwy w body */
body:has(.tg-catpage__hero) {
    padding-top: 0;
}

.tg-catpage {
    background-color: var(--tg-base);
    color: var(--tg-ink);
}

.tg-catpage__hero,
.tg-catpage__mission,
.tg-catpage__facts,
.tg-catpage__row,
.tg-catpage__bridge,
.tg-catpage__more,
.tg-catpage__cta {
    opacity: 0;
    transform: translateY(14px);
}

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

.tg-catpage.is-in .tg-catpage__mission {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.08s forwards;
}

.tg-catpage.is-in .tg-catpage__facts {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.12s forwards;
}

.tg-catpage.is-in .tg-catpage__row {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.16s forwards;
}

.tg-catpage.is-in .tg-catpage__row--flip {
    animation-delay: 0.22s;
}

.tg-catpage.is-in .tg-catpage__bridge {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.26s forwards;
}

.tg-catpage.is-in .tg-catpage__more {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.3s forwards;
}

.tg-catpage.is-in .tg-catpage__cta {
    animation: tg-rise 0.72s var(--tg-ease-out) 0.34s forwards;
}

/* ——— Hero ——— */

.tg-catpage__hero {
    position: relative;
    display: grid;
    height: clamp(22rem, 50vh, 32rem);
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    background-color: #101010;
    color: #fff;
}

.tg-catpage__photo,
.tg-catpage__scrim,
.tg-catpage__hero-inner {
    grid-area: 1 / 1;
    min-height: 0;
}

.tg-catpage__photo,
.tg-catpage__scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.tg-catpage__photo {
    display: block;
    object-fit: cover;
    object-position: 50% 40%;
}

.tg-catpage__scrim {
    background:
        linear-gradient(180deg, rgba(7, 7, 7, 0.62) 0%, rgba(7, 7, 7, 0.38) 28%, rgba(7, 7, 7, 0.42) 48%, rgba(7, 7, 7, 0.93) 100%);
    pointer-events: none;
}

.tg-catpage__hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: 100%;
    box-sizing: border-box;
    text-align: center;
    padding-block: calc(var(--header-height, 4rem) + clamp(0.5rem, 1.5vh, 0.85rem)) clamp(1.5rem, 3.2vh, 2rem);
}

.tg-catpage__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-catpage__hero .tg-catpage__eyebrow {
    color: rgba(245, 245, 247, 0.72);
}

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

.tg-catpage__hero .tg-catpage__eyebrow::before,
.tg-catpage__hero .tg-catpage__eyebrow::after {
    background-color: rgba(245, 245, 247, 0.35);
}

.tg-catpage__hero .tg-catpage__title {
    margin-bottom: clamp(1.5rem, 3.2vh, 1.85rem);
}

.tg-catpage__title {
    margin: 0 0 1rem;
    max-width: 14em;
    font-size: clamp(2.05rem, 4.4vw, 3.15rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tg-catpage__lead {
    margin: 0 auto 1.75rem;
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.4vw, 1.1875rem);
    line-height: 1.5;
    color: rgba(245, 245, 247, 0.78);
    text-wrap: pretty;
}

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

.tg-catpage__hero .tg-link {
    color: rgba(245, 245, 247, 0.78);
}

.tg-catpage__hero .tg-link:hover,
.tg-catpage__hero .tg-link:focus-visible {
    color: #fff;
}

/* ——— Misja i fakty ——— */

.tg-catpage__mission {
    max-width: 40rem;
    margin: clamp(5.5rem, 11vh, 8rem) auto clamp(3.5rem, 7vh, 4.75rem);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.025em;
    text-align: center;
    text-wrap: pretty;
}

.tg-catpage__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 clamp(5rem, 10vh, 7.5rem);
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--tg-line);
    border-bottom: 1px solid var(--tg-line);
}

.tg-catpage__facts li {
    padding: clamp(1.75rem, 3.8vh, 2.5rem) clamp(1.15rem, 2vw, 1.85rem);
}

.tg-catpage__facts li + li {
    border-left: 1px solid var(--tg-line);
}

.tg-catpage__fact-value {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.tg-catpage__fact-note {
    margin: 0;
    max-width: 16rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--tg-faint);
    transition: color 0.3s var(--tg-ease);
}

.tg-catpage__facts li:hover .tg-catpage__fact-note,
.tg-catpage__facts li:focus-within .tg-catpage__fact-note {
    color: var(--tg-ink);
}

/* ——— Rzędy 50/50 ——— */

.tg-catpage__row {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    margin-bottom: clamp(5rem, 10vh, 7.75rem);
}

.tg-catpage__row--flip {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.tg-catpage__copy {
    max-width: 34rem;
}

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

.tg-catpage__kicker::after {
    content: "";
    width: clamp(1.25rem, 3vw, 2rem);
    height: 1px;
    background-color: var(--tg-line-strong);
}

.tg-catpage__heading {
    margin: 0 0 1.05rem;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.tg-catpage__copy > p:not(.tg-catpage__kicker) {
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--tg-muted);
}

.tg-catpage__copy > p:not(.tg-catpage__kicker):last-of-type {
    margin-bottom: 1.35rem;
}

.tg-catpage__points {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--tg-line);
}

.tg-catpage__points li {
    padding: 0.95rem 0;
    font-size: 1.0625rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--tg-muted);
    border-bottom: 1px solid var(--tg-line);
    transition: color 0.3s var(--tg-ease);
}

.tg-catpage__points li:hover {
    color: var(--tg-ink);
}

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

.tg-catpage__frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: 50% 48%;
    transition: filter 0.45s var(--tg-ease);
}

.tg-catpage__frame:hover img {
    filter: brightness(1.07);
}

.tg-catpage__chips {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none;
}

.tg-catpage__chip {
    margin: 0;
    padding: 0.7rem 0.95rem 0.65rem;
    border-radius: var(--tg-radius);
    background-color: rgba(7, 7, 7, 0.72);
    border: 1px solid rgba(245, 245, 247, 0.14);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    color: var(--tg-ink);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
}

.tg-catpage__chip span {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* ——— Mostek do realizacji ——— */

.tg-catpage__bridge {
    padding-block: clamp(4rem, 8vh, 6rem) clamp(5rem, 10vh, 7.5rem);
}

.tg-catpage__shots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.65rem, 1.2vw, 1rem);
    margin-bottom: clamp(2.25rem, 5vh, 3.25rem);
}

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

.tg-catpage__shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: filter 0.45s var(--tg-ease);
}

.tg-catpage__shot:hover img {
    filter: brightness(1.07);
}

.tg-catpage__bridge-copy {
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
}

.tg-catpage__bridge-copy p {
    margin: 0 auto 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--tg-muted);
}

/* ——— Pozostałe konstrukcje ——— */

.tg-catpage__more {
    padding-block: clamp(1.5rem, 3.5vh, 2.5rem) clamp(4.5rem, 9vh, 7rem);
}

.tg-catpage__more-head {
    max-width: 34rem;
    margin: 0 auto clamp(2.5rem, 5.5vh, 3.75rem);
    text-align: center;
}

.tg-catpage__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.4vw, 2.25rem);
}

.tg-catpage__card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

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

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

.tg-catpage__card-body {
    padding: 1.25rem 0.85rem 0.35rem;
    border-radius: var(--tg-radius);
}

.tg-catpage__card-name {
    margin: 0 0 0.45rem;
    font-size: clamp(1.2rem, 1.7vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--tg-muted);
    transition: color 0.35s var(--tg-ease);
}

.tg-catpage__card-body p {
    margin: 0;
    font-size: 0.975rem;
    line-height: 1.55;
    color: var(--tg-muted);
}

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

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

/* ——— CTA ——— */

.tg-catpage__cta {
    padding-block: clamp(2rem, 4.5vh, 3rem) clamp(5rem, 10vh, 8rem);
}

.tg-catpage__cta .adcore-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;
}

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

@media (max-width: 1200px) {
    .tg-catpage__title {
        font-size: clamp(2rem, 4.4vw, 3rem);
    }
}

@media (max-width: 1023px) {
    .tg-catpage__card-name {
        color: var(--tg-ink);
        transition: none;
    }

    .tg-catpage__hero {
        height: auto;
        min-height: clamp(22rem, 50vh, 32rem);
    }

    .tg-catpage__scrim {
        background:
            linear-gradient(
                180deg,
                rgba(7, 7, 7, 0.74) 0%,
                rgba(7, 7, 7, 0.46) 24%,
                rgba(7, 7, 7, 0.58) 52%,
                rgba(7, 7, 7, 0.98) 100%
            );
    }

    .tg-catpage__hero-inner {
        justify-content: center;
        padding-block: calc(var(--header-height, 4rem) + 0.5rem) 1.5rem;
    }

    .tg-catpage__mission {
        margin: clamp(4.25rem, 8vh, 6rem) auto clamp(2.75rem, 5.5vh, 3.5rem);
    }

    .tg-catpage__facts {
        margin-bottom: clamp(4rem, 8vh, 5.75rem);
    }

    .tg-catpage__row {
        margin-bottom: clamp(4rem, 8vh, 6rem);
    }

    .tg-catpage__bridge {
        padding-block: clamp(3.25rem, 6.5vh, 4.75rem) clamp(4rem, 8vh, 6rem);
    }

    .tg-catpage__more {
        padding-block: clamp(1.25rem, 3vh, 2rem) clamp(3.75rem, 7.5vh, 5.5rem);
    }

    .tg-catpage__cta {
        padding-block: clamp(1.5rem, 3.5vh, 2.25rem) clamp(4.25rem, 8vh, 6.5rem);
    }

    .tg-catpage__row,
    .tg-catpage__row--flip {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .tg-catpage__row--flip .tg-catpage__frame {
        order: -1;
    }

    .tg-catpage__facts {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tg-catpage__facts li,
    .tg-catpage__facts li + li {
        padding: 1.2rem 0;
        border-left: 0;
    }

    .tg-catpage__facts li + li {
        border-top: 1px solid var(--tg-line);
    }

    .tg-catpage__fact-note {
        max-width: 22rem;
        margin-inline: auto;
    }

    .tg-catpage__shots {
        grid-template-columns: 1fr;
    }

    .tg-catpage__shot:nth-child(n + 2) {
        display: none;
    }
}

@media (max-width: 767px) {
    .tg-catpage__hero-inner {
        align-items: center;
        justify-content: center;
        padding-block: calc(var(--header-height, 4rem) + 0.45rem) 1.35rem;
    }

    .tg-catpage__title {
        font-size: 1.75rem;
        max-width: none;
    }

    .tg-catpage__hero .tg-catpage__title {
        margin-bottom: 1.4rem;
    }

    .tg-catpage__lead {
        font-size: 0.975rem;
    }

    .tg-catpage__actions,
    .tg-catpage__cta .adcore-wrap,
    .tg-catpage__bridge-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tg-catpage .tg-btn {
        width: max-content;
        max-width: 100%;
    }

    .tg-catpage__actions .tg-link,
    .tg-catpage__cta .tg-link {
        justify-content: center;
    }

    .tg-catpage__mission {
        font-size: 1.2rem;
        margin: 5.5rem auto 3.5rem;
    }

    .tg-catpage__facts {
        margin-bottom: 5rem;
    }

    .tg-catpage__facts li,
    .tg-catpage__facts li + li {
        padding: 1.5rem 0;
    }

    .tg-catpage__row {
        margin-bottom: 5.5rem;
        gap: 2.25rem;
    }

    .tg-catpage__bridge {
        padding-block: 4.25rem 5rem;
    }

    .tg-catpage__shots {
        margin-bottom: 2.5rem;
    }

    .tg-catpage__more {
        padding-block: 2rem 5rem;
    }

    .tg-catpage__more-head {
        margin-bottom: 2.5rem;
    }

    .tg-catpage__frame,
    .tg-catpage__shot,
    .tg-catpage__card-media {
        border-radius: var(--tg-radius);
    }

    .tg-catpage__chips {
        position: absolute;
        top: auto;
        right: auto;
        bottom: 0.85rem;
        left: 0.85rem;
        flex-direction: row;
        margin-top: 0;
        pointer-events: none;
    }

    .tg-catpage__chip {
        padding: 0.55rem 0.75rem 0.5rem;
    }

    .tg-catpage__chip span {
        font-size: 1.15rem;
    }

    .tg-catpage__cards {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .tg-catpage__heading {
        font-size: 1.5rem;
    }

    .tg-catpage__cta {
        padding-block: 2.25rem 5.25rem;
    }
}

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

    .tg-catpage__copy > p:not(.tg-catpage__kicker),
    .tg-catpage__points li {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-catpage__hero,
    .tg-catpage__mission,
    .tg-catpage__facts,
    .tg-catpage__row,
    .tg-catpage__bridge,
    .tg-catpage__more,
    .tg-catpage__cta,
    .tg-catpage.is-in .tg-catpage__hero,
    .tg-catpage.is-in .tg-catpage__mission,
    .tg-catpage.is-in .tg-catpage__facts,
    .tg-catpage.is-in .tg-catpage__row,
    .tg-catpage.is-in .tg-catpage__bridge,
    .tg-catpage.is-in .tg-catpage__more,
    .tg-catpage.is-in .tg-catpage__cta {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .tg-catpage__frame img,
    .tg-catpage__shot img,
    .tg-catpage__card-name {
        transition: none;
    }
}
