/* Load after current polish styles. All layout changes are desktop-only. */
@media (min-width: 1024px) {
  /* Normal-flow copy determines the minimum usable height; video fills behind. */
  .item-firstscreen:not(.item-service-block) > .page-title-box {
    --tg-home-hero-min: 600px;
    display: flex;
    align-items: center;
    position: relative;
    height: auto;
    min-height: max(var(--tg-home-hero-min), 100vh);
    min-height: max(var(--tg-home-hero-min), 100svh);
    padding-top: 176px;
    padding-bottom: 48px;
    box-sizing: border-box;
  }
  .item-firstscreen:not(.item-service-block) > .page-title-box > .tg-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none;
  }
  .item-firstscreen:not(.item-service-block) > .page-title-box > .absolute-container {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Service/gas already use flow copy. Keep the current700px floor. */
  .item-service-block > .page-title-box {
    height: auto;
    min-height: max(700px, 100vh) !important;
    min-height: max(700px, 100svh) !important;
  }

  /* A real About hero only: preserve the whole bright flag and15-year copy. */
  .about-us-box > .tg-about-heading:has(.firstscreen-img img) {
    height: auto;
    min-height: max(700px, 100vh) !important;
    min-height: max(700px, 100svh) !important;
    box-sizing: border-box;
  }
  .about-us-box > .tg-about-heading:has(.firstscreen-img img)::before { display: none !important; }
  .about-us-box > .tg-about-heading > .firstscreen-img img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: right center;
    opacity: 1;
    filter: none;
  }

  /* Project: subtract its actual document start, including the flow header and
     article top padding. JS sets this property;132px is the1024px fallback. */
  .tg-project-intro {
    --tg-project-firstscreen-start: 132px;
    display: grid;
    align-items: center;
    height: auto;
    min-height: max(0px, calc(100vh - var(--tg-project-firstscreen-start)));
    min-height: max(0px, calc(100svh - var(--tg-project-firstscreen-start)));
    box-sizing: border-box;
  }
  .tg-project-intro > .container { width: 100%; min-width: 0; }
  /* Keep the existing aspect-ratio/minimum natural image height, never crop. */
  .tg-project-intro .tg-project-hero img,
  .item-project .tg-project-intro .tg-project-hero .item-image img { object-fit: contain; }
}
@media (min-width: 1200px) {
  .item-firstscreen:not(.item-service-block) > .page-title-box { --tg-home-hero-min: 800px; }
  .tg-project-intro { --tg-project-firstscreen-start: 200px; }
}
@media (min-width: 1536px) {
  .item-firstscreen:not(.item-service-block) > .page-title-box { --tg-home-hero-min: 900px; }
}

/* Append after banner/common/layout repairs. No hero, header or JS changes. */

/* The supplied 1920x1000 source already clips the helmet at its top edge.
   Top alignment adds no further top crop. Cover removes the wide-screen seam;
   a proportional minimum leaves the face/neck inside the visible image. */
@media (min-width: 1600px) {
  .advantage-box.tg-advantage-banner {
    background-size: cover;
    background-position: center top;
  }
  .advantage-box.tg-advantage-banner > .container {
    height: auto;
    min-height: max(900px, 39.0625vw);
  }
}

/* Restore the original contact section's type scale instead of the general
   section-heading cap. Keep actual phone/email and the existing popup trigger. */
#always.always-box > .container {
  height: auto;
  min-height: 350px;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 64px;
  box-sizing: border-box;
}
#always.always-box .page-header {
  margin: 0;
  font-size: 60px;
  line-height: 1.2;
  text-transform: uppercase;
  flex: 0 1 auto;
}
#always.always-box .page-header > span { display: block; }
#always.always-box .main-contact-info {
  flex: 0 0 auto;
  max-width: 100%;
  gap: 6px;
  text-align: center;
}
#always.always-box .main-contact-info > a {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.6;
}
#always.always-box .main-contact-info > a[href^="tel:"] {
  color: #fff;
  white-space: nowrap;
}
#always.always-box .main-contact-info > a[href^="mailto:"] {
  text-decoration: underline;
  text-underline-offset: .15em;
}
#always.always-box .main-contact-info > button.sf2-callBtn {
  margin-top: 20px;
  max-width: 100%;
}
@media (min-width: 1024px) {
  #always.always-box > .container { min-height: 500px; }
  #always.always-box .page-header { font-size: 70px; }
}
@media (min-width: 1280px) {
  #always.always-box > .container { min-height: 600px; }
  #always.always-box .page-header { font-size: 100px; }
}
@media (min-width: 1536px) {
  #always.always-box > .container { min-height: 700px; }
}
@media (max-width: 767.98px) {
  #always.always-box > .container {
    flex-direction: column;
    justify-content: center !important;
    min-height: 0;
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  #always.always-box .page-header {
    font-size: clamp(38px, 10vw, 60px);
    line-height: 1.12;
    text-align: center;
  }
  #always.always-box .main-contact-info > a {
    font-size: clamp(22px, 6vw, 28px);
  }
}

/* Stable valve origin and continuous pipe on both service tabs. */
@media(min-width:1024px){
 .tg-scroll-valve{--tg-valve-width:min(32vw,420px);top:0;bottom:0;width:var(--tg-valve-width);aspect-ratio:auto;transform:none}
 .tg-scroll-valve .tg-valve-pipe{position:relative;z-index:1;height:calc(var(--tg-valve-width) * 2.4);object-fit:fill}
 .tg-scroll-valve::before{content:"";position:absolute;left:27.73%;width:43.73%;top:calc(var(--tg-valve-width) * 2.4 - 2px);bottom:-2px;background:linear-gradient(90deg,#707477 0%,#a7a9aa 12%,#d4d4d4 36%,#efefef 67%,#c5c7c7 97%,#7d8182 100%)}
 .tg-scroll-valve .tg-valve-rotor{z-index:2;top:calc(var(--tg-valve-width) * .6696)}
}
/* Full SEO content stays in the DOM and shares the site's container. */
.tg-seo-copy .tg-content-copy{max-width:none;width:100%}
.tg-seo-fold{font-size:18px;line-height:1.65;position:relative;overflow:hidden;max-height:29.7em}
.tg-seo-fold.is-collapsed::after{content:"";position:absolute;inset:auto 0 0;height:6em;background:linear-gradient(transparent,#1a2b4f);pointer-events:none}
.tg-seo-fold.is-expanded{max-height:none;overflow:visible}
.tg-seo-toggle{margin-top:24px;padding:14px 24px;border:1px solid #6cd3ff;border-radius:32px;color:#6cd3ff;background:transparent;font:inherit;cursor:pointer}
.tg-seo-toggle:hover{background:#6cd3ff;color:#1a2b4f}
.tg-seo-toggle:focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(max-width:767.98px){.tg-seo-fold{font-size:16px}}

/* Overlay navigation on every actual service/gas hero, including standalone aliases. */
#wrapper:has(main .item-service-block) > .top-box{position:absolute;top:0;left:0;right:0}
/* A separate SEO surface, with the same independent container as other blocks. */
.tg-seo-copy{background:#142440;padding-top:80px!important;padding-bottom:80px!important;margin-top:64px}
.tg-seo-copy .tg-content-copy{padding-inline:0}
.tg-seo-copy .tg-seo-fold{line-height:1.65}
.tg-seo-fold.is-collapsed::after{height:10em;background:linear-gradient(to bottom,rgba(20,36,64,0) 0%,rgba(20,36,64,.25) 25%,rgba(20,36,64,.75) 65%,#142440 100%)}
.tg-seo-toggle{display:block;margin:56px auto 0}
@media(max-width:767.98px){.tg-seo-copy{padding-block:48px!important;margin-top:40px}.tg-seo-toggle{margin-top:40px}}

/* Keep the bright hero edge-to-edge at wide aspect ratios. */
@media(min-width:1024px){.about-us-box>.tg-about-heading>.firstscreen-img img{object-fit:cover;object-position:center center}}
/* Geography fits the browser's height, including its section padding. */
@media(min-width:1024px){#about-us #geo{--tg-geo-padding:clamp(32px,8svh,80px);padding-block:var(--tg-geo-padding)}#about-us #geo img{max-height:min(720px,calc(100svh - 2 * var(--tg-geo-padding)))}}

.hdr-slogan .tg-header-home{display:inline-block;color:inherit;text-decoration:none;pointer-events:auto}
.hdr-slogan .tg-header-home:focus-visible{outline:2px solid #6cd3ff;outline-offset:5px}

/* Extend the actual bottom128px of the same pipe texture. No painted gradient. */
@media(min-width:1024px){.tg-scroll-valve::before{left:0;width:100%;background:none;top:calc(var(--tg-valve-width) * 2.4 - 1px);bottom:-1px;border-style:solid;border-width:0 0 1px;border-color:transparent;border-image-source:url('/media/teplo-motion-20261114/pipe-fixed.webp');border-image-slice:0 0 128 0;border-image-width:0 0 100% 0;border-image-repeat:stretch}}

/* Reuse the original straight pipe end; crop its bottom120px with CSS. */
.tg-scroll-valve::before{display:none}
.tg-valve-extension{position:absolute;left:0;right:0;top:calc(var(--tg-valve-width) * 2.4 - 1px);bottom:-1px;overflow:hidden;z-index:0}
.tg-scroll-valve .tg-valve-extension>img{position:absolute;left:0;bottom:0;width:100%;height:750%;max-width:none;object-fit:fill;display:block}
