/* Knowledge Hub global css rules */

/* Global variables */
/* ============================================ */

:root {
	--responsive-padding: clamp(.5rem, 3vh, 2rem) clamp(.5rem, 3vw, 2rem);
	--color-solitude-light: #f3f7f8;
	--color-lochmara: #3070b3;
	--color-darkgrey: #333;
	--color-grey: #777777;
	--responsive-vertical-margin: clamp(1rem, 7vh, 4rem); 
	--responsive-vertical-margin-large: clamp(2rem, 14vh, 8rem); 
	--responsive-vertical-margin-small: clamp(.5rem, 4vh, 2rem); 
}

/* Global styles */
/* Use only single html tag selectors with specificity (0, 0, 1) here! */
/* ============================================ */

html, body {
	scroll-behavior: smooth;
	/* Properties that will be inherited */
	font-family: Arial, sans-serif;
}

ul {
	list-style: square;
	list-style-position: inside;
}

ol {
	list-style: decimal;
	list-style-position: inside;
}

/* Do not set overflow here because that breaks position: sticky for navbar. */

#anfang {
	font-size: 0rem;
	margin: 0;
	padding: 0;
	height: 0; 
}

/* Layout */
/* Layout specific rules */
/* ============================================ */

.body {
	margin: 0;
	width: 100%;
	min-width: 20rem; /* Show horizontal scroll bar when very little text fits in one line */
	min-height: 100vh;
	display: flex; 
	flex-direction: column;
	background-color: white;
}

.layout-header {
	width: 100%;
	height: 10rem; /* Change grid row height when changing this as well. */ 
	display: grid;
	grid-template-columns: auto 19rem auto;
	grid-template-rows: 7rem 3rem;
	background-color: var(--color-solitude-light);
	overflow: hidden; 
	color: var(--color-darkgrey);
}

.layout-header__top-left {
	height: 100%;
	width: 100%;
	grid-row: 1 / 3; 
	grid-column: 1 / 2; 
	background-position: right; 
	padding: 1rem 1rem 1rem 0rem;
	background-size: auto 100%; 
	background-repeat: no-repeat; 
}

.layout-header__top-left-background {
	width: 100%;
	height: 100%;
	background-image: url('/images/header-network.svg'); 
	background-position: right; 
	background-size: auto 100%; 
	background-repeat: no-repeat; 
}

.layout-header__top-right {
	height: 100%;
	width: 100%;
	grid-row: 1 / 3; 
	grid-column: 3 / 4; 
	background-position: left; 
	padding: 1rem 0rem 1rem 1rem;
	background-size: auto 100%; 
	background-repeat: no-repeat; 
}

.layout-header__top-right-background {
	width: 100%;
	height: 100%;
	background-image: url('/images/header-network-flipX.svg');
	background-position: left; 
	background-size: auto 100%; 
	background-repeat: no-repeat; 
}

.layout-header__logo {
	width: 100%;
	height: 100%;
	border-style: none; 
	display: flex; 
	align-items: center; 
	justify-content: center;
	gap: 2rem; 
	background-color: transparent;
	color: var(--color-lochmara); 
	text-decoration: none;
	cursor: pointer; 
}

.layout-header__logo:visited {
	color: var(--color-lochmara); 
}

.layout-header__top-middle {
	width: 100%;
	height: 100%;
	grid-row: 1 / 2; 
	grid-column: 2 / 3;
	padding-top: 2rem;
	padding-bottom: 1rem; 
}

.layout-header__tum-logo {
	height: 60%;
}

.layout-header__kh-logo {
	display: flex; 
	flex-direction: column; 
	height: 100%;
	width: 11rem;
	justify-content: center;
}

.layout-header__heading {
	color: var(--color-lochmara);
	font-size: 1.3rem;
	margin: 0;
	font-weight: bold;
}

.layout-header__nav {
	width: 100%;
	grid-column: 1 / 4; 
	grid-row: 2 / 3; 
	align-self: center;
	display: flex; 
	justify-content: center;
	gap: clamp(.5rem, 3vw, 2rem);
	flex-wrap: wrap;
	font-weight: bold;
}



.layout-second-header {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	color: white;
	background-color: #4889ce;
	gap: clamp(.8rem, 3vh, 2rem);
	padding: var(--responsive-padding);
	text-align: center; 
}

.layout-second-header__heading {
	max-width: 100%;
	font-weight: bold;
	font-size: 1.6rem;
	margin: 0;
}

.layout-second-header__subheading {
	max-width: 100%;
	margin: 0; 
	font-size: 1.3rem;
}

.layout-second-header__figure {
	max-width: 100%;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	display: flex; 
	margin: 0;
}

.layout-second-header__img {
	height: 15rem;
	max-width: 100%; 
}

.layout-second-header__img-caption {
	max-width: 100%;
	font-size: 0.6rem; 
	margin: 0;
}

/* Main page regions */
.layout-middle {
	min-height: 50rem;
	width: 100%;
}

.layout-vertical-split {
	display: flex;
	flex-direction: row;
}



.layout-right-frame,
.layout-left-frame {
	flex: 1 1 0;
}

.layout-content-frame {
	flex: 1 1 50rem;
	max-width: 50rem;
	padding: var(--responsive-padding);
}



.layout-footer {
	width: 100%;
	padding: .5rem;
	display: flex; 
	flex-direction: row; 
	align-items: center; 
	justify-content: center; 
	column-gap: 1rem; 
	background-color: #f3f7f8; 
	flex-wrap: wrap;
	row-gap: .5rem;
}



/* Blocks */
/* ============================================ */

/* .no-vertical-margin {

} */

.padding-box {
	padding: var(--responsive-padding);
	width: 100%;
	height: 100%; 
}

.task {
	width: 100%; 
}

.task-box {
	width: 100%; 
	position: relative; /* Makes it possible to position child with position: relative to the this parent */
}

.task-box__content {
	width: 100%;
	display: flex; 
	flex-direction: column;
	gap: var(--responsive-vertical-margin-small);
}

.task-box__textarea {
	width: 100%; 
	border-style: solid; 
	border-width: 3px; 
	border-color: lightgrey; 
	min-height: 5rem;
	margin-bottom: .5rem;
	background: white; 
	resize: vertical; 
}

.task-box__textarea-note {
	color: var(--color-grey);
}

.task-box__checkmark-container {
	position: absolute; 
	width: 2.4rem; 
	height: 2.4rem; 
	background-color: white; 
	top: -1.2rem; 
	left: -1.0rem;
	padding: .4rem;
}

.task-box__checkmark-box {
	border: .2rem solid #3070b3; 
	height: 100%; 
	width: 100%; 
	display: flex; 
	align-items: center; 
	justify-content: center; 
	font-weight: bold; 
	font-size: 1.3rem; 
	color: #3070b3
}

.task-box__checkmark {
	display: none; 
}

.task-continue-section {
	width: 100%; 
	display: flex; 
	flex-direction: column; 
	gap: 1rem; 
	align-items: center; 
	overflow: hidden; 
	padding-top: 1rem;
	--arrow-width: 2rem; 
}

.task-continue-section__arrow-1 {
	height: 10vh; 
	width: var(--arrow-width); 
	background-color: var(--color-solitude-light);
}

.task-continue-section__text {
	color: var(--color-grey); 
	margin-bottom: 0;
}

.task-continue-section__arrow-2 {
	flex: 1; 
	width: var(--arrow-width); 
	background-color: var(--color-solitude-light);
}

.task-continue-section__arrow-head {
	display: flex; 
	flex-direction: column; 
	align-items: center; 
	height: 2rem;
}

.text-and-image {
	width: 100%; 
	border-left: .4rem solid #dbe2e9; 
	display: flex; 
	flex-direction: row; 
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
}

.text-and-image__textBox {
	width: 100%; 
	flex: 1; 
	min-width: min(100%, 20rem);
}

.text-and-image__figure {
	width: 100%; 
	display: flex;
	padding: min(2rem, 3vh) min(2rem, 3vw);
	flex-direction: column;
}

.text-and-image__image {
	width: 100%; 
	height: auto; 
	object-fit: contain;
}

.paragraph-big {
	color: var(--color-darkgrey);
	font-size: 1.6rem; 
	text-align: center;
}

.main-content>.paragraph-big {
	margin-top: clamp(4rem, 16vh, 14rem); 
}

.figure {
	max-width: 100%;
}

.figure__image {
	width: 100%; 
	margin-bottom: 1rem; 
}

.vertical-spacer {
	display: flex; 
	justify-content: center; 
	width: 100%; 
	height: .2rem;
}

.vertical-spacer__bar {
	width: 1.5rem; 
	height: 100%; 
	background-color: #3070b3;
}

.chapter-preview {
	width: 100%;
	display: flex; 
	flex-flow: row wrap; 
	justify-content: center;
	column-gap: 2rem; 
}

.chapter-preview__item {
	flex: 0 1 20rem; 
	/* height: 1rem; 
	background-color: grey; */
}

.chapter-preview__image {
	width: 100%; 
	margin-bottom: 1rem; 
}

.box {
	width: 100%; 
	background-color: var(--color-solitude-light); 
	border-left-width: .4rem;
	border-left-style: solid;
	padding: var(--responsive-padding);
	display: flex;
	flex-direction: column;
	gap: var(--responsive-vertical-margin-small); 
}

/* .box>p {
	margin-top: var(--responsive-vertical-margin-small);
	margin-bottom: var(--responsive-vertical-margin-small);
} */

.box--stretch-vertically {
	height: 100%; 	
}

.box--no-border {
	border-left-width: 0;
}

.box--emphasize {
	border-left-color: var(--color-lochmara);
}

.box--emphasize-strong {
	border-left-color: var(--color-lochmara);
	border-width: .4rem;
	border-color: #a0af00;
	font-size: 1.2rem;
	background-color: transparent;
}

.box--sidenote {
	color: var(--color-grey); 
	border-left-color: #dbe2e9;
}

.box-scatter {
	font-style: italic; 
	display: flex; 
	flex-direction: row; 
	justify-content: space-evenly; 
	flex-wrap: wrap;
	gap: 1rem; 
}

.box-scatter__item {
	width: 15rem; 
}

.emphasize-text {
	font-weight: bold;
	color: var(--color-lochmara);
}

.main-content {
	width: 100%; 
	line-height: 1.6rem;
}

.main-content>p,
.main-content>.box,
.main-content>.button,
.main-content>.start-course-button,
.main-content>.no-vertical-margin,
.main-content>.task,
.main-content>.text-and-image,
.main-content>.vertical-spacer,
.main-content>.two-groups-of-images,
.main-content>.thought-block,
.main-content>.figure,
.main-content>.box-scatter {
	margin-top: var(--responsive-vertical-margin);
	margin-bottom: var(--responsive-vertical-margin);
}

.main-content>h2,
.main-content>h3,
.main-content>h4,
.main-content>h5 {
	width: 100%; 
	padding: 1rem 1rem;
	background-color: #3070b3;
	color: white;
	font-size: 1.3rem;
	margin-top: var(--responsive-vertical-margin-large);
	margin-bottom: var(--responsive-vertical-margin);
	text-transform: none;
	font-weight: bold;
}

.flex-justify-end {
	width: 100%;
	height: 100%; 
	display: flex;
	justify-content: end;
}

.button {
	border-style: none;
	background-color: #4889ce;
	color: white;
	padding: .8rem;
	font-weight: bold;
	box-shadow: 4px 4px lightgrey;
	cursor: pointer;
	margin-top: var(--responsive-vertical-margin-small);
	margin-bottom: var(--responsive-vertical-margin-small);
	transition: all 100ms linear; 
}

.button--light {
	background-color: var(--color-solitude-light);
	color: var(--color-darkgrey);
}

.button--full-width {
	width: 100%; 
	display: block; 
}

.button:hover {
	background-color: #5c9bde;
	color: white;
}

.button:active {
	box-shadow: 0px 0px;
	transform: translate(4px, 4px);
}

.start-course-button {
	display: flex; 
	justify-content: center;
}

.course-navigation {
	display: flex;
	justify-content: space-between;
}

.course-preview {
	display: flex; 
	flex-direction: row;
	flex-wrap: wrap-reverse;
	width: 100%;
	gap: 1.5rem; 
	padding: .5rem;
	align-items: center;
	justify-content: center;
	color: white; 
}

.course-preview__text-section {
	flex: 1 1 15rem;
	align-self: flex-end;
}

.course-preview__heading {
	font-size: 1.5rem; 
	margin-bottom: 1.5rem;
	font-weight: bold;
}

.course-preview__text {
	font-weight: normal;
}

.course-preview__image-container {
	flex: 0 1 20rem; 
}

.course-preview__image {
	width: 100%;
}

.two-groups-of-images {
	display: flex;
	flex-flow: row wrap; 
	justify-content: center;
	gap: var(--responsive-vertical-margin) var(--responsive-vertical-margin);
}

.two-groups-of-images__group {
	flex: 1 1 18rem;
	padding: var(--responsive-padding);
	background-color: var(--color-solitude-light);
}

.two-groups-of-images__grid {
	width: 100%;
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: space-around;
	gap: .5rem;
	margin-bottom: 1rem; 
}

.two-groups-of-images__image-container {
	flex: 0 1 4rem;
	max-width: 5rem; 
	background-color: grey; 
}

.two-groups-of-images__image {
	width: 100%; 
}

.two-images {
	border-style: solid; 
	border-width: 7px; 
	border-color: #3070b3; 
	margin: 3vh 0; 
	display: flex; 
	flex-direction: row; 
	flex-wrap: wrap; 
	justify-content: center;
}

.link {
	border-bottom: 1px solid #777;
	text-decoration: none;
	line-height: 1.6em;
	color: var(--color-darkgrey);
	transition: color 100ms linear, border-bottom-width 100ms linear, border-bottom-color 100ms linear;  
}

.link:visited {
	color: var(--color-darkgrey);
}

.link:hover {
	border-bottom-width: 3px;
	color: var(--color-lochmara);
	border-bottom-color: var(--color-lochmara);
}

.thought-block {
	width: 100%; 
	background-repeat: no-repeat;
	background-size: contain;
	background-position: left;
	padding: 2rem;
	margin-left: 1vw;
	font-style: italic;
	font-size: 1.1rem;
	color: #3070b3;
}

.table-of-content-container {
	max-width: 20rem;
	height: 100%;
}

#TableOfContents {
	position: sticky;
	top: clamp(.5rem, 4vh, 3rem);
	border-width: 0px;
	border-left: 3px solid #4889ce;
}

#TableOfContents>* {
	padding-left: 0;
	margin-left: clamp(.3rem, 1vw, 2rem);
}

#TableOfContents li {
	margin: .5rem 0 .5rem 0;
}

#TableOfContents a {
	border-bottom: 1px solid #777;
	text-decoration: none;
	line-height: 1.6em;
	color: var(--color-darkgrey);
	transition: color 100ms linear, border-bottom-width 100ms linear, border-bottom-color 100ms linear;  
}

#TableOfContents a:hover {
	border-bottom-width: 3px;
	color: var(--color-lochmara);
	border-bottom-color: var(--color-lochmara); 
}
/* #TableOfContents ul a {
	text-decoration: none;
	font-weight: bold;
	color: rgb(145, 145, 145);
}

#TableOfContents ul ul a {
	color: rgb(197, 197, 197);
}

#TableOfContents ul a:hover {
	color: black;
} */

#TableOfContents ul {
	list-style-type: none;
}



/* Additional */
/* Display icon next to external links https://stackoverflow.com/a/5379820 */
/* ============================================ */

a[href]:not(:where(
  /* exclude hash only links */
  [href^="#"],
  /* exclude links starting with a dot */
  [href^="."],
  /* exclude relative but not double slash only links */
  [href^="/"]:not([href^="//"]),
  /* domains to exclude */
  [href*="//knowledgehub"],
  [href*="//www.knowledgehub"],
  [href*="localhost"],
  /* subdomains to exclude */
  /* [href*="//meta.stackoverflow.com"], */
)):after {
	background: url("/images/external-link-icon.svg") center no-repeat;
	padding-right: 10px;
	content: "";
	margin-left: 5px;
	margin-right: 3px;
}