/**
 * Service landing pages — HOA Balcony Inspection, Deck Inspection,
 * Balcony Inspections.
 *
 * Loaded only on those three pages (see functions.php). Intentionally
 * unlayered — same convention as blog.css / portfolio.css / single.css — so
 * it sits above main.css's @layer'ed rules. It only ADDS new components and
 * background modifiers; nothing here restyles an existing theme component,
 * so the other pages are untouched.
 *
 * Everything is built on main.css design tokens.
 */

/* ──────────────────────────────────────────────
   Section background modifiers
   Three pages reuse the same blocks more than once, so the light/white
   rhythm has to be steerable per instance.
   ────────────────────────────────────────────── */
.service-elements--white { background-color: var(--color-white); }
.service-process--surface { background-color: var(--color-surface); }
.service-compare--surface { background-color: var(--color-surface); }
.faq-section--surface { background-color: var(--color-surface); }
.service-content--surface { background-color: var(--color-surface); }

/* Closing note under a section (left-aligned counterpart of
   .service-compare__note, which is centered). */
.service-section-note {
	margin-top: var(--space-xl);
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	line-height: var(--leading-relaxed);
}

.service-section-note a {
	color: var(--color-accent);
	font-weight: 600;
}

/* main.css resets links to `color: inherit`, so every inline link inside the
   prose/card components these pages use needs its colour stated. */
.service-element p a,
.service-content__main p a:not(.btn),
.service-content__list a,
.faq-answer a,
.service-checklist__list a {
	color: var(--color-accent);
	font-weight: 600;
}

.service-element p a:hover,
.service-content__main p a:not(.btn):hover,
.service-content__list a:hover,
.faq-answer a:hover,
.service-checklist__list a:hover {
	text-decoration: underline;
}

/* ──────────────────────────────────────────────
   Risk cards with a word label
   The theme's .service-penalty-card is built for short tokens ("$500",
   "100%"): four across, --text-4xl, --space-2xl padding. The failure-mode
   cards on the deck and balcony pages use words instead, and a long one
   ("Waterproofing" — 202px at --text-2xl) cannot fit a four-column track,
   whose inner width drops to 66–168px between 769px and 1440px. So the
   word-label variant lays out two across and sizes the label fluidly.
   min-width:0 keeps the track from being pushed out by the label.
   ────────────────────────────────────────────── */
.service-penalties__grid > .service-penalty-card { min-width: 0; }

.service-penalties__grid--word { grid-template-columns: 1fr 1fr; }

@media (max-width: 700px) {
	.service-penalties__grid--word { grid-template-columns: 1fr; }
}

.service-penalty-card__amount--word {
	/* Between --text-2xl and --text-3xl, tuned so the longest label still fits
	   the two-column card at every width. */
	font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}

/* ──────────────────────────────────────────────
   Checklist — grouped inspection points (Deck page)
   ────────────────────────────────────────────── */
.service-checklist {
	background-color: var(--color-surface);
}

.service-checklist--white { background-color: var(--color-white); }

.service-checklist--white .service-checklist__group {
	background-color: var(--color-surface);
}

.service-checklist__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-xl);
}

@media (max-width: 960px) {
	.service-checklist__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.service-checklist__grid { grid-template-columns: 1fr; }
}

.service-checklist__group {
	padding: var(--space-xl);
	border-radius: var(--radius-lg);
	background-color: var(--color-white);
	border: 1px solid var(--color-border-light);
}

.service-checklist__title {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--text-lg);
	color: var(--color-primary-dark);
	margin-bottom: var(--space-lg);
	padding-bottom: var(--space-md);
	border-bottom: 2px solid var(--color-accent);
}

.service-checklist__num {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-full);
	background-color: var(--color-accent-light);
	color: var(--color-accent);
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: 700;
	line-height: 1;
}

.service-checklist__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.service-checklist__list li {
	position: relative;
	padding-left: 28px;
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	line-height: var(--leading-relaxed);
}

.service-checklist__list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 4px;
	width: 16px;
	height: 16px;
	border-radius: var(--radius-sm);
	background-color: var(--color-accent-light);
	/* stroke = --color-accent (#b35a1b); data: URLs cannot read custom properties */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b35a1b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-size: 11px 11px;
	background-position: center;
	background-repeat: no-repeat;
}

/* ──────────────────────────────────────────────
   Property-type router (Balcony page)
   ────────────────────────────────────────────── */
.service-router__heading {
	margin-top: var(--space-2xl);
	font-size: var(--text-xl);
	color: var(--color-primary-dark);
}

.service-router {
	margin-top: var(--space-lg);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-lg);
}

@media (max-width: 768px) {
	.service-router { grid-template-columns: 1fr; }
}

.service-router__item {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: var(--space-xl);
	border-radius: var(--radius-lg);
	background-color: var(--color-white);
	border: 1px solid var(--color-border-light);
	transition: all var(--transition-base);
}

.service-router__item:hover {
	border-color: var(--color-accent);
	box-shadow: var(--shadow-md);
}

.service-router__type {
	font-family: var(--font-heading);
	font-size: var(--text-base);
	font-weight: 700;
	color: var(--color-primary-dark);
	line-height: var(--leading-snug);
}

.service-router__note {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	line-height: var(--leading-relaxed);
}

.service-router__links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm) var(--space-lg);
	margin-top: auto;
	padding-top: var(--space-xs);
}

.service-router__links a {
	font-size: var(--text-sm);
	font-weight: 700;
	color: var(--color-accent);
	white-space: nowrap;
}

.service-router__links a:hover {
	color: var(--color-accent-hover);
	text-decoration: underline;
}

/* ──────────────────────────────────────────────
   Responsibility split table (HOA page) — two columns, no highlight
   column; the "who repairs it" cell is colour-coded instead.
   ────────────────────────────────────────────── */
.service-compare__table td .tag-owner,
.service-compare__table td .tag-assoc {
	display: inline-block;
	padding: 3px 10px;
	border-radius: var(--radius-full);
	font-size: var(--text-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	white-space: nowrap;
}

.service-compare__table td .tag-assoc {
	background-color: rgba(var(--color-primary-rgb), 0.08);
	color: var(--color-primary);
}

.service-compare__table td .tag-owner {
	background-color: var(--color-accent-light);
	color: var(--color-accent-dark);
}

/* ──────────────────────────────────────────────
   Inline CTA band — the doc's "Inline CTA" block where there is no
   sidebar to host .service-sidebar-cta.
   ────────────────────────────────────────────── */
.service-inline-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-lg);
	margin-top: var(--space-2xl);
	padding: var(--space-xl) var(--space-2xl);
	border-radius: var(--radius-lg);
	background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
	color: var(--color-white);
}

.service-inline-cta__text strong {
	display: block;
	font-family: var(--font-heading);
	font-size: var(--text-lg);
	margin-bottom: var(--space-2xs);
}

.service-inline-cta__text p {
	font-size: var(--text-sm);
	color: rgba(232, 236, 241, 0.7);
	margin: 0;
}

.service-inline-cta__actions {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	flex-wrap: wrap;
}

.service-inline-cta__actions span {
	font-size: var(--text-sm);
	color: rgba(232, 236, 241, 0.6);
}

.service-inline-cta__actions span a {
	color: var(--color-accent);
	font-weight: 700;
}

@media (max-width: 640px) {
	.service-inline-cta {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
		padding: var(--space-xl);
	}

	.service-inline-cta__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.service-inline-cta__actions .btn { justify-content: center; }
}
