@import url('https://fonts.googleapis.com/css2?family=Blinker:wght@100;200;300;400;600;700;800;900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:wght@100;300;400;500;700;900&display=swap');
@import url(formular.css);

*,
::before,
::after {
	box-sizing: border-box;
}

html {
	height: 100%;
	font-size: 100%;
	scroll-behavior: smooth;
}

body {
	background: white;
	margin: 0;
	padding: 0;
	height: 100%;
	display: grid;
	justify-items: center;
	grid-template-rows: 1fr auto;
	grid-template-columns: 1fr;
	background: url(../img/bg.png) repeat-x left top / auto 12rem;
	gap: 0;
}

/* #region TYPOGRAPHY */

h1 {
	font: 300 2.8rem/1 "Blinker", sans-serif;
	text-align: left;
	color: dimgray;
	margin: 0;
	padding: 0;
}

h2 {
	font: 300 2rem/1 "Blinker", sans-serif;
	text-align: left;
	color: dimgray;
	margin: 0;
	padding: 0;
}

h4 {
	font: 800 1.2rem/1.1 "Open Sans", sans-serif;
	text-align: left;
	color: dimgray;
	margin: 0;
	padding: 0;
}

p {
	/* font: 300 1.05rem/1.4 "Roboto", sans-serif; */
	font: 400 1rem/1.4 "Roboto", sans-serif;
	text-align: left;
	color: dimgray;
	margin: 0;
	padding: 0;
}

.trennlinie {
	border-bottom: 1px solid rgb(222, 221, 221);
	margin-bottom: .5rem;
}

/* #endregion */

/* #region header */

header {
	position: fixed;
	display: grid;
	place-items: center;
	z-index: 50;
	top: 0;
	width: 100%;
	height: 9rem;
	background-color: transparent;
	transition: background-color .3s ease, height .4s ease-out;
}

header a {
	text-decoration: none;
}

header hgroup {
	height: min-content;
}

header hgroup h1 {
	grid-row: 1;
	font: 300 2.8rem/1 "Blinker", sans-serif;
	text-align: center;
	white-space: nowrap;
	color: white;
	width: min-content;
	margin-bottom: .25rem;
	padding: 0 5rem;
	transition: all .2s ease-in-out;
}

header hgroup h1:hover {
	color: orangered;
	cursor: pointer;
}

header hgroup p {
	grid-row: 2;
	font: 300 .85rem/1 "Roboto", sans-serif;
	text-align: center;
	white-space: nowrap;
	color: white;
}

header.sticky {
	height: 4rem;
	background: rgba(0, 0, 0, 0.8);
	padding-bottom: 1rem;
}

header.sticky hgroup h1 {
	font: 300 2rem/1 "Blinker", sans-serif;
}

@media (max-width: 768px) {
	header {
		/* Mobil ist ein starrer 9rem Header zu wuchtig */
		height: auto;
	}
}

/* #endregion */

main {
	grid-row: 1;
	display: grid;
	/* Sidebar 250px, Content den Rest, max 1200px breit */
	grid-template-columns: 250px minmax(0, 1fr);
	grid-template-rows: 1fr;
	max-width: 1200px;
	/* Puffer zum Bildschirmrand */
	width: 95%;
	margin: 9rem auto .5rem auto;
	box-shadow: rgba(31, 31, 31, 0.1) 0px 1px 1px 0px;
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	gap: 0;
}

/* #region main aside nav */

main aside {
	grid-column: 1;
	grid-row: 1;
	background: #f0f0f0;
	border-bottom-left-radius: 5px;
}

main aside nav {
	position: sticky;
	/* Etwas mehr Puffer als 4rem, damit es nicht am Header "klebt" */
	top: 5rem;
	z-index: 10;
	align-self: start;
	height: auto;
	/* Verhindert, dass die Nav länger als der Screen wird */
	max-height: calc(100vh - 6rem);
	/* Scrollbar für Nav, falls sie zu lang wird */
	overflow-y: auto;
}

main aside nav ul {
	list-style: none;
	padding: 0 .5rem;
	margin: .5rem 0 .5rem .5rem;
}

main aside nav ul li {
	text-align: left;
	border-bottom: 1px solid rgb(228, 228, 228);
}

main aside nav ul li a {
	font: 300 1rem/1.2 "Roboto", sans-serif;
	color: black;
	/* Unterstreichung global entfernen */
	text-decoration: none;
	display: flex;
	align-items: center;
	/* Etwas Klickfläche schaffen */
	padding: 0.3rem 0;
}

main aside nav ul li a::before {
	content: "–";
	margin-right: 0.5rem;
	display: inline-block;
	color: dimgray;
	/* Unterstreichung hier verbieten */
	text-decoration: none !important;
}

/* NUR den Text im Span unterstreichen */
main aside nav ul li a:hover span {
	text-decoration: underline;
	display: inline-block;
}

/* Besuchte Links: Nur die Farbe des Spans ändern */
main aside nav ul li a:visited span {
	color: dimgray;
}

/* Inaktiver Link für die aktuelle Seite */
main aside nav a.is-current,
main aside nav ul li a.is-current span {
	pointer-events: none;
	cursor: spalte;
	color: red;
	text-decoration: none;
}

/* Unterliste initial verstecken */
.submenu {
	list-style: none;
	/* Stärkere Einrückung */
	padding-left: 1.5rem;
	margin: 0;
	/* Wird später per JS aktiviert */
	display: none;
	max-height: 60vh;
	/* Scrollbalken nur innerhalb des Menüs, wenn nötig */
	overflow-y: auto;
}

main aside nav ul .submenu li a::before {
	content: "›";
	margin-right: 0.6rem;
}

/* untere Linie bei Unterpunkten entfernen */
main aside nav ul .submenu li {
	border-bottom: none;
}

/* Hauptpunkte mit Untermenü */
.has-submenu::after {
	content: "+";
	font-size: 0.8rem;
	/* Schiebt das Plus nach ganz rechts */
	margin-left: auto;
	padding-right: 0.5rem;
	color: dimgray;
}

/* Falls Klasse is-active vorhanden ist, Menü sofort zeigen */
.has-submenu.is-active+.submenu {
	/* Stellt sicher, dass es beim Laden da ist */
	display: block;
	/* Großer Wert, damit es offen ist */
	max-height: 1000px;
}

main aside nav a {
	text-decoration: none;
}

main aside nav a button {
	display: grid;
	place-items: center;
	height: 3rem;
	cursor: pointer;
	width: 100%;
	border: none;
	font: 300 1rem/1.2 "Roboto", sans-serif;
	color: #FFF;
	background: #4b96a7;
}

main aside nav a button:hover {
	background: #f54303;
	transition: background-color 0.3s ease-in-out;
}

/* #endregion */

/* #region main article */

main article {
	grid-column: 2;
	grid-row: 1;
	padding: 1rem;
	background: #fbfbfb;
}

main article nav {
	font: 300 .9rem/1 "Roboto", sans-serif;
	color: dimgray;
}

main article nav a {
	font: 300 .9rem/1 "Roboto", sans-serif;
	color: dimgray;
	text-decoration: none;
	/* Etwas Klickfläche schaffen */
	padding: .2rem .2rem;
}

main article nav a:hover {
	background: yellow;
	border-radius: 3px;
}

main article h1 {
	padding: .5rem 0 1.2rem 0;
}

main article h2 {
	padding: .5rem 0;
}

main article p a {
	padding: 0;
	text-decoration: none;
}

main article p a:hover {
	text-decoration: underline;
}

main article ul {
	margin: .25rem 0 .25rem 2rem;
	padding: 0;
}

main article ul li::marker {
	content: "–  ";
}

main article ul li.ohne::marker {
	content: " ";
}

main article ul li p a {
	font: 400 1rem/1.4 "Roboto", sans-serif;
	text-align: left;
	color: dimgray;
	text-decoration: none;
}

/* AJAX Transitions */
main article {
	transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

main article.fade-out {
	opacity: 0;
	transform: translateY(10px);
}

main article.fade-in {
	animation: fadeIn 0.5s ease-in-out forwards;
}

.content-section {
	opacity: 0;
	display: none;
	/* Schafft Platz für den fixierten Header beim Hinspringen */
	scroll-margin-top: 10rem;
}

.content-section.is-visible {
	display: block;
	animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	/* Ganz leichter Slide-Effekt nach oben */
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	main {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		margin: 5rem auto .5rem auto;
	}

	main aside {
		grid-column: 1;
		grid-row: 2;
	}

	main aside nav {
		/* Sticky mobil deaktivieren, wenn es unter/über dem Content steht */
		position: static;
		width: 100%;
		max-height: none;
	}

	main article {
		grid-column: 1;
		grid-row: 1;
		width: 100%;
		height: min-content;
		margin: 0;
	}
}

/* #endregion */

/* #region footer */

footer {
	grid-row: 2;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	max-width: 1200px;
	width: 95%;
	background: rgb(73, 83, 90);
	box-shadow: rgba(31, 31, 31, 0.1) 0px 1px 1px 0px;
	padding: .5rem;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	margin: 0;
	gap: 0;
}

footer>nav {
	grid-column: 1;
	grid-row: 1;
}

footer>nav>a {
	color: white;
	font: 300 .85rem/1.3 "Roboto", sans-serif;
	text-decoration: none;
	padding: 0.3rem 0;
	margin: 0 .5rem;
}

footer>nav>a:hover {
	text-decoration: underline;
}

/* Inaktiver Link für aktuelle Seite */
footer>nav>a.is-current {
	pointer-events: none;
	cursor: spalte;
	color: #aaaaaa;
	text-decoration: none;
}

/* weitere projekte */
footer>section {
	grid-column: 1;
	grid-row: 2;
	padding: .5rem;
	margin-bottom: 3rem;
}

footer>section>p {
	font: 300 .85rem/1.3 "Roboto", sans-serif;
	color: white;
	margin: 1rem 0 .25rem 0;
}

footer>section>a {
	font: 600 .8rem/1 "Roboto", sans-serif;
	text-align: center;
	text-decoration: none;
	color: white;
	display: inline-block;
	border-radius: 2px;
	padding: .25rem .5rem;
	margin: .14rem 0;
	background: rgba(255, 255, 255, 0.087);
	transition: all .2s ease-in-out;

}

footer>section>a:hover {
	color: red;
	background: yellow;
	cursor: pointer;
}

footer>div {
	grid-column: 2 / 3;
	grid-row: 1 / 3;
}

footer>div>p {
	font: 300 .8rem/1.3 "Roboto", sans-serif;
	color: white;
}

/* #endregion */

/* #region box_cards */

.box_cards {
	--card-min-width: 200px;
	--card-max-width: 100%;
	gap: .5rem;
	box-sizing: border-box;
	width: 100%;
}

.box_cards.is-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--card-min-width), 1fr));
}

.box_cards.is-flex {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.box_cards.max400 {
	--card-min-width: 400px;
	--card-max-width: 340px;
}

.box_cards.max360 {
	--card-min-width: 300px;
	--card-max-width: 360px;
}

.box_cards.max260 {
	--card-min-width: 210px;
	--card-max-width: 260px;
}

@media (max-width: 768px) {
	.box_cards.max260, .box_cards.max360, .box_cards.max400 {
		--card-min-width: 100%;
	}
}

.box_cards figure {
	flex: 1 1 0%;
	min-width: var(--card-min-width);
	max-width: var(--card-max-width);
	justify-self: center;
	margin: 0;
	border-radius: 4px;
	overflow: hidden;
	background: transparent;
	box-shadow: rgba(148, 147, 147, 0.148) 0px 1px 2px 0px;
}

.box_cards figure img {
	width: 100%;
	height: auto;
	display: block;
}

.box_cards figure.spalte {
	background: rgb(138, 138, 138);
	transition: all 0.25s ease;
}

.box_cards figure.spalte a {
	text-decoration: none;
}

.box_cards figure.spalte figcaption {
	padding: 0 .25rem;
}

.box_cards figure.spalte:hover {
	background: black;
}

.box_cards figure.spalte a figcaption h4 {
	font: 800 1.2rem/1.1 "Open Sans", sans-serif;
	color: white;
	margin: .25rem 0;
}

.box_cards figure.overlay {
	position: relative;
	max-height: min-content;
}

.box_cards figure.overlay * {
	transition: all 0.25s ease;
}

.box_cards figure.overlay:hover img {
	transform: scale(1.1);
}

.box_cards figure.overlay figcaption {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr;
	align-items: end;
}

.box_cards figure.overlay figcaption h4 {
	font: 800 1.2rem/1.1 "Open Sans", sans-serif;
	color: white;
	text-shadow: 2px 2px 6px rgba(65, 64, 64, 0.742);
	padding: 0 .3rem 0 .5rem;
}

.box_cards figure.overlay figcaption p {
	font: 800 .8rem/1.1 "Open Sans", sans-serif;
	text-align: left;
	color: white;
	background: linear-gradient(0deg,
			rgba(0, 0, 0, 0.413), rgba(0, 0, 0, 0) 100%);
	padding: .15rem .3rem .3rem .5rem;
}

.box_cards figure.overlay figcaption span {
	height: .5rem;
}

.box_cards .filler {
	flex: 1 1 0%;
	min-width: var(--card-min-width);
	max-width: var(--card-max-width);
	visibility: hidden;
	height: 0;
	margin: 0;
	padding: 0;
}

.box_cards .txt_card {
	background: rgb(138, 138, 138);
	box-shadow: rgba(84, 84, 84, 0.158) 0px 1px 2px 0px;
	border-radius: 4px;
	padding: .25rem .25rem .5rem .5rem;
	transition: all 0.25s ease;
	text-decoration: none;
}

.box_cards .txt_card:hover {
	background: black;
}

.box_cards .txt_card h4 {
	font: 800 1.8rem/1.1 "Open Sans", sans-serif;
	color: white;
	margin: 0 0 .22rem 0;
}

.box_cards .txt_card p {
	font: 300 1rem/1.2 "Roboto", sans-serif;
	color: white;
}

.box_cards .card_horizontal {
	display: grid;
	grid-template-columns: auto auto;
	justify-content: start;
	align-items: start;
	border-radius: 4px;
	overflow: hidden;
	background: rgb(138, 138, 138);
	box-shadow: rgba(84, 84, 84, 0.158) 0px 1px 2px 0px;
	transition: all 0.25s ease;
	text-decoration: none;
}

.box_cards .card_horizontal:hover {
	background: black;
	text-decoration: none;
	box-shadow: rgb(175, 1, 244) 0px 0px 4px 0px;
}

.box_cards .card_horizontal img {
	width: 150px;
	height: auto;
	object-fit: cover;
}

.box_cards .card_horizontal .card_content {
	padding: .3rem .25rem .25rem .4rem;
}

.box_cards .card_horizontal .card_content h4 {
	font: 800 1.4rem/1.1 "Open Sans", sans-serif;
	color: white;
	margin-bottom: .125rem;
	transition: color 0.25s ease;
}

.box_cards .card_horizontal .card_content p {
	font: 300 .94rem/1.2 "Open Sans", sans-serif;
	color: white;
	transition: color 0.25s ease;
}

.box_cards .card_horizontal:hover .card_content h4,
.box_cards .card_horizontal:hover .card_content p {
	color: white;
}

/* #endregion */

.accordion p {
	max-height: 0;
	overflow: hidden;
	transition: all 0.4s ease-in-out;
	font: 400 1rem/0 "Roboto", sans-serif;
	color: transparent;
	margin: 0;
}

.accordion p.open {
	max-height: 900px;
	font: 400 1rem/1.4 "Roboto", sans-serif;
	color: dimgray;
	margin-bottom: .5rem;
}

.accordion p.open a{
	font: 400 1rem/1.4 "Roboto", sans-serif;
	color: dimgray;
}

.accordion h2 {
	font: 300 2rem/1 "Blinker", sans-serif;
	padding: 0 0 .25rem 0;
	cursor: pointer;
	user-select: none;
}