/**
 * Service pages: season calendar, cost, deliverables, price, sub-service
 * links, table of contents, service rows, quote hub note.
 *
 * Moved from the mockup's components.css (design-261005-final); selectors
 * and values unchanged, deviations in docs/komponenty.md. Loads only on
 * pages with one of its trigger classes (plantworld_conditional_styles()
 * in inc/enqueue.php); every rule here contains one of them.
 *
 * @package plantworld
 */

/* Service row: one job = one H2. Text and photo alternate; without a photo the text takes the .pw-col-70 width. */
.pw-service-rows {
	display: flex;
	flex-direction: column;
}

/* The line between rows inside one section is weaker than the hairline between sections. */
.pw-service-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 64px;
	align-items: center;
	padding: 64px 0;
	border-top: 1px solid var(--hairline-weak);
}

.pw-service-row:first-child {
	padding-top: 0;
	border-top: 0;
}

.pw-service-row:last-child {
	padding-bottom: 0;
}

/* Strictly alternating: odd rows text | photo, even rows photo | text. DOM order is always text → photo. */
.pw-service-row:nth-child(even) > .pw-figure {
	order: -1;
}

.pw-service-row__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 60ch;
}

.pw-service-row__body .pw-h3 {
	margin-top: 8px;
}

/* Subpage table of contents: one wrapping row of text links separated by hairlines. */
/*
 * "Na tej stronie" (stage G [15, 17], Damian): a darker box with the links
 * as rectangular tiles, as on the old site – in place of the links between
 * two hairlines and vertical separators of the mockup. The same on every
 * service page (block plantworld/toc).
 */
.pw-toc {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 48px;
	padding: 24px;
	background: var(--pw-paper-alt);
}

.pw-toc__label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-lead-muted);
}

.pw-toc__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The second selector: in the editor the text of a list item sits in its own field inside the <li>; it lays the link out as the <li> does on the page. */
.pw-toc__list > li,
.pw-toc__list > li > .block-editor-rich-text__editable {
	display: flex;
}

.pw-toc__list > li > .block-editor-rich-text__editable {
	flex: 1 1 auto;
}

.pw-toc__link {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 12px 16px;
	border: 1px solid var(--hairline);
	background: var(--pw-paper);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--text-heading);
	text-decoration: none;
	transition: var(--transition-color);
}

/* A small arrow down: the link jumps further down the page. */
.pw-toc__link::after {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	color: var(--action-on-light);
	transform: rotate(45deg);
}

.pw-toc__link:hover {
	border-color: var(--action-on-light);
	color: var(--action-on-light);
}

.pw-toc__link:focus-visible {
	outline: 2px solid var(--focus-ring-on-light);
	outline-offset: 2px;
}

.pw-toc + .pw-entry-hero {
	margin-top: 48px;
}

/* Cost and duration: two columns, a <dl> of factors: bold term + one sentence. */
.pw-cost-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 64px;
	align-items: start;
}

.pw-cost-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.pw-cost {
	margin: 0;
	border-top: 1px solid var(--hairline);
}

.pw-cost__row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 0;
	border-bottom: 1px solid var(--hairline-weak);
}

.pw-cost dt {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--pw-ink);
}

.pw-cost dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--pw-text);
}

.pw-price {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/*
 * Season calendar (stage G [19]): on a desktop a real <table> – a band
 * with the seasons, treatments in the first column, a line between rows
 * only; ≤959 one card per treatment ("zabieg → pora roku"). One version at
 * a time is visible.
 */
.pw-season__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.pw-season__table caption {
	caption-side: top;
	text-align: left;
	padding-bottom: 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-lead-muted);
}

.pw-season__table th,
.pw-season__table td {
	padding: 16px 20px;
	border: 0;
	text-align: left;
	vertical-align: top;
}

/* After the reset above (Neve draws its own cell borders), one line between rows. */
.pw-season__table tbody tr + tr > :is(th, td) {
	border-top: 1px solid var(--hairline-weak);
}

.pw-season__table thead th {
	padding-top: 14px;
	padding-bottom: 14px;
	background: var(--pw-paper-alt);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pw-ink);
}

.pw-season__table tbody th {
	width: 22%;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--pw-ink);
}

.pw-season__table td {
	font-size: 15px;
	line-height: 1.6;
	color: var(--pw-text);
}

.pw-season__months {
	display: block;
	margin-top: 4px;
	font-weight: 400;
	letter-spacing: 0.08em;
	color: var(--text-lead-muted);
}

.pw-season__cards {
	display: none;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.pw-season__caption {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-lead-muted);
}

.pw-season__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px;
	background: var(--pw-paper-alt);
}

.pw-season__name {
	margin: 0 0 4px;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--pw-ink);
}

.pw-season__dl {
	margin: 0;
}

.pw-season__row {
	display: grid;
	grid-template-columns: minmax(96px, 30%) minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
}

.pw-season__row + .pw-season__row {
	border-top: 1px solid var(--hairline-weak);
}

.pw-season__row dt {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pw-ink);
}

.pw-season__row dt .pw-season__months {
	margin-top: 2px;
	font-size: 11px;
}

.pw-season__row dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--pw-text);
}

.pw-season--compact .pw-season__table {
	display: none;
}

.pw-season--compact .pw-season__cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

/* Project scope: <ol>, the number comes from a CSS counter (ornament, no text node). 3/2/1. */
.pw-deliverables {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 48px 32px;
	counter-reset: pw-deliv;
}

.pw-deliverables > li {
	counter-increment: pw-deliv;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 24px;
	border-top: 1px solid var(--hairline);
}

.pw-deliverables > li::before {
	content: counter(pw-deliv, decimal-leading-zero);
	margin-bottom: 8px;
	font-family: var(--font-display);
	font-size: 40px;
	line-height: 1;
	color: var(--pw-stone);
}

.pw-pagehead--hero + .pw-toc {
	margin-top: 64px;
}

.pw-hub-note {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 16px;
	margin-top: 48px;
}

/* Sub-page list in the hub: two columns of plain links. */
.pw-sublinks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
	border-top: 1px solid var(--hairline);
}

.pw-sublinks li {
	border-bottom: 1px solid var(--hairline-weak);
}

.pw-sublinks a {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-size: 15px;
	font-weight: 500;
	color: var(--action-on-light);
	text-decoration: none;
	transition: var(--transition-color);
}

.pw-sublinks a:hover {
	color: var(--action-on-light-hover);
}

@media (max-width: 959px) {


	.pw-service-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		padding: 48px 0;
	}


	/* ≤959 the photo is always above the title, no alternation. */
	.pw-service-row > .pw-figure,
	.pw-service-row:nth-child(even) > .pw-figure {
		order: -1;
	}


	.pw-service-row__body {
		max-width: none;
	}


	.pw-cost-pair {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}


	.pw-season__table {
		display: none;
	}


	.pw-season__cards {
		display: grid;
	}


	.pw-deliverables {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}


	/* Table of contents ≤959: the tiles of the box, closer together. */
	.pw-toc {
		padding: 16px;
	}
}

@media (max-width: 575px) {


	.pw-service-row {
		padding: 40px 0;
	}


	.pw-toc {
		margin-top: 32px;
		padding: 16px;
	}


	.pw-toc + .pw-entry-hero {
		margin-top: 32px;
	}


	.pw-season__cards {
		grid-template-columns: minmax(0, 1fr);
	}


	.pw-deliverables {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}


	.pw-sublinks {
		grid-template-columns: minmax(0, 1fr);
	}
}


/*
 * Stage G [13, 30] (Damian, 29.10.2026): lines only between the items of a
 * list – none above the first (the heading above it is enough) and none
 * after the last. One rule for the whole site; a subheading (H3) is set
 * off by the space under it, not by a line.
 */
.pw-cost {
	border-top: 0;
}

.pw-cost__row:last-child {
	border-bottom: 0;
}

/* A grid: the whole first row goes without a line (3, 2 or 1 columns), so the row stays even. */
.pw-deliverables > li:nth-child(-n + 3) {
	border-top: 0;
}

@media (max-width: 959px) {
	.pw-deliverables > li:nth-child(3) {
		border-top: 1px solid var(--hairline);
	}
}

@media (max-width: 575px) {
	.pw-deliverables > li:nth-child(2) {
		border-top: 1px solid var(--hairline);
	}
}

/* "Co dostajesz w projekcie" on the dark section (review of 29.10.2026: in place of the steps the tabs already show). */
.pw-section--dark .pw-deliverables > li {
	border-top-color: var(--hairline-on-dark);
}

.pw-section--dark .pw-deliverables > li::before {
	color: var(--text-on-dark-muted);
}

/* Review of 29.10.2026: a photo under the price fills the empty column beside the cost factors. */
.pw-price .pw-price__photo {
	margin: 16px 0 0;
}
