/* ==========================================================================
   3D Partner — Kategorieübersicht „Dienstleistungen“ (/dienstleistungen/)
   Schlanke Navigationsübersicht analog Mega-Menü (Designrichtlinie v2.5.0).
   ========================================================================== */

/* 1. Shell-Overrides (nur auf Seite mit .p3dd begrenzt) */
body.p3d-dienstleistungen-page:has(.p3dd) #content {
	max-width: calc(var(--p3d-container-max, 1400px) + 10%);
}

body.p3d-dienstleistungen-page:has(.p3dd) .entry-header {
	display: none;
}

body.p3d-dienstleistungen-page:has(.p3dd) article.page,
body.p3d-dienstleistungen-page:has(.p3dd) .entry-content {
	margin-top: 0 !important;
	margin-bottom: 0;
	padding-top: 0 !important;
}

.p3dd,
.p3dd .wp-block-group__inner-container {
	max-width: 100%;
}

body.p3d-dienstleistungen-page:has(.p3dd) #main,
main:has(.p3dd) {
	overflow-x: clip;
}

body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	margin: 8px 0;
	padding: 0;
	overflow: hidden;
}

body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs li {
	flex: 0 0 auto;
	margin: 0;
}

body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs li.item-current {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs li.item-current span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 2. Scoped Tokens & Basis */
.p3dd {
	--p3dd-navy: #12367d;
	--p3dd-blue: #0072b5;
	--p3dd-blue-tint: #eef4ff;
	--p3dd-surface: #f7f9fc;
	--p3dd-border: #d5dde6;
	--p3dd-text: #404040;
	--p3dd-muted: #525f70;
	--p3dd-accent: var(--p3d-accent, #f59e0b);
	--p3dd-accent-line: var(--p3d-accent-line, #d97706);
	--p3dd-green: #0b7a4e;
	--p3dd-green-tint: #ecfdf5;
	color: var(--p3dd-text);
	font-size: 0.96875rem;
	line-height: 1.55;
	padding-bottom: 44px;
}

.p3dd *,
.p3dd *::before,
.p3dd *::after {
	box-sizing: border-box;
}

.p3dd > *,
.p3dd-group > * {
	margin-top: 0 !important;
}

.p3dd :focus-visible {
	outline: 3px solid var(--p3dd-accent-line);
	outline-offset: 3px;
}

.p3dd h1,
.p3dd h2,
.p3dd h3 {
	font-family: "Space Grotesk", Arial, sans-serif;
	font-weight: 700;
	text-wrap: balance;
	margin: 0;
	color: var(--p3dd-navy);
}

/* 3. Kompakter Seitenkopf */
.p3dd-head {
	padding: 28px 0 24px;
	border-bottom: 1px solid var(--p3dd-border);
	margin-bottom: 28px;
}

.p3dd-kicker {
	display: inline-block;
	margin: 0 0 8px;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--p3dd-blue);
}

.p3dd h1 {
	font-size: clamp(1.625rem, 2.2vw, 2.25rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	max-width: 28ch;
}

.p3dd h1::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--p3dd-accent);
	margin-top: 12px;
}

.p3dd-lead {
	margin: 14px 0 0;
	max-width: 64ch;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--p3dd-text);
}

/* 4. Rubriken & Kategorie-Karten */
.p3dd-group {
	margin-bottom: 32px;
}

.p3dd .p3dd-group-title {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--p3dd-border);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--p3dd-muted);
}

.p3dd .p3dd-group-title::before,
.p3dd .p3dd-group-title::after,
.p3dd .p3dd-cat-card h3::after {
	content: none !important;
	display: none !important;
}

.p3dd-cat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	align-items: stretch;
}

.p3dd a.p3dd-cat-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 20px 22px;
	background: #ffffff;
	border: 1px solid var(--p3dd-border);
	border-radius: 12px;
	color: var(--p3dd-text);
	text-decoration: none !important;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.p3dd a.p3dd-cat-card:hover,
.p3dd a.p3dd-cat-card:focus-visible {
	border-color: var(--p3dd-blue);
	box-shadow: 0 8px 22px rgba(18, 54, 125, 0.08);
	transform: translateY(-2px);
}

.p3dd a.p3dd-cat-card--green {
	border-top: 3px solid var(--p3dd-green);
}

.p3dd a.p3dd-cat-card--green:hover,
.p3dd a.p3dd-cat-card--green:focus-visible {
	border-color: var(--p3dd-green);
}

.p3dd-cat-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.p3dd-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--p3dd-blue-tint);
	color: var(--p3dd-navy);
}

.p3dd-icon--green {
	background: var(--p3dd-green-tint);
	color: var(--p3dd-green);
}

.p3dd-icon::before {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
}

.p3dd-icon--repair::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312367d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E");
}

.p3dd-icon--wartung::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312367d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
}

.p3dd-icon--versicherung::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

.p3dd-icon--druck::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312367d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");
}

.p3dd-icon--modding::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312367d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'/%3E%3Cline x1='4' y1='10' x2='4' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12' y2='3'/%3E%3Cline x1='20' y1='21' x2='20' y2='16'/%3E%3Cline x1='20' y1='12' x2='20' y2='3'/%3E%3Cline x1='1' y1='14' x2='7' y2='14'/%3E%3Cline x1='9' y1='8' x2='15' y2='8'/%3E%3Cline x1='17' y1='16' x2='23' y2='16'/%3E%3C/svg%3E");
}

.p3dd-icon--scan::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312367d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7V5a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M17 3h2a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M21 17v2a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M7 21H5a2 2 0 0 1-2-2v-2'/%3E%3Cline x1='7' y1='12' x2='17' y2='12'/%3E%3C/svg%3E");
}

.p3dd-price {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--p3dd-surface);
	border: 1px solid var(--p3dd-border);
	font-family: "Space Grotesk", Arial, sans-serif;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--p3dd-navy);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.p3dd-cat-card h3 {
	margin: 0 0 6px;
	font-size: 1.125rem;
	line-height: 1.25;
	color: var(--p3dd-navy);
}

.p3dd-cat-card p {
	margin: 0 0 16px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--p3dd-text);
}

.p3dd-cat-foot {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: "Space Grotesk", Arial, sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--p3dd-blue);
	transition: color 0.15s ease;
}

.p3dd-arrow {
	display: inline-block;
	transition: transform 0.15s ease;
}

.p3dd a.p3dd-cat-card:hover .p3dd-cat-foot,
.p3dd a.p3dd-cat-card:focus-visible .p3dd-cat-foot {
	color: var(--p3dd-navy);
}

.p3dd a.p3dd-cat-card--green .p3dd-cat-foot,
.p3dd a.p3dd-cat-card--green:hover .p3dd-cat-foot,
.p3dd a.p3dd-cat-card--green:focus-visible .p3dd-cat-foot {
	color: var(--p3dd-green);
}

.p3dd a.p3dd-cat-card:hover .p3dd-arrow,
.p3dd a.p3dd-cat-card:focus-visible .p3dd-arrow {
	transform: translateX(3px);
}

/* 5. Kompakte Hilfs- & Weiterführungsleiste */
.p3dd-aux-bar {
	margin-top: 8px;
	padding: 14px 18px;
	background: var(--p3dd-surface);
	border: 1px solid var(--p3dd-border);
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 18px;
	font-size: 0.875rem;
}

.p3dd-aux-note {
	color: var(--p3dd-text);
}

.p3dd-aux-note strong {
	color: var(--p3dd-navy);
}

.p3dd-aux-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
}

.p3dd-aux-links a {
	display: inline-flex;
	align-items: center;
	font-weight: 600;
	color: var(--p3dd-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.p3dd-aux-links a:hover,
.p3dd-aux-links a:focus-visible {
	color: var(--p3dd-navy);
}

/* 6. Responsive Breakpoints, Touch & Reduced Motion */
@media (max-width: 1024px) {
	.p3dd-cat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px), (pointer: coarse) {
	.p3dd a.p3dd-cat-card,
	.p3dd-aux-links a {
		min-height: 44px;
	}
}

@media (max-width: 768px) {
	body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs {
		margin: 4px 0;
	}

	body.p3d-dienstleistungen-page:has(.p3dd) #atomion-breadcrumbs a.bread-home {
		min-height: 44px;
		min-width: 44px;
		display: inline-flex;
		align-items: center;
		padding: 0;
	}

	.p3dd {
		padding-bottom: 32px;
	}

	.p3dd-head {
		padding: 20px 0 18px;
		margin-bottom: 22px;
	}

	.p3dd-cat-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.p3dd a.p3dd-cat-card,
	.p3dd-cat-foot,
	.p3dd-arrow {
		transition: none !important;
	}

	.p3dd a.p3dd-cat-card:hover,
	.p3dd a.p3dd-cat-card:focus-visible,
	.p3dd a.p3dd-cat-card:hover .p3dd-arrow,
	.p3dd a.p3dd-cat-card:focus-visible .p3dd-arrow {
		transform: none !important;
	}
}
