/* sections/service-method.php */
.sm-section {
	position: relative; box-sizing: border-box; width: 100%; overflow: hidden; /* the tilted watermark never widens the page */
	padding: var(--space-section) var(--space-gutter);
	--sm-blue: color-mix(in srgb, var(--c-primary) 8%, var(--c-primary-dark));
	background-color: var(--c-bg-alt);
	background-image: radial-gradient(50rem 30rem at 100% 0%, color-mix(in srgb, var(--c-primary) 9%, transparent), transparent 70%);
	color: var(--c-text); font-family: var(--f-body); font-size: var(--fs-base); line-height: 1.6;
}
.sm-section *, .sm-section *::before, .sm-section *::after { box-sizing: border-box; }
.sm-icon { flex: none; width: 1.375rem; height: 1.375rem; }
.sm-inner { display: grid; gap: var(--space-6); max-width: var(--container); margin: 0 auto; }
.sm-inner > * { min-width: 0; }

.sm-label {
	display: inline-flex; align-items: center; gap: var(--space-2);
	margin: 0 0 var(--space-4); padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill); background: var(--c-primary-soft); color: var(--c-primary);
	font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.sm-label::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c-accent); }
.sm-section .sm-title {
	margin: 0; color: var(--c-heading);
	font-family: var(--f-heading); font-size: var(--fs-2xl); font-weight: 800;
	line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance;
}
/* One paragraph style for every paragraph (site rule): --fs-lg, muted. */
.sm-text-p { margin: var(--space-4) 0 0; color: var(--c-text-muted); font-size: var(--fs-lg); }
/* Optional short heading above a paragraph (content: [ heading, text ] instead of a plain text) */
.sm-section .sm-text-h3 { margin: var(--space-5) 0 0; color: var(--c-heading); font: 700 var(--fs-lg)/1.3 var(--f-heading); }
.sm-text-h3 + .sm-text-p { margin-top: var(--space-2); }
/* Optional contact call under the paragraphs ('contact' in the content): pale bar, chat badge, text, navy pill, phone */
.sm-contact {
	display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
	margin-top: var(--space-5); padding: var(--space-4); border-radius: var(--radius-lg);
	background: var(--c-primary-soft);
}
.sm-contact--plain { padding: 0; background: none; border-radius: 0; }
.sm-contact--plain .sm-contact-btn { padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5); font-size: var(--fs-base); box-shadow: var(--shadow-md); }
.sm-contact--plain .sm-contact-badge { width: 2.5rem; height: 2.5rem; }
.sm-contact-icon { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); box-shadow: var(--shadow-sm); }
.sm-contact-text { flex: 1 1 14rem; margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); }
.sm-contact-text strong { display: block; color: var(--c-heading); font-size: var(--fs-base); }
.sm-contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.sm-section .sm-contact-btn {
	display: inline-flex; align-items: center; gap: var(--space-3); padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
	border-radius: var(--radius-pill); background: var(--c-primary); color: var(--c-on-primary);
	font: 700 var(--fs-sm)/1.2 var(--f-body); text-decoration: none; transition: background-color 0.25s, transform 0.25s;
}
.sm-section .sm-contact-btn:hover, .sm-section .sm-contact-btn:focus { background: var(--c-primary-hover); color: var(--c-on-primary); transform: translateY(-2px); }
.sm-contact-badge { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); }
.sm-contact-badge .sm-icon { width: 1.125rem; height: 1.125rem; transform: rotate(-45deg); transition: transform 0.25s; }
.sm-contact-btn:hover .sm-contact-badge .sm-icon { transform: rotate(0deg); }
.sm-section .sm-contact-phone { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--c-heading); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap; }
.sm-section .sm-contact-phone:hover, .sm-section .sm-contact-phone:focus { color: var(--c-primary); text-decoration: underline; text-underline-offset: 0.2em; }
.sm-contact-phone .sm-icon { width: 1.125rem; height: 1.125rem; color: var(--c-accent); }
.sm-section .sm-contact a:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 3px; }

/* Watermark behind the heading: the page's pest, large and very faint, floating slowly */
.sm-head { position: relative; }
.sm-head > :not(.sm-mark) { position: relative; z-index: 1; }
.sm-mark {
	position: absolute; top: -1.5rem; right: 0; width: 9rem; height: 9rem;
	color: var(--c-primary); opacity: 0.08; stroke-width: 0.7; pointer-events: none;
	transform: rotate(-16deg); animation: sm-float 7s ease-in-out infinite alternate;
}
@keyframes sm-float { to { transform: rotate(-6deg) translateY(-0.875rem); } }

/*
	The two methods (numbered cards) and the result (navy card), as a carousel: a sideways
	scroller with scroll-snap (touch, trackpad and keyboard work without the script). One card
	at a time on a phone, two from 768px. The script makes it endless (copies of the cards on both
	sides) and adds the dots, the arrows and a slow autoplay.
*/
.sm-steps {
	display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: var(--space-4);
	/* Room above and below for the lifted card and its shadow, cancelled by the margin. */
	margin: calc(-1 * var(--space-3)) 0; padding: var(--space-3) 0; list-style: none;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.sm-steps::-webkit-scrollbar { display: none; }
.sm-steps > li { scroll-snap-align: start; }
.sm-step, .sm-result {
	position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-4); align-content: start;
	padding: var(--space-5); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
}
.sm-step {
	background: var(--c-surface); box-shadow: var(--shadow-sm);
	transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
/* Hover: the card lifts and gets a red edge on the left. */
.sm-step:hover {
	border-color: color-mix(in srgb, var(--c-primary) 35%, transparent);
	box-shadow: var(--shadow-md), inset 3px 0 0 var(--c-accent); transform: translateY(-0.25rem);
}
.sm-step-badge {
	position: relative; display: grid; place-items: center; width: 3rem; height: 3rem;
	border-radius: var(--radius-sm); background: var(--c-primary); color: var(--c-on-primary); transition: transform 0.3s;
}
.sm-step:hover .sm-step-badge { transform: scale(1.08) rotate(-5deg); }
.sm-step .sm-step-badge::after {
	content: attr(data-n); position: absolute; top: -0.5rem; right: -0.5rem;
	display: grid; place-items: center; width: 1.375rem; height: 1.375rem;
	border: 2px solid var(--c-surface); border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent);
	font-size: 0.6875rem; font-weight: 800; line-height: 1;
}
.sm-section .sm-step-title { margin: 0; color: var(--c-heading); font: 700 var(--fs-lg)/1.3 var(--f-heading); }
.sm-step-text { margin: var(--space-1) 0 0; color: var(--c-text-muted); font-size: var(--fs-sm); }
/* Result: flat reference navy, red badge with a tick */
.sm-result { border-color: var(--sm-blue); background: var(--sm-blue); box-shadow: var(--shadow-md); }
.sm-result .sm-step-badge { background: var(--c-accent); color: var(--c-on-accent); }
.sm-result .sm-icon { stroke-width: 2.6; }
.sm-section .sm-result .sm-step-title { color: var(--c-on-dark); }
.sm-result .sm-step-text { color: color-mix(in srgb, var(--c-on-dark) 84%, transparent); }

/* Carousel controls (shown by the script): dots on the left, arrows on the right */
.sm-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-4); }
.sm-nav[hidden] { display: none; }
.sm-dots { display: flex; gap: var(--space-2); }
.sm-section .sm-dot { width: 0.625rem; height: 0.625rem; padding: 0; border: 0; border-radius: var(--radius-pill); background: var(--c-border); cursor: pointer; transition: width 0.3s, background-color 0.3s; }
.sm-section .sm-dot:hover, .sm-section .sm-dot:focus { background: var(--c-primary); }
.sm-section .sm-dot[aria-current="true"] { width: 1.75rem; background: var(--c-accent); }
.sm-arrows { display: flex; gap: var(--space-2); }
.sm-section .sm-arrow {
	display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
	border: 1px solid var(--c-border); border-radius: 50%; background: var(--c-surface); color: var(--c-primary); cursor: pointer;
	transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.sm-section .sm-arrow:hover:not(:disabled), .sm-section .sm-arrow:focus-visible { border-color: var(--c-primary); background: var(--c-primary); color: var(--c-on-primary); }
.sm-section .sm-dot:focus-visible, .sm-section .sm-arrow:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.sm-arrow--prev .sm-icon { transform: rotate(180deg); }

@media (min-width: 768px) {
	.sm-steps { grid-auto-columns: calc((100% - var(--space-4)) / 2); }
}
@media (min-width: 1024px) {
	/*
		Row 1: text | form, ending on the same line (the shorter one stretches: the form card
		takes the spare height above its footer). Row 2: the carousel of the methods and the result.
	*/
	.sm-inner {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: "text form" "methods methods";
		gap: var(--space-7) var(--space-8); align-items: stretch;
	}
	.sm-text { grid-area: text; }
	.sm-form { grid-area: form; display: flex; flex-direction: column; }
	.sm-form-card { display: flex; flex: 1; }
	.sm-form-card > * { flex: 1; }
	.sm-methods { grid-area: methods; }
	.sm-mark { top: -2.5rem; width: 14rem; height: 14rem; }
}
@media (prefers-reduced-motion: reduce) {
	.sm-section *, .sm-section *::after { animation: none !important; transition: none !important; }
}
