/* Give the service and gasification photographs the same moving grain and blue veil. */
.item-service-block > .page-title-box:has(> .firstscreen-img img) > .firstscreen-img::after {
    content: "";
    position: absolute;
    inset: -12%;
    background: url("/media/teplo-motion-20261114/grain.png") repeat;
    opacity: .08;
    animation: tg-grain .35s steps(1, end) infinite;
    pointer-events: none;
}

.item-service-block > .page-title-box:has(> .firstscreen-img img)::before {
    background: linear-gradient(90deg, #101d37ed, #101d37a6 60%, #101d3773);
}

/* These two originals already contain the blue grade from the approved mockups. */
.item-service-block > .page-title-box:has(> .firstscreen-img img[src*="/hero-refine-20261114/"])::before {
    background: linear-gradient(90deg, #101d37e0, #101d378c 60%, #101d3747);
}

.item-service-block #tabulator-service .workcycles {
    padding-block: 0;
}

.item-service-block #tabulator-service .workcycles > .container {
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

.item-service-block #tabulator-service > .container > .page-header {
    margin-bottom: clamp(24px, 2.5vw, 44px);
}

.item-service-block #tabulator-service .workcycle-text .description {
    font-size: clamp(16px, 1.04vw, 24px);
    line-height: 1.7;
    max-width: 66ch;
}

.item-service-block #tabulator-service .workcycle-text .description p {
    margin: 0;
}

.item-service-block #tabulator-service .workcycle-text .description p + p {
    margin-top: 1em;
}

@media (min-width: 768px) {
    .item-service-block #tabulator-service .service_tabs .tabs_titles {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(130px, 11vw, 225px)), 1fr));
        align-items: start;
        gap: clamp(16px, 2vw, 48px);
        margin-bottom: clamp(28px, 3.2vw, 70px);
    }

    body .item-service-block #tabulator-service .service_tabs .tab_title {
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0 0 8px;
        font-size: clamp(16px, 1.15vw, 24px);
        line-height: 1.32;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

    body .item-service-block #tabulator-service .workcycles .tab_title::before {
        content: counter(heading, decimal-leading-zero);
        position: static;
        display: block;
        margin-bottom: .3em;
        color: #b1bed2;
        font-size: clamp(26px, 2.08vw, 48px);
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    body .item-service-block #tabulator-service .workcycles .tab_title.active::before {
        color: #6cd3ff;
    }

    .item-service-block #tabulator-service .workcycles .tab_title::after {
        display: none;
    }

    .item-service-block #tabulator-service .workcycles .tab_title:focus-visible {
        outline: 2px solid #6cd3ff;
        outline-offset: 4px;
    }

    .item-service-block #tabulator-service .tabs_contents_workcycles .row {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: center;
        gap: clamp(24px, 4vw, 80px);
        margin-inline: 0;
    }

    .item-service-block #tabulator-service :is(.workcycle-img, .workcycle-text) {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .item-service-block #tabulator-service .workcycle-img img {
        position: static;
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .item-service-block #tabulator-service .service_tabs .tabs_titles {
        width: 88%;
    }
}

@media (max-width: 767.98px) {
    .item-service-block > .page-title-box:has(> .firstscreen-img img)::before {
        background: #101d37c2;
    }

    .item-service-block > .page-title-box:has(> .firstscreen-img img[src*="/hero-refine-20261114/"])::before {
        background: #101d37b8;
    }

    .item-service-block #tabulator-service .workcycle-img {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .item-service-block > .page-title-box:has(> .firstscreen-img img) > .firstscreen-img::after {
        animation: none;
    }
}
