/* DEKATRADE 20.14.48 — Final customer hero correction
   Purpose: keep the approved homepage photo pixel-for-pixel unchanged while
   improving text legibility without a full-screen dark overlay. Other Stage 6 fixes remain intact. */

/* ---------- Global safety: do not let text/controls escape their cards ---------- */
:where(main,.site-main,.page-content,.entry-content,.section,.container) :where(h1,h2,h3,h4,p,li,a,span,strong,small,button,label){
  min-width:0;
}
:where(.btn,button,input,select,textarea,a){
  max-width:100%;
}
:where(.entry-content,.prose,.company-hero__copy,.ready205-section,.product-detail,.page-hero__copy) :where(p,li,a,strong,span){
  overflow-wrap:anywhere;
}

/* ---------- HOME HERO: keep EXACT approved red-pump image, improve only legibility ---------- */
@media (min-width:701px){
  .home-v18-hero{
    position:relative!important;
    isolation:isolate!important;
    overflow:hidden!important;
    background:#10243a!important;
  }
  .home-v18-hero .home-v15-hero__bg{
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    background-image:url("../images/mobile-hero-full-uncropped-v18917.jpg")!important;
    background-size:cover!important;
    background-position:center center!important;
    background-repeat:no-repeat!important;
    filter:none!important;
    opacity:1!important;
  }
  /* The supplied photo already contains the approved dark-left composition.
     Do not tint, blur, recolor or cover it with another full-width layer. */
  .home-v18-hero::before,
  .home-v18-hero::after{
    display:none!important;
    content:none!important;
    background:none!important;
  }
  .home-v18-hero .home-v15-hero__inner{
    position:relative!important;
    z-index:2!important;
  }
  .home-v18-hero__copy{
    max-width:min(1120px,72vw)!important;
  }
  .home-v18-hero__copy h1{
    color:#fff!important;
    max-width:980px!important;
    text-shadow:0 2px 3px rgba(0,0,0,.96),0 5px 18px rgba(0,0,0,.74)!important;
  }
  .home-v18-hero__lead{
    color:rgba(255,255,255,.97)!important;
    max-width:1080px!important;
    font-weight:500!important;
    text-shadow:0 2px 3px rgba(0,0,0,.94),0 4px 14px rgba(0,0,0,.72)!important;
  }
  .home-v18-hero__stats{
    background:linear-gradient(90deg,rgba(14,32,53,.88),rgba(84,104,128,.72))!important;
    border-color:rgba(255,255,255,.24)!important;
    backdrop-filter:blur(4px)!important;
  }
  .home-v18-hero__stats :is(strong,span){color:#fff!important;text-shadow:0 1px 5px rgba(0,0,0,.4)!important;}
}

/* Mobile hero stays the dedicated mobile design; do not substitute the desktop crop. */
@media (max-width:700px){
  .home-mobile-hero-v18100__content :is(.home-mobile-hero-v18100__title,p,strong,span){
    text-shadow:0 2px 10px rgba(0,0,0,.68);
  }
}

/* ---------- Company HUB mobile nav: replace broken tiny horizontal pills ---------- */
@media (max-width:900px){
  .company-hub-nav .container{min-width:0!important;}
  .company-hub-nav__scroll{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    overflow:visible!important;
    padding:12px 0!important;
    scrollbar-width:none!important;
  }
  .company-hub-nav__scroll::-webkit-scrollbar{display:none!important;}
  .company-hub-nav a{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    height:auto!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    hyphens:none!important;
    line-height:1.2!important;
    padding:10px 8px!important;
    border-radius:11px!important;
    font-size:12px!important;
  }
}
@media (max-width:640px){
  .company-hub-nav .container{padding-left:16px!important;padding-right:16px!important;}
  .company-hub-nav__scroll{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  .company-hub-nav a{font-size:13px!important;min-height:48px!important;padding:10px 9px!important;}
}

/* ---------- Company pages: stable responsive geometry ---------- */
.company-hero__grid,.company-split,.company-proof-grid,.company-process,.company-stats{
  min-width:0!important;
}
.company-hero__media img,.company-split>img,.company-process img{
  max-width:100%!important;
}
@media (max-width:760px){
  .company-hero__grid,.company-split,.company-split--reverse{
    grid-template-columns:1fr!important;
  }
  .company-hero__copy,.company-split>div{min-width:0!important;}
  .company-hero__actions{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .company-hero__actions .btn{width:100%!important;min-height:48px!important;white-space:normal!important;text-align:center!important;justify-content:center!important;}
}

/* ---------- Heating / ready-solution pages: equal cards, no "dancing" blocks ---------- */
.ready205-card-grid,.ready205-trust-grid,.heating205-scheme-grid,.heating205-detail-grid,.ready205-step-grid{
  align-items:stretch!important;
  grid-auto-rows:1fr!important;
}
.ready205-card-grid > *,.ready205-trust-grid > *,.heating205-scheme-grid > *,.heating205-detail-grid > *,.ready205-step-grid > *{
  min-width:0!important;
  height:100%!important;
  box-sizing:border-box!important;
}
.ready205-card{
  display:grid!important;
  grid-template-rows:185px 1fr!important;
}
.ready205-card>img{
  width:100%!important;
  height:185px!important;
  object-fit:cover!important;
}
.ready205-card__body{height:100%!important;align-content:center!important;}

.ready205-trust{
  display:grid!important;
  grid-template-rows:220px 1fr!important;
  height:100%!important;
}
.ready205-trust img{
  display:block!important;
  width:100%!important;
  height:220px!important;
  min-height:220px!important;
  max-height:220px!important;
  object-fit:cover!important;
  object-position:center!important;
  aspect-ratio:auto!important;
}
.ready205-trust strong{
  display:flex!important;
  align-items:center!important;
  min-height:64px!important;
  padding:14px 16px!important;
  margin:0!important;
}
.heating205-scheme{
  display:grid!important;
  grid-template-rows:225px 1fr!important;
  height:100%!important;
}
.heating205-scheme img{height:225px!important;min-height:225px!important;max-height:225px!important;object-fit:contain!important;}
.heating205-scheme>div{height:100%!important;}
.heating205-detail-grid>article{height:100%!important;}
.heating205-detail-grid img{height:260px!important;min-height:260px!important;max-height:260px!important;margin-top:auto!important;}

@media (max-width:980px){
  .ready205-trust-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .ready205-trust{grid-template-rows:210px 1fr!important;}
  .ready205-trust img{height:210px!important;min-height:210px!important;max-height:210px!important;}
}
@media (max-width:640px){
  .ready205-card-grid--four,.ready205-trust-grid,.heating205-scheme-grid,.heating205-detail-grid,.ready205-step-grid--three{
    grid-template-columns:1fr!important;
  }
  .ready205-card{grid-template-rows:190px 1fr!important;}
  .ready205-card>img{height:190px!important;}
  .ready205-trust{grid-template-rows:205px 1fr!important;}
  .ready205-trust img{height:205px!important;min-height:205px!important;max-height:205px!important;}
  .heating205-scheme{grid-template-rows:205px 1fr!important;}
  .heating205-scheme img{height:205px!important;min-height:205px!important;max-height:205px!important;}
  .heating205-detail-grid img{height:220px!important;min-height:220px!important;max-height:220px!important;}
}

/* ---------- Common final mobile overflow guard ---------- */
@media (max-width:700px){
  html,body{max-width:100%!important;overflow-x:hidden!important;}
  .container{max-width:100%!important;min-width:0!important;}
  img,svg,video,iframe{max-width:100%;}
  table{max-width:100%;}
  :where(h1,h2,h3,h4,p,li,a,span,strong,small,label,button){word-break:normal;hyphens:none;}
  :where(.sku,.product-sku,.product-detail__sku,code){overflow-wrap:anywhere;word-break:break-word;}
}
