/*
 * ATP Service components — shared, reusable stylesheet.
 *
 * Scope: every rule is anchored on a .srvc-* component root, so the file can be
 * loaded site-wide without touching anything else. No page-id, no body class, no
 * page-wrapper dependency, no 100vw / calc(50% - 50vw) bleed: the components sit
 * inside the main column of template-service.php (or any other contained canvas)
 * and simply fill their container.
 */

/* ---------------------------------------------------------------- tokens -- */
.srvc-hero,
.srvc-equipment-grid,
.srvc-link-note,
.srvc-photo,
.srvc-problem-table,
.srvc-cta,
.srvc-brand-list,
.srvc-process,
.srvc-why,
.srvc-badges,
.srvc-text-links {
	--srvc-ink: #101B2B;
	--srvc-body: #59616D;
	--srvc-navy: #16293F;
	--srvc-gold: #E2B94B;
	--srvc-gold-hover: #E5B536;
	--srvc-warm: #F7F5F1;
	--srvc-line: #E7E2DA;
	--srvc-link: #1F4E6B;

	box-sizing: border-box;
	min-width: 0;
	margin: 36px 0;
	color: var(--srvc-body);
	font-family: inherit;
	line-height: 1.65;
	scroll-margin-top: 100px;
}

.srvc-hero *,
.srvc-equipment-grid *,
.srvc-link-note *,
.srvc-photo *,
.srvc-problem-table *,
.srvc-cta *,
.srvc-brand-list *,
.srvc-process *,
.srvc-why *,
.srvc-badges *,
.srvc-text-links * {
	box-sizing: border-box;
}

/*
 * Classic themes make WordPress restore .wp-block-group__inner-container inside
 * every core/group. Making it transparent keeps our grids and child selectors
 * working on the real content instead of that wrapper.
 */
[class*="srvc-"] > .wp-block-group__inner-container {
	display: contents;
}

/* ------------------------------------------------------ shared typography -- */
.srvc-hero h1 {
	margin: 0 0 18px;
	color: #FFF;
	font-size: 38px;
	line-height: 1.16;
	letter-spacing: -.02em;
}

.srvc-equipment-grid h2,
.srvc-problem-table h2,
.srvc-brand-list h2,
.srvc-process h2,
.srvc-why h2,
.srvc-text-links h2 {
	margin: 0 0 16px;
	color: var(--srvc-ink);
	font-size: 26px;
	line-height: 1.25;
}

.srvc-equipment-grid h3,
.srvc-process h3 {
	margin: 0 0 8px;
	color: var(--srvc-ink);
	font-size: 18px;
	line-height: 1.35;
}

.srvc-hero p,
.srvc-equipment-grid p,
.srvc-link-note p,
.srvc-problem-table p,
.srvc-cta p,
.srvc-brand-list p,
.srvc-process p,
.srvc-why p,
.srvc-text-links p {
	margin: 0 0 14px;
}

.srvc-hero > :last-child,
.srvc-equipment-grid > :last-child,
.srvc-link-note p:last-child,
.srvc-problem-table > :last-child,
.srvc-cta > :last-child,
.srvc-brand-list > :last-child,
.srvc-process > :last-child,
.srvc-why > :last-child,
.srvc-text-links > :last-child,
[class*="srvc-"] > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

.srvc-equipment-grid a:not(.wp-block-button__link),
.srvc-link-note a,
.srvc-problem-table a,
.srvc-brand-list a,
.srvc-process a,
.srvc-why a,
.srvc-text-links a {
	color: var(--srvc-link);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.srvc-hero :focus-visible,
.srvc-equipment-grid :focus-visible,
.srvc-link-note :focus-visible,
.srvc-problem-table :focus-visible,
.srvc-cta :focus-visible,
.srvc-brand-list :focus-visible,
.srvc-process :focus-visible,
.srvc-why :focus-visible,
.srvc-badges :focus-visible,
.srvc-text-links :focus-visible {
	outline: 3px solid #1F4E6B;
	outline-offset: 4px;
}

/* ------------------------------------------------------- shared buttons --- */
.srvc-hero .wp-block-button__link,
.srvc-cta .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 18px;
	border: 1px solid var(--srvc-gold);
	border-radius: 8px;
	background: var(--srvc-gold);
	color: var(--srvc-ink);
	font-weight: 700;
	font-size: inherit;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}

.srvc-hero .wp-block-button__link:hover,
.srvc-cta .wp-block-button__link:hover {
	background: var(--srvc-gold-hover);
	border-color: var(--srvc-gold-hover);
	color: var(--srvc-ink);
}

.srvc-cta .is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: #536174;
	color: var(--srvc-ink);
}

.srvc-hero .is-style-outline > .wp-block-button__link,
.srvc-cta--dark .is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: #A9B6C5;
	color: #FFF;
}

.srvc-hero .is-style-outline > .wp-block-button__link:hover,
.srvc-cta--dark .is-style-outline > .wp-block-button__link:hover {
	background: #1E354F;
	border-color: #FFF;
	color: #FFF;
}

.srvc-hero .wp-block-buttons,
.srvc-cta .wp-block-buttons {
	gap: 12px;
	margin: 20px 0 0;
}

.srvc-hero :focus-visible,
.srvc-cta--dark :focus-visible {
	outline-color: #FFF;
}

/* -------------------------------------------------------------- 1. hero --- */
.srvc-hero {
	margin-top: 0;
	padding: 32px;
	border-radius: 14px;
	background: var(--srvc-navy);
	color: #E2E8F0;
}

.srvc-hero__eyebrow {
	margin: 0 0 14px;
	color: var(--srvc-gold);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.srvc-hero__jump {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 22px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid #536174;
	list-style: none;
}

.srvc-hero__jump li {
	margin: 0;
}

.srvc-hero__jump a {
	color: #FFF;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* --------------------------------------------------------- 2. equipment --- */
.srvc-equipment-grid__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
}

.srvc-card {
	min-width: 0;
	padding: 20px;
	border: 1px solid var(--srvc-line);
	border-top: 3px solid var(--srvc-gold);
	border-radius: 10px;
	background: var(--srvc-warm);
}

.srvc-card > :last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------- 3. link note --- */
.srvc-link-note {
	margin: 20px 0 36px;
	padding: 16px 20px;
	border-left: 3px solid var(--srvc-gold);
	border-radius: 0 8px 8px 0;
	background: var(--srvc-warm);
}

/* ------------------------------------------------------------- 4. photo --- */
.srvc-photo {
	margin: 24px 0 36px;
}

.srvc-photo img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

/* ---------------------------------------------------------- 5. problems --- */
.srvc-problem-table__wrap {
	overflow: hidden;
	border: 1px solid var(--srvc-line);
	border-radius: 10px;
}

.srvc-problem-table table {
	width: 100%;
	margin: 0;
	table-layout: fixed;
	border: 0;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}

.srvc-problem-table th,
.srvc-problem-table td {
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid var(--srvc-line);
	overflow-wrap: anywhere;
	text-align: left;
	vertical-align: top;
}

.srvc-problem-table thead th {
	background: var(--srvc-navy);
	color: #FFF;
	font-weight: 700;
}

.srvc-problem-table thead th:first-child {
	width: 38%;
}

.srvc-problem-table tbody th {
	background: var(--srvc-warm);
	color: var(--srvc-ink);
	font-weight: 600;
}

.srvc-problem-table tbody td {
	background: #FFF;
	color: var(--srvc-ink);
}

.srvc-problem-table tbody tr:last-child th,
.srvc-problem-table tbody tr:last-child td {
	border-bottom: 0;
}

/* --------------------------------------------------------------- 6. cta --- */
.srvc-cta {
	padding: 24px;
	border: 1px solid var(--srvc-line);
	border-radius: 12px;
	background: var(--srvc-warm);
}

.srvc-cta__title {
	margin: 0 0 8px;
	color: var(--srvc-ink);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
}

.srvc-cta .wp-block-buttons {
	margin-top: 16px;
}

.srvc-cta--dark {
	border-color: var(--srvc-navy);
	background: var(--srvc-navy);
	color: #E2E8F0;
}

.srvc-cta--dark .srvc-cta__title {
	color: #FFF;
}

/* Compact spacing variant — pairs a CTA tightly with the block above it. */
.srvc-cta--compact {
	margin-top: 16px;
}

.srvc-problem-table:has(+ .srvc-cta) {
	margin-bottom: 0;
}

.srvc-problem-table + .srvc-cta {
	margin-top: 16px;
}

/* ------------------------------------------------------------ 7. brands --- */
.srvc-brand-list ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.srvc-brand-list li {
	margin: 0;
	padding: 0;
}

.srvc-brand-list li a {
	display: block;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--srvc-line);
	border-radius: 8px;
	background: #FFF;
	font-weight: 600;
	text-decoration: none;
}

.srvc-brand-list li a:hover {
	border-color: var(--srvc-gold);
}

/* ----------------------------------------------------------- 8. process --- */
.srvc-process ol {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: srvc-step;
}

.srvc-process ol > li {
	position: relative;
	margin: 0;
	padding: 0 0 20px 44px;
	counter-increment: srvc-step;
}

.srvc-process ol > li:last-child {
	padding-bottom: 0;
}

.srvc-process ol > li::before {
	content: counter(srvc-step);
	position: absolute;
	top: 0;
	left: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #F7EFDC;
	color: var(--srvc-ink);
	font-weight: 700;
	line-height: 30px;
	text-align: center;
}

.srvc-process ol > li p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------- 9. why + badges -- */
.srvc-why + .srvc-badges {
	margin-top: 24px;
}

.srvc-badges {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	max-width: 680px;
	margin-inline: auto;
}

.srvc-badges figure,
.srvc-badges .wp-block-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	margin: 0;
}

.srvc-badges a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	text-decoration: none;
}

.srvc-badges img {
	display: block;
	width: 100%;
	max-width: 140px;
	height: auto;
	object-fit: contain;
}

/* ------------------------------------------------------ 10. text + links -- */
.srvc-text-links p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------- mobile ---- */
@media (max-width: 639px) {
	.srvc-hero,
	.srvc-equipment-grid,
	.srvc-link-note,
	.srvc-problem-table,
	.srvc-cta,
	.srvc-brand-list,
	.srvc-process,
	.srvc-why,
	.srvc-badges,
	.srvc-text-links {
		margin-bottom: 28px;
	}

	.srvc-hero {
		padding: 24px 20px;
	}

	.srvc-hero h1 {
		font-size: 28px;
	}

	.srvc-equipment-grid h2,
	.srvc-problem-table h2,
	.srvc-brand-list h2,
	.srvc-process h2,
	.srvc-why h2,
	.srvc-text-links h2 {
		font-size: 24px;
	}

	.srvc-equipment-grid h3,
	.srvc-process h3 {
		font-size: 17px;
	}

	.srvc-cta {
		padding: 22px 20px;
	}

	.srvc-cta__title {
		font-size: 20px;
	}

	.srvc-equipment-grid__cards {
		grid-template-columns: 1fr;
	}

	.srvc-card {
		padding: 18px;
	}

	.srvc-hero .wp-block-buttons,
	.srvc-cta .wp-block-buttons {
		flex-direction: column;
	}

	.srvc-hero .wp-block-button,
	.srvc-cta .wp-block-button {
		width: 100%;
	}

	.srvc-hero .wp-block-button__link,
	.srvc-cta .wp-block-button__link {
		width: 100%;
	}

	/* Rows restack vertically — never a horizontal table scroll. */
	.srvc-problem-table table,
	.srvc-problem-table tbody,
	.srvc-problem-table tr,
	.srvc-problem-table tbody th,
	.srvc-problem-table tbody td {
		display: block;
		width: auto;
	}

	.srvc-problem-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.srvc-problem-table tbody tr {
		padding: 14px 16px;
		border-bottom: 1px solid var(--srvc-line);
		background: #FFF;
	}

	.srvc-problem-table tbody tr:nth-child(even) {
		background: var(--srvc-warm);
	}

	.srvc-problem-table tbody tr:last-child {
		border-bottom: 0;
	}

	.srvc-problem-table tbody th,
	.srvc-problem-table tbody td {
		padding: 0;
		border: 0;
		background: transparent;
	}

	.srvc-problem-table tbody th {
		margin-bottom: 6px;
	}

	.srvc-badges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 16px;
		max-width: 340px;
	}
}

/* ------------------------------------------ 11. request-form wrapper ----- */
/*
 * Optional reusable wrapper around the existing dynamic acf/contact-form block.
 * It only adds spacing, the scroll target offset and the gold submit — the block
 * itself keeps its own render callback and data source.
 */
.srvc-form {
	margin: 36px 0;
	scroll-margin-top: 100px;
}

.srvc-form section {
	border-radius: 14px;
	scroll-margin-top: 100px;
}

.srvc-form .wpcf7-submit {
	min-height: 46px;
	border-color: #E2B94B;
	background: #E2B94B;
	color: #101B2B;
}

.srvc-form .wpcf7-submit:hover {
	background: #E5B536;
}
