/* TradesFolks 18.4.137
   Service section title visibility + final compact balance.
*/

@media(min-width:821px){
  .tf-homepage .tf-service-card{
    height:304px!important;
  }

  .tf-homepage .tf-service-card-hero{
    height:218px!important;
    min-height:218px!important;
  }

  .tf-homepage .tf-service-card-media{
    inset:0 0 74px 0!important;
    padding:8px 18px 3px!important;
  }

  .tf-homepage .tf-service-card-media img{
    max-width:86%!important;
    max-height:100%!important;
    object-fit:contain!important;
  }

  .tf-homepage .tf-service-card-directory-copy{
    left:14px!important;
    right:14px!important;
    bottom:8px!important;
    height:66px!important;
    min-height:66px!important;
    padding:7px 11px 6px!important;
    overflow:visible!important;
    justify-content:flex-start!important;
  }

  .tf-homepage .tf-service-card-directory-copy small{
    flex:0 0 auto!important;
    margin:0 0 2px!important;
    font-size:6px!important;
    line-height:1.05!important;
  }

  .tf-homepage .tf-service-card-directory-copy h3{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    margin:0!important;
    font-size:16px!important;
    line-height:1.08!important;
    letter-spacing:-.025em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .tf-homepage .tf-service-card-directory-cta{
    flex:0 0 auto!important;
    margin-top:5px!important;
    font-size:7px!important;
    line-height:1!important;
  }

  .tf-homepage .tf-service-mini-grid,
  .tf-homepage .tf-service-mini-grid > a{
    height:86px!important;
    min-height:86px!important;
  }

  .tf-homepage .tf-service-mini-image{
    width:40px!important;
    min-width:40px!important;
    height:34px!important;
    min-height:34px!important;
  }

  .tf-homepage .tf-service-mini-grid strong{
    font-size:7px!important;
    line-height:1.1!important;
  }
}

@media(min-width:821px) and (max-width:1180px){
  .tf-homepage .tf-service-card{
    height:286px!important;
  }

  .tf-homepage .tf-service-card-hero{
    height:205px!important;
    min-height:205px!important;
  }

  .tf-homepage .tf-service-card-media{
    inset:0 0 69px 0!important;
  }

  .tf-homepage .tf-service-card-directory-copy{
    left:10px!important;
    right:10px!important;
    height:61px!important;
    min-height:61px!important;
    padding:6px 9px!important;
  }

  .tf-homepage .tf-service-card-directory-copy h3{
    font-size:14px!important;
  }

  .tf-homepage .tf-service-mini-grid,
  .tf-homepage .tf-service-mini-grid > a{
    height:81px!important;
    min-height:81px!important;
  }
}

/* Mobile: compact but title must remain fully readable */
@media(max-width:820px){
  .tf-homepage .tf-service-card{
    height:248px!important;
    min-height:248px!important;
  }

  .tf-homepage .tf-service-card-hero{
    height:178px!important;
    min-height:178px!important;
  }

  .tf-homepage .tf-service-card-media{
    inset:0 0 61px 0!important;
  }

  .tf-homepage .tf-service-card-directory-copy{
    left:8px!important;
    right:8px!important;
    bottom:6px!important;
    height:54px!important;
    min-height:54px!important;
    padding:6px 8px!important;
    overflow:visible!important;
  }

  .tf-homepage .tf-service-card-directory-copy h3{
    font-size:14px!important;
    line-height:1.07!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  .tf-homepage .tf-service-card-directory-cta{
    margin-top:4px!important;
    font-size:6.5px!important;
  }

  .tf-homepage .tf-service-mini-grid,
  .tf-homepage .tf-service-mini-grid > a{
    height:70px!important;
    min-height:70px!important;
  }
}

@media(max-width:430px){
  .tf-homepage .tf-service-card{
    height:238px!important;
    min-height:238px!important;
  }

  .tf-homepage .tf-service-card-hero{
    height:170px!important;
    min-height:170px!important;
  }

  .tf-homepage .tf-service-card-directory-copy{
    height:52px!important;
    min-height:52px!important;
  }

  .tf-homepage .tf-service-card-directory-copy h3{
    font-size:13px!important;
  }

  .tf-homepage .tf-service-mini-grid,
  .tf-homepage .tf-service-mini-grid > a{
    height:68px!important;
    min-height:68px!important;
  }
}
