/**
 * KH-BLUE content styling for master-copy pages (Services, Products, Academy, etc.)
 * Brand direction: deep navy base, electric blue / cyan accents, calm & technical.
 */

:root {
	--kh-navy: #0a1a2f;
	--kh-navy-2: #10233d;
	--kh-blue: #1e7fe0;
	--kh-blue-dark: #1565c0;
	--kh-cyan: #29c5e8;
	--kh-ink: #1b2733;
	--kh-muted: #5a6b7c;
	--kh-border: #e3e8ee;
	--kh-surface: #f6f9fc;
	--kh-orange: #f5871f;
}

/*
 * Selectors below are scoped as "article.hentry .entry-content ..." to match
 * (and safely win the cascade tie-break against) the theme's own baked-in
 * article.hentry .entry-content rules in style.css, which otherwise override
 * heading margins, list markers and table borders/colors on these pages.
 */

article.hentry .entry-content h1 {
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	line-height: 1.2;
	color: var(--kh-navy);
	margin: 0 0 16px !important;
	letter-spacing: -0.01em;
}

article.hentry .entry-content p.lead {
	font-size: 19px;
	line-height: 1.6 !important;
	color: var(--kh-muted);
	max-width: 820px;
	margin: 0 0 28px;
}

article.hentry .entry-content h2 {
	font-size: 26px;
	font-weight: 700;
	color: var(--kh-navy);
	margin: 48px 0 20px !important;
	padding-top: 8px;
	border-top: 1px solid var(--kh-border);
}

article.hentry .entry-content h2:first-of-type {
	border-top: none;
	padding-top: 0;
}

article.hentry .entry-content h3 {
	margin-top: 0 !important;
}

/* CTA buttons */
.kh-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0 0 40px;
}

.kh-btn,
.kh-btn:hover,
.kh-btn:focus {
	display: inline-block;
	padding: 13px 28px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none !important;
	transition: all 0.18s ease;
	line-height: 1.2;
}

.kh-btn-primary {
	background: var(--kh-blue);
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(30, 127, 224, 0.28);
}

.kh-btn-primary:hover {
	background: var(--kh-blue-dark);
	transform: translateY(-1px);
}

.kh-btn-secondary {
	background: transparent;
	color: var(--kh-navy) !important;
	border: 1.5px solid var(--kh-border);
}

.kh-btn-secondary:hover {
	border-color: var(--kh-blue);
	color: var(--kh-blue) !important;
}

/* Capability cards */
.kh-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin: 0 0 20px;
}

.kh-card {
	background: #fff;
	border: 1px solid var(--kh-border);
	border-top: 3px solid var(--kh-blue);
	border-radius: 10px;
	padding: 24px 24px 22px;
	box-shadow: 0 2px 10px rgba(10, 26, 47, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kh-card:hover {
	box-shadow: 0 10px 24px rgba(10, 26, 47, 0.1);
	transform: translateY(-2px);
}

.kh-card h3 {
	font-size: 17px;
	font-weight: 700;
	color: var(--kh-navy);
	margin: 0 0 10px;
}

/* Whole-card link (used when a card leads to its own detail page) */
a.kh-card-link {
	color: inherit;
	text-decoration: none;
	display: block;
}

a.kh-card-link:hover h3 {
	color: var(--kh-blue);
}

/* Icon badge shown above a card's heading */
.kh-card-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: rgba(30, 127, 224, 0.1);
	color: var(--kh-blue);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	margin: 0 0 16px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a.kh-card-link:hover .kh-card-icon {
	background: var(--kh-blue);
	color: #fff;
}

.kh-card p {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--kh-muted);
	margin: 0;
}

/* Plain lists inside content */
article.hentry .entry-content ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 10px 32px;
	list-style: none;
	list-style-position: outside;
	margin: 0 0 32px;
	padding: 0 !important;
}

article.hentry .entry-content ul > li {
	position: relative;
	padding-left: 22px !important;
	padding-bottom: 0 !important;
	font-size: 15px;
	line-height: 1.5;
	color: var(--kh-ink);
}

article.hentry .entry-content ul > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--kh-cyan);
}

/* Tables: fixed layout + wrapping cells avoids the need for a scroll wrapper
   on these narrow (2-3 column) tables while keeping header/body columns aligned. */
article.hentry .entry-content .kh-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	margin: 0 0 32px !important;
	font-size: 14.5px;
	border: none !important;
}

article.hentry .entry-content .kh-table th {
	background: var(--kh-navy);
	color: #fff !important;
	text-align: left;
	padding: 12px 16px !important;
	font-weight: 600;
	border: none !important;
	overflow-wrap: break-word;
}

article.hentry .entry-content .kh-table td {
	padding: 12px 16px !important;
	border: none !important;
	border-bottom: 1px solid var(--kh-border) !important;
	color: var(--kh-ink);
	vertical-align: top;
	overflow-wrap: break-word;
}

article.hentry .entry-content .kh-table tbody tr:nth-child(even) {
	background: var(--kh-surface);
}

/* Process flow strings (A -> B -> C) */
p.kh-flow {
	background: linear-gradient(90deg, var(--kh-navy), var(--kh-navy-2));
	color: #eaf4ff;
	padding: 18px 24px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.01em;
	margin: 0 0 32px;
	display: block;
}

/* Callouts */
.kh-callout {
	background: #eaf7fb;
	border-left: 4px solid var(--kh-cyan);
	padding: 16px 20px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--kh-ink);
	margin: 0 0 32px;
}

.kh-emergency {
	background: #fff3e6;
	border-left: 4px solid var(--kh-orange);
	padding: 16px 20px;
	border-radius: 6px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--kh-ink);
	margin: 24px 0 32px;
}

.kh-emergency strong {
	color: var(--kh-orange);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	margin-right: 6px;
}

@media (max-width: 600px) {
	.kh-btn {
		width: 100%;
		text-align: center;
	}
	.kh-table {
		font-size: 13px;
	}
}

/* ===================== Academy-style page additions ===================== */

/* "Why" benefit list — check-marked, single column, roomier than the dot list */
article.hentry .entry-content ul.kh-why-list {
	display: block;
	margin: 0 0 32px;
}

article.hentry .entry-content ul.kh-why-list > li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 0 !important;
	border-bottom: 1px solid var(--kh-border);
	font-size: 15.5px;
}

article.hentry .entry-content ul.kh-why-list > li:last-child {
	border-bottom: none;
}

article.hentry .entry-content ul.kh-why-list > li::before {
	content: "\2713";
	position: static;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--kh-blue);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
}

article.hentry .entry-content ul.kh-why-list > li strong {
	color: var(--kh-navy);
}

/* Urgency CTA band */
.kh-urgent-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: linear-gradient(120deg, var(--kh-navy), var(--kh-navy-2));
	color: #eaf4ff;
	padding: 32px 36px;
	border-radius: 12px;
	margin: 0 0 40px;
}

.kh-urgent-cta h3 {
	color: #fff !important;
	font-size: 21px;
	margin: 0 0 8px !important;
}

.kh-urgent-cta p {
	color: #b9d2ea;
	margin: 0;
	max-width: 560px;
	font-size: 15px;
	line-height: 1.55;
}

.kh-urgent-cta .kh-btn-primary {
	white-space: nowrap;
}

/* Methodology steps (Approach / Delivery / Why KH-BLUE) */
.kh-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	margin: 0 0 40px;
	counter-reset: kh-step;
}

.kh-step {
	position: relative;
	padding: 28px 22px 22px;
	background: var(--kh-surface);
	border-radius: 10px;
	border: 1px solid var(--kh-border);
}

.kh-step::before {
	counter-increment: kh-step;
	content: counter(kh-step);
	position: absolute;
	top: -14px;
	left: 22px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--kh-blue);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kh-step h3 {
	font-size: 16.5px;
	color: var(--kh-navy);
	margin: 6px 0 8px !important;
}

.kh-step p {
	font-size: 14.5px;
	color: var(--kh-muted);
	line-height: 1.55;
	margin: 0;
}

/* Training track cards (richer than a plain .kh-card: topic chips + explore link) */
.kh-tracks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 22px;
	margin: 0 0 20px;
}

.kh-track-card {
	background: #fff;
	border: 1px solid var(--kh-border);
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 2px 10px rgba(10, 26, 47, 0.04);
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kh-track-card:hover {
	box-shadow: 0 10px 24px rgba(10, 26, 47, 0.1);
	transform: translateY(-2px);
}

.kh-track-card h3 {
	font-size: 18px;
	color: var(--kh-navy);
	margin: 0 0 8px !important;
}

.kh-track-card > p.kh-track-blurb {
	font-size: 14.5px;
	color: var(--kh-muted);
	line-height: 1.55;
	margin: 0 0 14px;
}

.kh-track-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 18px;
	padding: 0 !important;
}

.kh-track-topics span {
	display: inline-block;
	font-size: 12px;
	color: var(--kh-blue-dark);
	background: #eaf3fd;
	padding: 4px 10px;
	border-radius: 20px;
}

.kh-track-card a.kh-track-link {
	margin-top: auto;
	font-weight: 600;
	font-size: 14px;
	color: var(--kh-blue);
	text-decoration: none;
}

.kh-track-card a.kh-track-link:hover {
	text-decoration: underline;
}

/* Breadcrumb back-link above the H1 on Academy detail pages */
.kh-breadcrumb {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--kh-blue);
	text-decoration: none;
	margin: 0 0 14px;
}

.kh-breadcrumb:hover {
	text-decoration: underline;
}

/* Compact topic tiles — for converting long flat bullet lists (course/module
   catalogs) into a scannable grid, styled lighter than a full .kh-card. */
.kh-topics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin: 0 0 32px;
}

.kh-topic-tile {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--kh-surface);
	border: 1px solid var(--kh-border);
	border-radius: 8px;
	padding: 14px 16px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--kh-navy);
}

.kh-topic-tile::before {
	content: "";
	flex: 0 0 6px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--kh-cyan);
}

@media (max-width: 640px) {
	.kh-urgent-cta {
		padding: 24px;
	}
	.kh-urgent-cta .kh-btn {
		width: 100%;
		text-align: center;
	}
}

/* ===================== Fox-IT-Academy-style section headings + accordion ===================== */

/* Accent-bar section heading, e.g. "Our training offers" */
article.hentry .entry-content h2.kh-section-title {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 800;
	color: var(--kh-blue);
	border-top: none;
	padding-top: 0;
	margin: 48px 0 20px !important;
}

article.hentry .entry-content h2.kh-section-title::before {
	content: "";
	flex: 0 0 6px;
	width: 6px;
	align-self: stretch;
	min-height: 1.1em;
	background: var(--kh-blue);
	border-radius: 3px;
}

article.hentry .entry-content h2.kh-section-title:first-of-type {
	margin-top: 0 !important;
}

/* Accordion list (native <details>/<summary> — no JS required) */
.kh-accordion {
	margin: 0 0 32px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.kh-accordion-item {
	background: var(--kh-blue);
	border-radius: 8px;
	overflow: hidden;
}

.kh-accordion-item summary {
	display: flex;
	align-items: center;
	gap: 16px;
	list-style: none;
	cursor: pointer;
	padding: 20px 26px;
	color: #fff;
	font-weight: 700;
	font-size: 17px;
	user-select: none;
}

.kh-accordion-item summary::-webkit-details-marker {
	display: none;
}

.kh-accordion-item summary::marker {
	content: "";
}

.kh-acc-icon {
	flex: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.kh-accordion-item[open] .kh-acc-icon {
	transform: rotate(45deg);
}

.kh-acc-title {
	flex: 1 1 auto;
}

.kh-acc-show {
	flex: 0 0 auto;
	font-size: 13.5px;
	font-weight: 600;
	opacity: 0.85;
}

.kh-acc-show::after {
	content: "Show details";
}

.kh-accordion-item[open] .kh-acc-show::after {
	content: "Hide details";
}

.kh-acc-body {
	padding: 4px 26px 26px 62px;
	background: #fff;
}

.kh-acc-body p {
	color: var(--kh-muted);
	font-size: 14.5px;
	line-height: 1.6;
	margin: 0 0 14px;
}

.kh-acc-body .kh-track-topics {
	margin: 0 0 16px;
}

.kh-acc-body a.kh-track-link {
	font-weight: 600;
	font-size: 14px;
	color: var(--kh-blue-dark);
	text-decoration: none;
}

.kh-acc-body a.kh-track-link:hover {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.kh-accordion-item summary {
		padding: 16px 18px;
		font-size: 15.5px;
	}
	.kh-acc-body {
		padding: 4px 18px 20px 18px;
	}
	.kh-acc-show {
		display: none;
	}
}
