/* services page overrides (loaded after main.css) — services hub + single service pages */

/* 1. Hub: sticky jump nav — edge fades while it scrolls sideways (JS toggles is-start / is-end) */
.sv-jump-in{position:relative;scroll-padding-inline:var(--gutter)}
.sv-jump a:focus-visible{outline-offset:2px}
@media (max-width:1023px){
	.sv-jump-in{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--gutter),#000 calc(100% - 56px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 var(--gutter),#000 calc(100% - 56px),transparent 100%)}
	.sv-jump-in.is-start{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent 100%);mask-image:linear-gradient(90deg,#000 calc(100% - 56px),transparent 100%)}
	.sv-jump-in.is-end{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--gutter));mask-image:linear-gradient(90deg,transparent 0,#000 var(--gutter))}
	.sv-jump-in.is-start.is-end{-webkit-mask-image:none;mask-image:none}
	.sv-jump-in a{min-height:38px;font-size:.84rem}
}

/* 2. Hub: a 4-card group fills one row on wide screens instead of leaving an orphan card */
@media (min-width:1200px){
	.sv-cards:has(> .scard:nth-child(4):last-child){grid-template-columns:repeat(4,1fr);gap:20px}
	.sv-cards:has(> .scard:nth-child(4):last-child) .scard-body{padding:0 20px 22px}
	.sv-cards:has(> .scard:nth-child(4):last-child) .scard h3{font-size:1.1rem}
	.sv-cards:has(> .scard:nth-child(4):last-child) .scard p{font-size:.9rem}
}

/* 3. Hub: group headings clear the sticky jump nav when a chip is tapped (header 68 + nav 66 + gap) */
.sv-group{scroll-margin-top:150px}

/* 4. Service page: aside copy + count-aware grids (no orphan cards, no empty columns) */
.sv-aside .checks li{font-size:.95rem}
@media (min-width:1024px){
	.offer-grid:has(> .offer:nth-child(4):last-child){grid-template-columns:repeat(2,1fr)}
	.offer-grid:has(> .offer:nth-child(2):last-child){grid-template-columns:repeat(2,1fr)}
	.rel-grid:has(> .rel-card:nth-child(3):last-child){grid-template-columns:repeat(3,1fr)}
	.rel-grid:has(> .rel-card:nth-child(2):last-child){grid-template-columns:repeat(2,1fr);max-width:720px}
}

/* 5. Service page: why-band stays readable on small screens (stronger overlay, no side bleed) */
@media (max-width:900px){
	.why-band{background-image:linear-gradient(180deg,rgba(7,13,26,.9) 0%,rgba(7,13,26,.84) 60%,rgba(7,13,26,.7) 100%),var(--img);border-radius:24px}
	.why-band .h-lg{max-width:16ch}
}

/* 6. Service page: steps list keeps the number aligned with the heading on wrapped lines */
.step>div{min-width:0}
.step h3{text-wrap:balance}

/* 7a. Chat widget ships open from the server; keep it hidden until services.js has closed it (then the launcher works normally) */
html.js:not(.msd-chat-ready) .wt_chat_bot_main .wt-chat-bot-popup,html.js:not(.msd-chat-ready) .wt_chat_bot_main .chat-bot-close{display:none!important}

/* 7. Mobile: fixed-position helpers must not cover the page or the booking bar */
@media (max-width:1023px){
	/* back-to-top sits on top of headings and card copy on narrow screens; the mobile bar already offers the key actions */
	.msd-services .to-top,.msd-service .to-top{display:none}
	/* chat launcher: lift it above the fixed mobile bar so it never hides the Book button */
	.msd-services .wt_chat_bot_main button.chatbox-open.right.bottom,.msd-service .wt_chat_bot_main button.chatbox-open.right.bottom{bottom:calc(80px + env(safe-area-inset-bottom))!important;right:12px!important}
	.msd-services .wt_chat_bot_main .chatbox-open.right.bottom~.main-chat-box,.msd-service .wt_chat_bot_main .chatbox-open.right.bottom~.main-chat-box{bottom:calc(140px + env(safe-area-inset-bottom))!important}
}

/* 8. Narrow phones: cards and CTA buttons keep their labels on one line */
@media (max-width:479px){
	.phero .eyebrow{letter-spacing:.14em}
	.trust-compact{gap:8px}
	.sv-aside,.note-card{padding:24px 20px}
	.sv-aside-cta .btn,.steps-side .btn{padding-inline:1.1em}
	.offer{padding:24px 22px}
	.step{gap:16px}
	.step-n{width:42px;height:42px;font-size:.95rem}
	.step h3{padding-top:8px;font-size:1.1rem}
	.why-band{padding:28px 22px}
	.why-list li{font-size:.95rem}
	.rel-body{padding:18px 18px 22px}
}

/* 9. Reveal safety net: anything the user has already scrolled past is shown (JS adds .in, this covers no-IO cases) */
html.js .sv-group .scard.reveal.in{transition-delay:calc(var(--n,0) * 60ms)}
