/* Industry and service tree (Phase A, 18 Oct 2026): 20-item mega menu rails and panes, /services/ archive grid,
   Industries page jump grid, in-page tree link blocks (inc/cc-tree-links.php). Global: the menu is on every page.
   Corners: boxes 14px, buttons 8px. Selectors carry extra weight because the part stylesheets print after this file. */

/* ---- mega menu (owner decision 18 Oct 2026): original 2-column panes and original type sizes;
   the panel grows as tall as its longest pane instead of shrinking text or switching to 3 columns ---- */
@media (min-width:1025px){
	html body .ccmm .pg{grid-template-columns:repeat(2,minmax(0,1fr))}
	html body .ccmm .ri{white-space:normal}
	/* solid white desktop panel (owner, 18 Oct 2026): beats the Customizer glass rule body:not(#cc-lux) .cc-primary-menu .cc-mm__panel */
	html body:not(#cc-lux):not(#cc-x) .cc-primary-menu .cc-mm__panel{background:#fff!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
	html body .ccmm .cd{border-radius:14px}
	html body .ccmm .bt{border-radius:8px}
}

/* ---- /services/ archive: equal cards, full rows, last row centred ---- */
html body .ccsv .cct-grid .cards{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-auto-rows:1fr;gap:16px}
html body .ccsv .cct-grid .cards:has(.more[aria-expanded="true"]){grid-auto-rows:auto}
html body .ccsv .cct-grid .cd{grid-column:span 2;min-width:0;border-radius:14px}
html body .ccsv .cct-grid .cd:nth-child(4n+1):nth-last-child(3){grid-column:2/span 2}
html body .ccsv .cct-grid .cd:nth-child(4n+1):nth-last-child(2){grid-column:3/span 2}
html body .ccsv .cct-grid .cd:nth-child(4n+1):last-child{grid-column:4/span 2}
html body .ccsv .cct-grid .ch>div{min-width:0}
html body .ccsv .cct-grid .cd h2{overflow-wrap:break-word}
html body .ccsv .cct-grid .sl a{min-width:0;overflow-wrap:break-word}
html body .ccsv .cct-grid .more{border-radius:8px!important}
html body .ccsv .cct-grid--ind{background:#fff}
@media (max-width:1100px){
	html body .ccsv .cct-grid .cards{grid-template-columns:repeat(4,minmax(0,1fr))}
	html body .ccsv .cct-grid .cd,
	html body .ccsv .cct-grid .cd:nth-child(4n+1):nth-last-child(3),
	html body .ccsv .cct-grid .cd:nth-child(4n+1):nth-last-child(2),
	html body .ccsv .cct-grid .cd:nth-child(4n+1):last-child{grid-column:span 2}
	html body .ccsv .cct-grid .cd:nth-child(2n+1):last-child{grid-column:2/span 2}
}
@media (max-width:767px){
	html body .ccsv .cct-grid .cards{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:12px}
	html body .ccsv .cct-grid .cd,
	html body .ccsv .cct-grid .cd:nth-child(2n+1):last-child{grid-column:auto}
}

/* ---- Industries page: 19 tops + "Not listed" fill the jump grid ---- */
html body .cch .cci-jump a.cci-all{grid-column:auto}
html body .cch .cci-jump a{border-radius:14px}

/* ---- in-page tree link blocks ---- */
.cct-more + .cct-more,
.cc-svc-related__list + .cct-more{margin-top:clamp(28px,4vw,48px)}
html body .cct-list a{height:100%;border-radius:14px!important}
.cct-list--native{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.cct-list--native li{margin:0;padding:0;min-width:0;flex:0 0 calc((100% - 24px)/3)}
.cct-list--native a{display:flex;flex-direction:column;gap:3px;padding:16px 18px;background:#fff;border:1px solid rgba(7,27,56,.1);color:#071B38;text-decoration:none;transition:border-color .15s}
.cct-list--native a:hover{border-color:#E31507}
.cct-list--native strong{font-size:16px;line-height:1.3}
.cct-list--native span{color:#55657B;font-size:13px;line-height:1.4}
@media (max-width:1024px){.cct-list--native li{flex-basis:calc((100% - 12px)/2)}}
@media (max-width:640px){.cct-list--native li{flex-basis:100%}}

/* ---- phone top bar (owner, 18 Oct 2026): two lines only. Line 1: social icons in one row + Toronto number;
   line 2: WhatsApp (same icon and word as desktop) + toll-free number, without the "Toll-free" label ---- */
@media (max-width:767px){
	html body .cc-site-header .cc-site-header__meta{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"soc tor" "wa tf"!important;align-items:center!important;column-gap:10px!important;row-gap:8px!important;flex-wrap:nowrap!important}
	html body .cc-site-header .cc-site-header__social{grid-area:soc!important;display:flex!important;flex-wrap:nowrap!important;gap:9px!important;margin:0!important;padding:0!important;width:auto!important;max-width:none!important}
	html body .cc-site-header .cc-site-header__social li{margin:0!important;padding:0!important}
	html body .cc-site-header .cc-site-header__social-link{padding:0!important;width:auto!important;height:auto!important;min-width:0!important}
	html body .cc-site-header .cc-site-header__social-link svg{width:17px!important;height:17px!important}
	html body .cc-site-header .cc-site-header__phone{grid-area:tor!important;justify-self:end!important;margin:0!important;white-space:nowrap!important;font-size:13px!important}
	html body .cc-site-header .cc-site-header__phone a{font-size:13px!important}
	html body .cc-site-header a.cc-hdr-tollfree{grid-area:tf!important;justify-self:end!important;display:block!important;margin:0!important;white-space:nowrap!important;font-size:13px!important;text-align:right!important}
	html body .cc-site-header .cc-hdr-tollfree__label{display:none!important}
	html body .cc-site-header .cc-hdr-tollfree__number{font-size:13px!important}
	html body .cc-site-header a.cc-hdr-wa{grid-area:wa!important;justify-self:start!important;display:inline-flex!important;align-items:center!important;gap:6px!important;margin:0!important;font-size:13px!important;white-space:nowrap!important}
	html body .cc-site-header a.cc-hdr-wa svg{width:17px!important;height:17px!important}
}
@media (max-width:389px){
	html body .cc-site-header .cc-site-header__social{gap:6px!important}
	html body .cc-site-header .cc-site-header__social-link svg,html body .cc-site-header a.cc-hdr-wa svg{width:15px!important;height:15px!important}
	html body .cc-site-header .cc-site-header__phone,html body .cc-site-header .cc-site-header__phone a,html body .cc-site-header a.cc-hdr-tollfree,html body .cc-site-header .cc-hdr-tollfree__number,html body .cc-site-header a.cc-hdr-wa{font-size:12px!important}
}

/* ---- 12 + 12 menu (owner, 19 Oct 2026): grouped panes; each group = heading + top links + "All ..." link ---- */
html body .ccmm .pg.pg--g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 28px;align-items:start}
html body .ccmm .gb{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .ccmm a.gt{text-decoration:none;line-height:1.3}

html body .ccmm a.it.gi{padding:5px 10px}
html body .ccmm a.ga{padding:4px 10px;font-size:13px;color:#E31507;text-decoration:none;font-weight:600}
html body .ccmm a.ga:hover{}
html body .ccsv .cct-grid .sl li.sg{list-style:none;margin-top:8px}
html body .ccsv .cct-grid .sl li.sg:first-child{margin-top:0}
html body .cch .cci-list li.cci-sg{list-style:none;grid-column:1/-1;margin-top:10px}
html body[class] .ccmm a.gt{font-weight:700!important;font-size:15px!important;letter-spacing:.05em!important;text-transform:uppercase!important;color:#55657B!important;padding:4px 10px 6px!important}
html body[class] .ccmm a.gt:hover{color:#E31507!important}
html body[class] .ccmm a.it.gi{font-weight:500!important}
html body .ccmm .pg a.ga--pane{grid-column:1/-1;padding:8px 10px 0}
/* owner 19 Oct 2026: no empty band at the bottom; "View all services / All industries" sits right after the last rail item on desktop */
@media (min-width:1025px){
	html body .ccmm-d{min-height:0!important}
	html body .ccmm .rl .all{margin-top:6px!important;padding-top:8px!important}
}
@media (min-width:1025px){
	html body .ccmm .ft img.cd-bot{max-height:215px!important;width:auto!important;height:auto!important;margin-left:auto;margin-right:auto;display:block}
	html body .ccmm .ft{padding-top:16px!important;padding-bottom:16px!important}
}

/* Fix plan 19 Oct 2026: in-text links inside navy band leads (home services intro) */
.cch-navy .cch-lead a{color:#fff;}
.cch-navy .cch-lead a:hover{color:#c9d3e1}
.cct-part{margin:4px 0 18px;font-size:1rem}
.cct-part a{}

/* ---- Industries page guide cards (owner 19 Oct 2026): rounded, sized to content, 5 guides then "Show all" ---- */
html body .cch .cch-lg--guides{align-items:stretch!important}
html body .cch .cch-lg--guides > div{border-radius:14px!important;height:auto!important;align-self:stretch}
html body .cch .cch-lg--guides details.cch-more{margin-top:6px}
html body .cch .cch-lg--guides details.cch-more > summary{cursor:pointer;color:#E31507;font-weight:600;list-style:none;padding:6px 0}
html body .cch .cch-lg--guides details.cch-more > summary::-webkit-details-marker{display:none}
html body .cch .cch-lg--guides details.cch-more[open] > summary{margin-bottom:4px}
/* owner 19 Oct 2026: round the dropdown's top corners like its bottom ones (desktop) */
@media (min-width:1025px){
	html body:not(#cc-lux):not(#cc-x) .cc-primary-menu .cc-mm__panel{border-top-left-radius:14px!important;border-top-right-radius:14px!important}
	/* the panel's top 12px sit under the header row, which hid the rounding; clip at the visible top edge, keep the bottom shadow */
}
/* top corners v2 (19 Oct 2026): the panel keeps its full height (hover bridge under the header row stays intact);
   its top 12px are transparent and the white box starts below with rounded top corners; bottom corners unchanged */
@media (min-width:1025px){
	html body:not(#cc-lux):not(#cc-x) .cc-primary-menu .cc-mm__panel:has(> .ccmm),html body:not(#cc-lux):not(#cc-x) .cc-primary-menu .cc-mm__panel:has(.ccmm){background:transparent!important;padding-top:12px!important;border:0!important;outline:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
	html body .cc-primary-menu .cc-mm__panel .ccmm{background:#fff;border-radius:14px;box-shadow:0 30px 60px -20px rgba(7,27,56,.45)}
}
html body .ccmm a.cd-bot-link{display:block;cursor:pointer}

/* p-btn8 2026-10-19 (Amir): every button 8px rounded. The old Customizer rule ".cch *{border-radius:0!important}"
   squared buttons the p-round block did not list: the CTA band "bt" buttons (/services/, /industries/) and the
   portfolio pager. Boxes/cards stay 14px. */
html body:not(#cc-btn8):not(#cc-btn8b) .ccsv a.bt,html body:not(#cc-btn8):not(#cc-btn8b) .ccsv .bt:not(cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .cch a.bt,html body:not(#cc-btn8):not(#cc-btn8b) .cch-pager a:not(.cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .cch-pager span:not(.cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .cch-pager .page-numbers:not(cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) a.cch-btn:not(.cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .cch .cch-btn:not(cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .ccsv .sb:not(cc-nx),html body:not(#cc-btn8):not(#cc-btn8b) .gform_wrapper :is(.gform_next_button,.gform_previous_button,.gform-theme-button,.gform_button):not(cc-nx){border-radius:8px!important}
/* table tabs (phones/tablets): rounded segmented control; beats the square-corner Customizer rule (19 Oct 2026) */
html body[class] .cc-table-tabs{border-radius:14px!important;padding:5px!important;gap:5px!important;background:#EEF1F6!important;border:1px solid #E1E6EF!important}
html body[class] .cc-table-tabs button{border-radius:10px!important;padding:10px 14px!important;overflow:hidden}

html body[class] .cc-table-tabs button.is-active::after{left:14px!important;right:14px!important;bottom:5px!important;height:3px!important;border-radius:3px!important}
html body[class] .cc-table-tabs button .cc-tab-num{border-radius:50%!important;width:26px!important;height:26px!important;line-height:23px!important}
html body[class] .cc-table-tabs button:not(.is-active):hover{border-radius:10px!important}
html body[class] .cc-table-tabs button:focus-visible{outline:2px solid #E31507!important;outline-offset:2px!important;border-radius:10px!important}
/* table tabs v2: active tab is solid red like a hovered link, no underline; number badges always round */
html body[class] .cc-table-tabs button.is-active::after{content:none!important;display:none!important}
html body[class] .cc-table-tabs button.is-active,html body[class] .cc-table-tabs button.is-active:hover,html body[class] .cc-table-tabs button.is-active:focus{background:#E31507!important;color:#fff!important;box-shadow:0 6px 16px -6px rgba(227,21,7,.55)!important}
html body[class] .cc-table-tabs button.is-active .cc-tab-num{background:#fff!important;border-color:#fff!important;color:#E31507!important}
html body[class] .cc-table-tabs button.is-active .cc-tab-chev{border-color:#fff!important}
html body[class] .cc-table-tabs button:not(.is-active):hover{background:#E31507!important;color:#fff!important}
html body[class] .cc-table-tabs button:not(.is-active):hover .cc-tab-num{border-color:#fff!important;color:#fff!important;background:transparent!important}
html body[class] .cc-table-tabs button:not(.is-active):hover .cc-tab-chev{border-color:#fff!important}
html body[class] .cc-table-tabs button .cc-tab-num,html body:not(#cc-lux):not(#cc-tbl):not(#cc-x) .cc-table-tabs button .cc-tab-num{border-radius:50%!important;display:inline-flex!important;align-items:center;justify-content:center;line-height:1!important;aspect-ratio:1/1}
html body[class] .cc-table-tabs button:focus-visible{outline-color:#071B38!important}
/* phone/tablet menu: rounded panel, rounded rows, no square edges (19 Oct 2026) */
@media (max-width:1024px){
html body[class] .cc-mm__wrapper{border-radius:14px!important;margin-top:10px!important;padding:6px!important;border:1px solid #E1E6EF!important;box-shadow:0 24px 48px -18px rgba(7,27,56,.55)!important;background:#FFFCF2!important}
html body[class] .cc-mm__wrapper>.cc-mm__list>.cc-mm__item{border:0!important;margin:0 0 2px!important;width:auto!important;max-width:100%!important;box-sizing:border-box!important}
html body[class] .cc-mm__wrapper .cc-mm__item>.cc-mm__content{width:auto!important;max-width:100%!important;box-sizing:border-box!important}
html body[class] .cc-mm__wrapper .cc-mm__title{border-radius:10px!important;border:0!important;overflow:hidden;transition:background .15s ease}
html body[class] .cc-mm__wrapper .cc-mm__title,html body[class] .cc-mm__wrapper .cc-mm__title:hover,html body[class] .cc-mm__wrapper .cc-mm__title:focus-within,html body[class] .cc-mm__wrapper .cc-mm__link,html body[class] .cc-mm__wrapper .cc-mm__link:hover,html body[class] .cc-mm__wrapper .cc-mm__link:focus{border-left:0!important;box-shadow:none!important;outline-offset:-2px}
html body[class] .cc-mm__wrapper .cc-mm__title:hover,html body[class] .cc-mm__wrapper .cc-mm__title:focus-within,html body[class] .cc-mm__wrapper .cc-mm__title:has(.cc-mm__drop[aria-expanded="true"]){background:#FDEDEB!important}
html body[class] .cc-mm__wrapper .cc-mm__title:hover .cc-mm__link,html body[class] .cc-mm__wrapper .cc-mm__title:has(.cc-mm__drop[aria-expanded="true"]) .cc-mm__link{color:#E31507!important}
html body[class] .cc-mm__wrapper .cc-mm__panel{box-sizing:border-box!important;width:auto!important;max-width:100%!important;left:auto!important;right:auto!important;border-radius:12px!important;margin:4px 0 8px!important;padding:6px!important;border:1px solid #E6EAF1!important;background:#fff!important;overflow:hidden}
html body[class] .cc-mm__wrapper .ccmm-m .mr{border:1px solid #E8ECF2!important;border-radius:10px!important;margin:0 0 6px!important;background:#FFFCF5!important;overflow:hidden}
html body[class] .cc-mm__wrapper .ccmm-m .mr:last-child{margin-bottom:0!important}
html body[class] .cc-mm__wrapper .ccmm-m .mr:hover,html body[class] .cc-mm__wrapper .ccmm-m .mr:has(button[aria-expanded="true"]){border-color:#F5C4BF!important;background:#FDEDEB!important}
html body[class] .cc-mm__wrapper .ccmm-m .mr:hover>a,html body[class] .cc-mm__wrapper .ccmm-m .mr:has(button[aria-expanded="true"])>a{color:#E31507!important}
html body[class] .cc-mm__wrapper .ccmm-m .mk,html body[class] .cc-mm__wrapper .ccmm-m .mc{border-radius:10px!important}
html body[class] .cc-mm__wrapper a.bt,html body[class] .cc-mm__wrapper .cc-mm__item--cta a,html body[class] .cc-mm__wrapper .cc-btn{border-radius:8px!important}
}
@media (max-width:1024px){html body:not(#cc-lux):not(#cc-x):not(#cc-y) .cc-mm__wrapper .cc-mm__panel{box-shadow:none!important;background-image:none!important;background-color:#fff!important}}
/* RTL pages: Gravity Forms pushes tel/email/url fields to the end; keep every field aligned with the form's own direction (19 Oct 2026) */
html[dir=rtl] body[class] .gform_wrapper input[type=tel],html[dir=rtl] body[class] .gform_wrapper input[type=email],html[dir=rtl] body[class] .gform_wrapper input[type=url],html[dir=rtl] body[class] .gform_wrapper input[type=number]{text-align:start!important}
/* RTL pages: arrows point left; Persian form title/intro read right to left while the fields stay English (19 Oct 2026) */
html[dir=rtl] body[class] main svg:has(> path[d="M4 12h15M13 6l6 6-6 6"]){transform:scaleX(-1)}
html[dir=rtl] body[class] .cc-svc-form .cc-svc-form__title,html[dir=rtl] body[class] .cc-svc-form .cc-svc-form__text{direction:rtl!important;text-align:right!important;unicode-bidi:plaintext}
/* Persian pages: testimonial image cards full width, even gaps; 2 per row on desktop (19 Oct 2026) */
html body[class] .cc-svc-figure-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;margin:24px 0 8px!important;align-items:start}
html body[class] .cc-svc-figure-grid>br{display:none!important}
html body[class] .cc-svc-figure-grid>img{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:1140/450;margin:0!important;border-radius:14px!important;box-shadow:0 10px 24px -14px rgba(7,27,56,.35);object-fit:cover}
@media (min-width:900px){html body[class] .cc-svc-figure-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px!important} html body[class] .cc-svc-figure-grid>img:last-of-type:nth-of-type(odd){grid-column:1/-1;justify-self:center;width:calc(50% - 12px)!important}}
/* Persian pages: form submit = same red gradient button as the page CTA */
html[lang="fa-IR"] body[class] .gform_wrapper .gform_button{background:linear-gradient(135deg,#FF4B3A 0%,#E31507 55%,#C10E03 100%)!important;border:0!important;border-radius:8px!important;box-shadow:0 12px 28px rgba(227,21,7,.35)!important;color:#fff!important;font-weight:500!important;font-size:17px!important}
