/**
 * Hausmeister-App Dokumentation – Frontend-Styles
 * Alle Selektoren mit .hm-docs- Prefix gescoped.
 */

:root {
	--hm-orange: #F39C12;
	--hm-navy: #0D1B2A;
	--hm-blue: #1F77D4;
	--hm-green: #1A9E5C;
	--hm-grey-light: #F5F6F8;
	--hm-grey-border: #E2E5EA;
	--hm-text: #1A2230;
	--hm-text-muted: #6B7480;
	--hm-white: #FFFFFF;
	--hm-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
	--hm-radius-card: 12px;
	--hm-radius-button: 8px;
	--hm-shadow-card: 0 2px 16px rgba(13, 27, 42, 0.08);
	--hm-shadow-video: 0 4px 24px rgba(13, 27, 42, 0.12);
	--hm-max-width: 1140px;
	/* Gleicht das Theme-Content-Padding aus, damit die Sidebar linksbündig
	   mit dem Logo im globalen Header abschließt. Bei Bedarf anpassen. */
	--hm-sidebar-pull: 00px;
}

/* -------------------------------------------------- */
/* Grundlagen                                          */
/* -------------------------------------------------- */

.hm-docs-body {
	font-family: var(--hm-font);
	color: var(--hm-text);
	background: var(--hm-white);
}

.hm-docs-body * {
	box-sizing: border-box;
}

.hm-docs-body a {
	color: var(--hm-blue);
}

.hm-docs-eyebrow {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--hm-orange);
	margin-bottom: 8px;
}

/* -------------------------------------------------- */
/* Topbar (Logo + Zurück zur Hauptseite)               */
/* -------------------------------------------------- */

/* -------------------------------------------------- */
/* Hero (Archiv-Seite)                                 */
/* -------------------------------------------------- */

.hm-docs-hero {
	background: var(--hm-navy);
	padding: 64px 24px;
	text-align: center;
}

.hm-docs-hero-inner {
	max-width: 720px;
	margin: 0 auto;
}

.hm-docs-hero .hm-docs-eyebrow {
	color: var(--hm-orange);
}

.hm-docs-hero h1 {
	font-size: 44px;
	font-weight: 700;
	color: var(--hm-white);
	margin: 0 0 16px;
}

.hm-docs-hero-lead {
	font-size: 17px;
	line-height: 1.6;
	color: #C9D2DC;
	margin: 0 0 32px;
}

/* -------------------------------------------------- */
/* Suche                                               */
/* -------------------------------------------------- */

.hm-docs-search {
	position: relative;
}

.hm-docs-search--hero {
	max-width: 480px;
	margin: 0 auto;
}

.hm-docs-search-icon {
	position: absolute !important;
	left: 16px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: var(--hm-text-muted);
	font-size: 15px;
	pointer-events: none;
}

.hm-docs-search-input {
	width: 100%;
	padding: 13px 16px 13px 44px !important;
	border-radius: var(--hm-radius-button);
	border: 1px solid var(--hm-grey-border);
	font-size: 15px;
	font-family: var(--hm-font);
	background: var(--hm-white);
	color: var(--hm-text);
}

.hm-docs-search-input:focus {
	outline: 2px solid var(--hm-orange);
	outline-offset: 1px;
}

.hm-docs-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: var(--hm-white);
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-card);
	box-shadow: var(--hm-shadow-card);
	z-index: 30;
	max-height: 360px;
	overflow-y: auto;
	text-align: left;
}

.hm-docs-search-result {
	display: block;
	padding: 12px 16px;
	text-decoration: none;
	border-bottom: 1px solid var(--hm-grey-border);
}

.hm-docs-search-result:last-child {
	border-bottom: none;
}

.hm-docs-search-result:hover,
.hm-docs-search-result:focus {
	background: var(--hm-grey-light);
}

.hm-docs-search-result-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--hm-text);
}

.hm-docs-search-result-category {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--hm-orange);
	margin-bottom: 2px;
}

.hm-docs-search-result-lead {
	display: block;
	font-size: 13px;
	color: var(--hm-text-muted);
	margin-top: 2px;
}

.hm-docs-search-empty {
	padding: 16px;
	font-size: 14px;
	color: var(--hm-text-muted);
	text-align: center;
}

/* -------------------------------------------------- */
/* Kategorie-Kacheln (Archiv)                          */
/* -------------------------------------------------- */

.hm-docs-categories {
	background: var(--hm-grey-light);
	padding: 64px 24px;
}

.hm-docs-categories-inner {
	max-width: var(--hm-max-width);
	margin: 0 auto;
}

.hm-docs-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
}

.hm-docs-category-card {
	background: var(--hm-white);
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-card);
	box-shadow: var(--hm-shadow-card);
	padding: 28px 24px;
	text-decoration: none;
	color: var(--hm-text);
	transition: transform .15s ease, box-shadow .15s ease;
	display: block;
}

.hm-docs-category-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(13, 27, 42, 0.14);
}

.hm-docs-category-icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: #FEF3DC;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
	font-size: 22px;
	color: var(--hm-orange);
}

.hm-docs-category-card h3 {
	font-size: 20px;
	font-weight: 600;
	color: var(--hm-navy);
	margin: 0 0 6px;
}

.hm-docs-category-count {
	font-size: 13px;
	color: var(--hm-text-muted);
	margin: 0;
}

.hm-docs-empty {
	color: var(--hm-text-muted);
	font-size: 15px;
}

/* -------------------------------------------------- */
/* Zweispaltiges Layout (Single / Kategorie)           */
/* -------------------------------------------------- */

.hm-docs-layout {
	display: flex;
	align-items: stretch;
	width: 100%;
}

@media (min-width: 901px) {
	.hm-docs-layout {
		/* Zieht die Sidebar aus dem Theme-Content-Padding heraus, damit sie
		   linksbündig mit dem Logo im globalen Header abschließt. */
		margin-left: calc(-1 * var(--hm-sidebar-pull));
		width: calc(100% + var(--hm-sidebar-pull));
	}
}

.hm-docs-sidebar {
	width: 260px;
	flex-shrink: 0;
	background: #FAFBFC;
	border-right: 1px solid var(--hm-grey-border);
}

.hm-docs-sidebar-inner {
	position: sticky;
	top: 0;
	padding: 44px 16px 24px;
	display: flex;
	flex-direction: column;
	max-height: 100vh;
	overflow-y: auto;
}

.hm-docs-nav {
	flex: 1;
	margin-top: 8px;
}

.hm-docs-nav-group {
	margin-bottom: 2px;
}

.hm-docs-nav-category {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	width: 100% !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 9px 16px !important;
	cursor: pointer;
	text-align: left;
	font-family: var(--hm-font) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	color: var(--hm-navy) !important;
}

.hm-docs-nav-category:hover {
	background: var(--hm-grey-light) !important;
}

.hm-docs-nav-category-label {
	flex: 1;
}

.hm-docs-nav-caret {
	color: var(--hm-text-muted) !important;
	font-size: 11px !important;
	flex-shrink: 0;
	transition: transform .15s ease;
}

.hm-docs-nav-group.is-open .hm-docs-nav-caret {
	transform: rotate(90deg);
}

.hm-docs-nav-group .hm-docs-nav-items {
	display: none;
	padding-bottom: 4px;
}

.hm-docs-nav-group.is-open .hm-docs-nav-items {
	display: block;
}

.hm-docs-nav-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--hm-text);
	padding: 7px 16px 7px 34px;
	border-radius: 6px;
	text-decoration: none;
	border-left: 3px solid transparent;
}

.hm-docs-nav-item-icon {
	color: var(--hm-text-muted);
	font-size: 13px;
	flex-shrink: 0;
}

.hm-docs-nav-item:hover {
	background: var(--hm-grey-light);
}

.hm-docs-nav-item.is-active {
	background: #FEF3DC !important;
	color: var(--hm-orange) !important;
	font-weight: 600;
	border-left: 3px solid var(--hm-orange) !important;
}

.hm-docs-nav-item.is-active .hm-docs-nav-item-icon {
	color: var(--hm-orange) !important;
}

.hm-docs-nav-item.hm-docs-hidden {
	display: none;
}

/* -------------------------------------------------- */
/* Content-Area                                        */
/* -------------------------------------------------- */

.hm-docs-content {
	flex: 1;
	min-width: 0;
	padding: 48px 24px 96px;
}

.hm-docs-content-inner {
	max-width: 760px;
}

.hm-docs-breadcrumb {
	font-size: 13px;
	color: var(--hm-text-muted);
	margin-bottom: 16px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.hm-docs-breadcrumb a {
	color: var(--hm-text-muted);
	text-decoration: none;
}

.hm-docs-breadcrumb a:hover {
	color: var(--hm-orange);
}

.hm-docs-breadcrumb-current {
	color: var(--hm-text);
	font-weight: 600;
}

.hm-docs-title {
	font-size: 40px;
	font-weight: 700;
	color: var(--hm-navy);
	margin: 0 0 16px;
	line-height: 1.2;
}

.hm-docs-meta-line {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	font-size: 13px;
	color: var(--hm-text-muted);
	margin-bottom: 20px;
}

.hm-docs-meta-line i {
	color: var(--hm-orange);
	margin-right: 4px;
}

.hm-docs-lead {
	font-size: 17px;
	line-height: 1.6;
	color: var(--hm-text);
	margin-bottom: 32px;
}

/* -------------------------------------------------- */
/* Video-Embed                                         */
/* -------------------------------------------------- */

.hm-docs-video-wrapper {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	border-radius: 12px;
	box-shadow: var(--hm-shadow-video);
	overflow: hidden;
	margin-bottom: 40px;
	background: var(--hm-navy);
}

.hm-docs-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* -------------------------------------------------- */
/* Inhaltsverzeichnis (TOC)                            */
/* -------------------------------------------------- */

.hm-docs-toc {
	background: var(--hm-grey-light);
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-card);
	padding: 20px 24px;
	margin-bottom: 40px;
}

.hm-docs-toc-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--hm-text-muted);
	margin-bottom: 10px;
}

.hm-docs-toc ol {
	margin: 0;
	padding-left: 20px;
}

.hm-docs-toc li {
	margin-bottom: 6px;
}

.hm-docs-toc a {
	color: var(--hm-blue);
	font-size: 14px;
	text-decoration: none;
}

.hm-docs-toc a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------- */
/* Schritte                                            */
/* -------------------------------------------------- */

.hm-docs-steps {
	list-style: none;
	margin: 0 0 48px;
	padding: 0;
}

.hm-docs-step {
	display: flex;
	gap: 20px;
	background: var(--hm-grey-light);
	border-left: 3px solid var(--hm-orange);
	border-radius: 0 6px 6px 0;
	padding: 20px 24px;
	margin-bottom: 16px;
	scroll-margin-top: 24px;
}

.hm-docs-step-number {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--hm-orange);
	color: var(--hm-white);
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hm-docs-step-body h3 {
	font-size: 18px;
	font-weight: 600;
	color: var(--hm-navy);
	margin: 4px 0 8px;
}

.hm-docs-step-body p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--hm-text);
	margin: 0;
}

/* -------------------------------------------------- */
/* Verwandte Tutorials                                 */
/* -------------------------------------------------- */

.hm-docs-related {
	margin-bottom: 48px;
}

.hm-docs-related h2 {
	font-size: 28px;
	font-weight: 700;
	color: var(--hm-navy);
	margin-bottom: 20px;
}

.hm-docs-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.hm-docs-related-card {
	display: block;
	background: var(--hm-white);
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-card);
	box-shadow: var(--hm-shadow-card);
	padding: 20px;
	text-decoration: none;
	color: var(--hm-text);
}

.hm-docs-related-card:hover {
	border-color: var(--hm-orange);
}

.hm-docs-related-card h4 {
	font-size: 15px;
	font-weight: 600;
	color: var(--hm-navy);
	margin: 0 0 6px;
}

.hm-docs-related-card p {
	font-size: 13px;
	color: var(--hm-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* -------------------------------------------------- */
/* Prev/Next-Navigation                                */
/* -------------------------------------------------- */

.hm-docs-prev-next {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid var(--hm-grey-border);
	padding-top: 32px;
}

.hm-docs-nav-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 20px;
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-button);
	text-decoration: none;
	color: var(--hm-navy);
	font-weight: 600;
	font-size: 14px;
	max-width: 300px;
}

.hm-docs-nav-btn:hover {
	border-color: var(--hm-orange);
}

.hm-docs-nav-btn i {
	color: var(--hm-orange);
}

.hm-docs-nav-btn--next {
	margin-left: auto;
	text-align: right;
}

.hm-docs-nav-btn small {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--hm-text-muted);
	margin-bottom: 2px;
}

/* -------------------------------------------------- */
/* Kategorie-Archiv: Tutorial-Liste                    */
/* -------------------------------------------------- */

.hm-docs-tutorial-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 32px;
}

.hm-docs-tutorial-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: var(--hm-white);
	border: 1px solid var(--hm-grey-border);
	border-radius: var(--hm-radius-card);
	box-shadow: var(--hm-shadow-card);
	padding: 20px 24px;
	text-decoration: none;
	color: var(--hm-text);
}

.hm-docs-tutorial-row:hover {
	border-color: var(--hm-orange);
}

.hm-docs-tutorial-row-main h3 {
	font-size: 17px;
	font-weight: 600;
	color: var(--hm-navy);
	margin: 0 0 4px;
}

.hm-docs-tutorial-row-main p {
	font-size: 14px;
	color: var(--hm-text-muted);
	margin: 0;
}

.hm-docs-tutorial-row-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 13px;
	color: var(--hm-text-muted);
	flex-shrink: 0;
}

.hm-docs-tutorial-row-meta i {
	color: var(--hm-orange);
	margin-right: 4px;
}

.hm-docs-tutorial-row-arrow {
	color: var(--hm-text-muted) !important;
	margin: 0 !important;
}

/* -------------------------------------------------- */
/* Buttons (generisch)                                 */
/* -------------------------------------------------- */

.hm-docs-btn-primary {
	background: var(--hm-orange) !important;
	color: var(--hm-white) !important;
	padding: 13px 24px;
	border-radius: var(--hm-radius-button);
	font-weight: 700;
	font-size: 15px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.hm-docs-btn-secondary {
	background: transparent !important;
	color: var(--hm-navy) !important;
	border: 1px solid var(--hm-grey-border);
	padding: 12px 24px;
	border-radius: var(--hm-radius-button);
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
}

/* -------------------------------------------------- */
/* Mobile                                              */
/* -------------------------------------------------- */

@media (max-width: 900px) {
	.hm-docs-layout {
		flex-direction: column;
	}

	.hm-docs-sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--hm-grey-border);
	}

	.hm-docs-sidebar-inner {
		position: static;
		max-height: none;
		overflow-y: visible;
	}

	.hm-docs-content {
		padding: 32px 20px 64px;
	}

	.hm-docs-title {
		font-size: 30px;
	}

	.hm-docs-hero {
		padding: 48px 20px;
	}

	.hm-docs-hero h1 {
		font-size: 32px;
	}

	.hm-docs-related-grid {
		grid-template-columns: 1fr;
	}

	.hm-docs-prev-next {
		flex-direction: column;
	}

	.hm-docs-nav-btn,
	.hm-docs-nav-btn--next {
		max-width: 100%;
		width: 100%;
		text-align: left;
		margin-left: 0;
	}

	.hm-docs-tutorial-row {
		flex-direction: column;
		align-items: flex-start;
	}
}
