/**
 * Absolute 2026: inner page styles.
 *
 * Page header (division-coloured, with the brand's slanted bottom edge, and
 * breadcrumbs), readable content with styled step and tick lists, the
 * service page layout (content plus a sticky contact sidebar), and hub
 * listings.
 *
 * 0.6.0: page headers can show the page's featured image behind a tint.
 *
 * @package Absolute_2026
 * @author  Steve Austen
 * @company The PCGP
 * @version 0.6.0
 */

/* ==========================================================================
   Page header
   ========================================================================== */

.page-header {
	padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) calc(clamp(2.5rem, 2rem + 3vw, 4.5rem) + var(--slant));
	background: var(--ink);
	color: #fff;
	/* The brand slant along the bottom edge. */
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
	--focus-ring: #fff;
}

.page-header[data-division] {
	background: var(--accent);
}

.page-header .division-label {
	color: #fff;
}

.page-header__title {
	max-width: 24ch;
	margin: 0;
	color: #fff;
	font-size: var(--h1);
}

.page-header__intro {
	max-width: 46rem;
	margin: 1rem 0 0;
	color: #fff;
	font-size: var(--text-lg);
}

/*
 * 0.6.0: page header with a photo (the page's featured image).
 *
 * The photo sits behind a tint of the division's darker shade: forest green
 * for Photocopiers, plum for Facilities, ink for anything else. The brand
 * green itself is too light for this (white on it is only 5.0:1 before any
 * photo shows through). At 88% the tint keeps white text at 5.4:1 or better
 * even over a pure white patch of photo. On wide screens the text stays in
 * the left 61% at most, so the tint holds at 90% there and fades on the
 * right, where more of the photo shows.
 */
.page-header--photo {
	--header-tint: var(--ink);
	position: relative;
	isolation: isolate;
	background: var(--header-tint);
}

.page-header--photo[data-division] {
	--header-tint: var(--accent-strong);
	background: var(--header-tint);
}

.page-header__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.page-header--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--header-tint) 88%, transparent);
}

@media (min-width: 80em) {
	.page-header--photo::before {
		background: linear-gradient(90deg, color-mix(in srgb, var(--header-tint) 90%, transparent) 0 62%, color-mix(in srgb, var(--header-tint) 30%, transparent) 100%);
	}
}

.page-header--photo .page-header__title,
.page-header--photo .page-header__intro {
	text-shadow: 0 1px 3px rgb(0 0 0 / 30%);
}

/* Breadcrumbs (pages below another page) */
.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
}

.breadcrumb li {
	display: inline-flex;
	align-items: center;
	color: #fff;
}

/* Slanted separator, echoing the brand's diagonal. */
.breadcrumb li + li::before {
	content: "/";
	margin: 0 0.6rem;
	opacity: 0.6;
}

.breadcrumb a {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: rgb(255 255 255 / 50%);
}

.breadcrumb a:hover {
	text-decoration-color: #fff;
}

.breadcrumb [aria-current="page"] {
	font-weight: 600;
}

/* ==========================================================================
   Page body and content
   ========================================================================== */

.page-body {
	padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.entry-content {
	max-width: 46rem;
}

.entry-content > * + * {
	margin-top: 1em;
}

.entry-content h2 {
	margin-top: 1.75em;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}

.entry-content h3 {
	margin-top: 1.5em;
	font-size: 1.25rem;
}

.entry-content a {
	color: var(--accent);
	font-weight: 600;
}

/* The first paragraph reads as a lead-in. */
.entry-content > p:first-child {
	color: var(--ink);
	font-size: var(--text-lg);
}

/*
 * Numbered lists become steps: a number in a circle in the division colour.
 * Used for the "How it works" sections on service pages.
 */
.entry-content ol {
	padding-left: 0;
	list-style: none;
	counter-reset: step;
}

.entry-content ol > li {
	position: relative;
	padding-left: 3rem;
	counter-increment: step;
}

.entry-content ol > li + li {
	margin-top: 1.1rem;
}

.entry-content ol > li::before {
	content: counter(step);
	position: absolute;
	top: -0.05rem;
	left: 0;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
}

/* Bulleted lists get a tick in the division colour. */
.entry-content ul {
	padding-left: 0;
	list-style: none;
}

.entry-content ul > li {
	position: relative;
	padding-left: 1.9rem;
}

.entry-content ul > li + li {
	margin-top: 0.6rem;
}

.entry-content ul > li::before {
	content: "";
	position: absolute;
	top: 0.3em;
	left: 0;
	width: 1.15rem;
	height: 1.15rem;
	background: var(--accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.entry-content li strong {
	color: var(--ink);
}

.entry-content img {
	border-radius: var(--radius);
}

.post-meta {
	color: var(--ink-3);
}

/* Hub pages: service cards under the introduction. */
.page-children {
	margin-top: 2.5rem;
}

.page-404__home {
	margin-top: 2rem;
	font-weight: 700;
}

/* Post pagination */
.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	gap: 0.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.pagination .page-numbers.current {
	border-color: var(--ink);
	background: var(--ink);
	color: #fff;
}

/* ==========================================================================
   Service pages (tpl-service.php)
   ========================================================================== */

.service-body {
	padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.service-layout {
	display: grid;
	gap: 2.5rem;
}

@media (min-width: 67.5em) {
	.service-layout {
		grid-template-columns: minmax(0, 1fr) 22rem;
		align-items: start;
		gap: 4.5rem;
	}

	/* The sidebar stays in view under the pinned navigation bar. */
	.service-aside {
		position: sticky;
		top: 5.5rem;
	}
}

/* Contact card */
.contact-card {
	position: relative;
	overflow: hidden;
	padding: 1.75rem;
	border-radius: var(--radius);
	background: var(--ink);
	color: rgb(255 255 255 / 85%);
	--focus-ring: #fff;
}

/* Division stripe across the top of the card. */
.contact-card::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 5px;
	background: var(--accent-bright);
}

.contact-card__title {
	margin-bottom: 0.4rem;
	color: #fff;
	font-size: 1.5rem;
}

.contact-card__intro {
	font-size: var(--text-sm);
}

.contact-card__lines {
	display: grid;
	gap: 0.25rem;
	margin-bottom: 1.25rem;
}

.contact-card__lines a {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.55rem 0;
	color: #fff;
	text-decoration: none;
}

.contact-card__lines .icon {
	flex-shrink: 0;
	color: var(--accent-bright);
}

.contact-card__lines a > span {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.contact-card__label {
	color: rgb(255 255 255 / 68%);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.contact-card__value {
	font-size: 1.125rem;
	font-weight: 700;
}

.contact-card__value--small {
	font-size: 0.9375rem;
	overflow-wrap: anywhere;
}

.contact-card__lines a:hover .contact-card__value {
	text-decoration: underline;
}

/* Bright division accent with dark text (9.2:1 lime, 4.8:1 lilac). */
.contact-card__button {
	width: 100%;
	background: var(--accent-bright);
	color: var(--ink);
}

.contact-card__button:hover {
	background: #fff;
	color: var(--ink);
}

.contact-card__hours {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 1rem 0 0;
	font-size: 0.875rem;
}

/* Related services */
.related-services {
	margin-top: 1.25rem;
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.related-services__title {
	margin-bottom: 0.75rem;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 700;
}

.related-services ul {
	display: grid;
	gap: 0.15rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.related-services li a {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.45rem 0.5rem;
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.related-services li a:hover {
	background: var(--accent-tint);
}

.related-services__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--accent-tint-2);
	color: var(--accent);
}

.related-services__hub {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--accent);
	font-size: var(--text-sm);
	font-weight: 700;
	text-decoration: none;
}

.related-services__hub:hover {
	text-decoration: underline;
}
