/*
 * Content blocks on the front page: .information sections, lists, tables and the
 * auto-generated table of contents.
 *
 * Kept in its own file rather than appended to main.css, because main.css is compiled
 * from assets/css/scss and a rebuild would wipe anything added there.
 *
 * Colours come from the ACF theme settings exposed as CSS custom properties in
 * header.php, so editors can restyle from wp-admin. The literal values are only
 * fallbacks for when a variable is unset — do not treat them as the live palette.
 */

.information {
	--inf-accent: var(--button_main_background, #f69104);
	--inf-card: var(--card_item_background, #006cd1);
	--inf-text: var(--color_text_default, #ffffff);
	--inf-muted: rgba(255, 255, 255, 0.74);
	--inf-line: rgba(255, 255, 255, 0.13);
	--inf-surface: rgba(255, 255, 255, 0.05);
	--inf-surface-2: rgba(0, 0, 0, 0.22);
	--inf-radius: 14px;
}

/* ---------- Body copy ---------- */

.information .full,
.information .left,
.information .text-image__box .left {
	font-size: 1.02rem;
	line-height: 1.72;
	color: var(--inf-muted);
}

.information p {
	margin: 0 0 1.1em;
}

.information p:last-child {
	margin-bottom: 0;
}

.information strong,
.information b {
	color: var(--inf-text);
}

/* Body links only — the contents box styles its own links below. */
.information a:not(.btn):not(.home-toc__list a) {
	color: var(--inf-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.information a:not(.btn):not(.home-toc__list a):hover {
	text-decoration-thickness: 2px;
}

/* ---------- Unordered lists: cards with an accent marker ---------- */

.information ul:not(.home-toc__list):not(.swiper-wrapper) {
	margin: 1.6em 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.information ul:not(.home-toc__list):not(.swiper-wrapper) > li {
	position: relative;
	margin: 0;
	padding: 13px 18px 13px 46px;
	background: var(--inf-surface);
	border: 1px solid var(--inf-line);
	border-radius: var(--inf-radius);
	color: var(--inf-muted);
	line-height: 1.6;
	transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.information ul:not(.home-toc__list):not(.swiper-wrapper) > li::before {
	content: '';
	position: absolute;
	left: 18px;
	top: 1.35em;
	width: 9px;
	height: 9px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--inf-accent);
	box-shadow: 0 0 0 4px rgba(246, 145, 4, 0.18);
}

@media (any-hover: hover) {
	.information ul:not(.home-toc__list):not(.swiper-wrapper) > li:hover {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(246, 145, 4, 0.42);
		transform: translateX(3px);
	}
}

/* ---------- Ordered lists: numbered steps ---------- */

.information ol:not(.home-toc__list) {
	margin: 1.6em 0;
	padding: 0;
	list-style: none;
	counter-reset: inf-step;
	display: grid;
	gap: 10px;
}

.information ol:not(.home-toc__list) > li {
	position: relative;
	margin: 0;
	padding: 14px 18px 14px 56px;
	background: var(--inf-surface);
	border: 1px solid var(--inf-line);
	border-radius: var(--inf-radius);
	color: var(--inf-muted);
	line-height: 1.6;
	counter-increment: inf-step;
	transition: border-color 0.25s ease, background 0.25s ease;
}

.information ol:not(.home-toc__list) > li::before {
	content: counter(inf-step);
	position: absolute;
	left: 14px;
	top: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--inf-accent);
	color: #0a0a0a;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1;
}

@media (any-hover: hover) {
	.information ol:not(.home-toc__list) > li:hover {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(246, 145, 4, 0.42);
	}
}

/* Nested lists stay light — no card inside a card. */
.information li ul,
.information li ol {
	margin: 12px 0 0;
	gap: 6px;
}

.information li ul > li,
.information li ol > li {
	padding: 4px 0 4px 20px;
	background: none;
	border: 0;
	border-radius: 0;
}

.information li ul > li::before {
	left: 2px;
	width: 5px;
	height: 5px;
	box-shadow: none;
}

.information li ol > li::before {
	left: 0;
	top: 4px;
	width: 20px;
	height: 20px;
	font-size: 0.7rem;
}

/* ---------- Tables ---------- */

/* Wide tables scroll inside their own box; the page body must never scroll sideways. */
.information .table-scroll {
	margin: 1.8em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--inf-radius);
	border: 1px solid var(--inf-line);
	/* Fades the right edge so it reads as scrollable. */
	background:
		linear-gradient(to right, transparent calc(100% - 40px), rgba(3, 4, 121, 0.65)) right / 100% 100% no-repeat,
		var(--inf-surface);
}

.information table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.information th,
.information td {
	padding: 13px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--inf-line);
	color: var(--inf-muted);
}

/*
 * Header row. The editor emits tables without <thead> — the first row is plain
 * <td><b>…</b></td> — so the first row is styled as the header either way.
 */
.information thead th,
.information thead td,
.information table > tbody > tr:first-child > td {
	background: var(--inf-surface-2);
	color: var(--inf-text);
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	white-space: nowrap;
	border-bottom: 2px solid rgba(246, 145, 4, 0.5);
}

.information table > tbody > tr:first-child > td b,
.information table > tbody > tr:first-child > td strong,
.information table > tbody > tr:first-child > td span {
	font-weight: 600 !important;
	color: inherit;
}

/* Zebra striping starts after the header row. */
.information table > tbody > tr:nth-child(even):not(:first-child) {
	background: rgba(255, 255, 255, 0.028);
}

@media (any-hover: hover) {
	.information table > tbody > tr:not(:first-child):hover {
		background: rgba(0, 108, 209, 0.16);
	}
}

.information table > tbody > tr:last-child > td,
.information tbody tr:last-child th {
	border-bottom: 0;
}

/* First column carries the row label, so give it a little more weight. */
.information table > tbody > tr:not(:first-child) > td:first-child {
	color: var(--inf-text);
	font-weight: 500;
}

/* ---------- Auto-generated table of contents ---------- */

.home-toc {
	margin: 1.8em 0 2.4em;
	padding: 22px 24px;
	background: linear-gradient(160deg, rgba(0, 108, 209, 0.16), var(--inf-surface, rgba(255, 255, 255, 0.05)));
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-left: 3px solid var(--button_main_background, #f69104);
	border-radius: 14px;
}

.home-toc__title {
	margin: 0 0 14px;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.58);
}

.home-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: toc-item;
	/* Two columns once there is room — a 19-item single column is a lot of scrolling. */
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px 32px;
	font-size: 0.95rem;
}

@media (min-width: 900px) {
	.home-toc__list {
		grid-template-columns: 1fr 1fr;
	}
}

.home-toc__list > li {
	counter-increment: toc-item;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}

.home-toc__list > li::before {
	content: none;
}

.information .home-toc__list a,
.home-toc__list a {
	display: flex;
	gap: 10px;
	padding: 7px 8px 7px 0;
	color: rgba(255, 255, 255, 0.88);
	text-decoration: none;
	line-height: 1.45;
	border-radius: 6px;
	transition: color 0.2s ease;
}

.home-toc__list a::before {
	content: counter(toc-item) '.';
	flex: 0 0 auto;
	min-width: 1.4em;
	color: var(--button_main_background, #f69104);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.information .home-toc__list a:hover,
.home-toc__list a:hover {
	color: var(--button_main_background, #f69104);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
	.information ul:not(.home-toc__list):not(.swiper-wrapper) > li {
		padding: 11px 14px 11px 40px;
	}

	.information ul:not(.home-toc__list):not(.swiper-wrapper) > li::before {
		left: 15px;
	}

	.information ol:not(.home-toc__list) > li {
		padding: 12px 14px 12px 50px;
	}

	.information th,
	.information td {
		padding: 11px 13px;
	}

	.home-toc {
		padding: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.information ul > li,
	.information ol > li,
	.home-toc__list a {
		transition: none;
	}

	.information ul > li:hover {
		transform: none;
	}
}
