/* TRI-MAN 1.5.5 — precise visual corrections to 1.5.4.
   No page content is emitted by the template. Source for every visual item is
   still an existing Alfa Builder addon; this file only changes its skin. */

/* Exact two-pixel top blue rule; prevent oversized Builder rows/buttons from
   increasing the inner-page header beyond the original ~140px total height. */
@media (min-width:1021px) {
  body.triman-inner #sp-header.trm-wy-header:not(.is-sticky) {
    height:140px!important;
    min-height:140px!important;
    max-height:140px!important;
    box-sizing:border-box!important;
    border-top:2px solid #115fb0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible;
  }
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-header-content,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-global-header,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-global-header > .tb-container,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-global-header > .tb-container > .tb-row {
    height:138px!important;
    min-height:138px!important;
    max-height:138px!important;
    box-sizing:border-box!important;
    margin-block:0!important;
    padding-block:0!important;
  }
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-header-links,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-header-links > .tb-addon,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-header-links > .tb-addon > .tb-button-wrap,
  body.triman-inner #sp-header:not(.is-sticky) .trm-wy-header-links > .tb-addon > .tb-button-wrap > .tb-button {
    height:138px!important;
    min-height:138px!important;
    max-height:138px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  body.triman-inner #sp-header .trm-wy-header-links .tb-button {
    padding-left:clamp(8px,.75vw,15px)!important;
    padding-right:clamp(8px,.75vw,15px)!important;
    font-size:clamp(13px,.88vw,17px)!important;
    letter-spacing:0!important;
  }
  /* Contain *both* logo and navigation in the configured 1170px grid. */
  body.triman-inner #sp-header .trm-wy-global-header > .tb-container {
    width:min(calc(100% - 50px),var(--triman-container,1170px))!important;
    max-width:var(--triman-container,1170px)!important;
    margin-inline:auto!important;
  }
  body.triman-inner #sp-header .trm-wy-header-brand {
    flex:0 0 105px!important;
    min-width:0!important;
    max-width:105px!important;
  }
  body.triman-inner #sp-header .trm-wy-header-links {
    flex:1 1 auto!important;
    min-width:0!important;
    gap:0!important;
  }
}

/* The 'Home' label must remain in Alfa Builder for an accessible navigation
   link but visually be displayed as the solid original house icon. The
   stronger selector wins against the later normal button-font rules. */
body.triman-inner #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button,
body.triman-home #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button {
  font-size:0!important;
  letter-spacing:0!important;
  line-height:0!important;
  padding-inline:8px!important;
  min-width:37px!important;
}
body.triman-inner #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button::before,
body.triman-home #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button::before {
  content:''!important;
  display:block!important;
  width:21px!important;
  height:21px!important;
  min-width:21px!important;
  background-color:#0b4b86!important;
  -webkit-mask:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 2 1 11h3v10h6v-7h4v7h6V11h3L12 2zM18 7V3h3v7z"/%3E%3C/svg%3E') center/contain no-repeat!important;
  mask:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 2 1 11h3v10h6v-7h4v7h6V11h3L12 2zM18 7V3h3v7z"/%3E%3C/svg%3E') center/contain no-repeat!important;
}
body.triman-home #sp-header:not(.is-sticky) .trm-wy-header-links .trm-wy-nav-home .tb-button::before,
body.triman-wysiwyg #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button.is-current::before,
body.triman-wysiwyg #sp-header .trm-wy-header-links .trm-wy-nav-home .tb-button:hover::before {
  background-color:#fff!important;
}
/* In the mobile panel, the 'Home' label is useful, so show it. */
@media (max-width:1020px) {
  body.triman-wysiwyg .trm-wy-mobile-nav .trm-wy-nav-home .tb-button {
    font-size:16px!important;line-height:1.5!important;min-width:0!important;
  }
  body.triman-wysiwyg .trm-wy-mobile-nav .trm-wy-nav-home .tb-button::before {
    display:none!important;
  }
}

/* Semantic optional phone icon for the editable call-to-action button. The
   phone number, link destination and icon-enabled class live in Alfa Builder. */
body.triman-home .trm-wy-home-quote .trm-wy-phone-link::before {
  content:none!important;
  display:none!important;
}
body.triman-home .trm-wy-home-quote .trm-wy-phone-link .tb-button {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:24px!important;
}
body.triman-home .trm-wy-home-quote .trm-wy-phone-link .tb-button::before {
  content:''!important;
  display:inline-block!important;
  flex:0 0 46px!important;
  width:46px!important;
  height:49px!important;
  background:url('../icons/phone-outline.svg') center/contain no-repeat!important;
  margin:0!important;
}

/* Icon art is keyed to the icon-symbol field saved in the Builder: no page
   records are modified and unrecognized icons continue to display normally. */
body.triman-home .trm-wy-home-stat .trm-wy-stat-icon .tb-heading.trm-icon-enhanced,
body.triman-inner .trm-alfa-stats .trm-stat-card .trm-stat-icon.trm-icon-enhanced {
  font-size:0!important;
  overflow:hidden!important;
}
body.triman-wysiwyg .trm-wy-stat-img {
  display:block!important;
  width:55%!important;
  max-width:53px!important;
  height:55%!important;
  max-height:53px!important;
  object-fit:contain!important;
  margin:auto!important;
}
/* Four-logo pages, never single-card sliding on desktop. The actual movement
   is performed by motion.js and honours the visitor's motion preference. */
body.triman-home .trm-wy-home-customers .trm-wy-customer-track {
  scroll-padding-inline:0!important;
  scroll-snap-type:x mandatory;
  gap:24px!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer {
  box-sizing:border-box!important;
  flex:0 0 calc((100% - 72px)/4)!important;
  width:calc((100% - 72px)/4)!important;
  min-width:0!important;
  scroll-snap-align:none!important;
}
body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer:nth-child(4n + 1) {
  scroll-snap-align:start!important;
}
@media (min-width:651px) and (max-width:1020px) {
  body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer {
    flex-basis:calc((100% - 24px)/2)!important;
    width:calc((100% - 24px)/2)!important;
  }
  body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer:nth-child(n) {scroll-snap-align:none!important;}
  body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer:nth-child(2n + 1) {scroll-snap-align:start!important;}
}
@media (max-width:650px) {
  body.triman-home .trm-wy-home-customers .trm-wy-customer-track > .trm-wy-home-customer {
    flex-basis:100%!important;width:100%!important;
    scroll-snap-align:start!important;
  }
  body.triman-home .trm-wy-home-quote .trm-wy-phone-link .tb-button {gap:12px!important;}
  body.triman-home .trm-wy-home-quote .trm-wy-phone-link .tb-button::before {
    width:31px!important;height:35px!important;flex-basis:31px!important;
  }
}
