/* Formatierung für die Hover-Teaser
   und das Mosaik aller Portale.
   Portalspezifische Farben, Abwandlungen
   des Mosaiks etc. jeweils in 
   standard-hilfsmittel.css,
   standard-forschung.css etc. */

/* START Hover-Teaser, bis zu neun Boxen */
.bg-hoverteaser {
	background: url(../images/bg-hellblau.jpg) repeat-x 0 0/auto 130px;
	padding: 10px 5px 30px;
}

.margin-kachel {
	margin: 15px 0;
	min-width: 300px;
}

.hoverteaser {
	position: relative;
	background: #fff;
	height: 100%; /* stellt sicher, dass bei "kurzen" Inhalten der Hintergrund des umgebenden divs nicht durchscheint B.Luessem 09.08.2018 */
	width: 100%;
	min-height: 150px; /* muss für größere Geräte wahrscheinlich überschrieben werden B.Luessem 17.08.2018 */
	max-width: 277px;
	border: 5px solid;
}

.hoverteaser .hiding {
	display: flex;
	justify-content: center;
}

.hoverteaser:is(:hover,:focus,:active) .hiding {
	opacity: 0;
}

.hoverteaser .hiding h3 {
	text-align: center;
	font-size: 1.25rem;
	line-height: 1.5;
	margin: 30px;
	hyphens: manual;
	word-break: break-word;
	font-weight: 600;
}

.hoverteaser .showing .overlay {
	display: flex;
	flex-direction: column;
	position: absolute;
	top: 0;
	left: 0;
	margin: -5px;
	height: calc(100% + 10px);
	width: calc(100% + 10px);
	opacity: 0;
	transition: .5s ease;
	color: #fff;
	letter-spacing: -0.2px;
	text-decoration: none;
	/* background-image: linear-gradient... wird portalspezifisch in standard-bildung.css usw. gesetzt */
}

.hoverteaser .showing .overlay:is(:focus,:hover,:active) {
	opacity: 1;
	outline: none;
}

.hoverteaser .showing .text {
	padding: 10px 15px;
	flex-grow: 1;
}

.hoverteaser .showing .overlay p {
	font-size: 1rem;
	margin-bottom: 0;
}

.hoverteaser .showing .more {
	border-top: 1px solid #fff;
	padding: 8px 15px 10px;
	width: 100%;
	font-size: 1rem;
	line-height: 1;
}

.hoverteaser a .hovertip {
	display: none;
}
/* ENDE Hover-Teaser, bis zu neun Boxen */






/* BEGINN Mosaik */
.mosaik-outer {
	background-color: #e8eaed;
	padding-top: 60px;
	padding-bottom: 75px;
	justify-content: center;
	display: grid;
}

.mosaik {
	display: grid;
	grid-template-columns: repeat(1, minmax(100%, auto));
	grid-template-rows: repeat(8, minmax(240px, auto));
	grid-gap: 30px;
	margin: 0 auto;
	margin-top: 20px;
}

/* trifft alle Elemente im Mosaik: .one, .two usw. */
.mosaik > div {
	background-color: #aaa;
	padding: 0;
}

.one {
	grid-column: 1 / 2;
	grid-row: 1;
}

/* auch .two und .four mussten relative werden, weil sonst 
	die absolute Positionierung von img und linktext innerhalb der Kachel
	bei abgeschalteten OpenCms-Editier-Buttons nicht funktioniert.
	B.Luessem 25.08.2018 */
.two,.three,.four,.five,.six,.seven,.eight {
	cursor: pointer;
	position: relative;
}

:is(.one,.two,.three,.four,.five,.six,.seven,.eight):hover {
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.two {
	grid-column: 1 / 2;
	grid-row: 2;
}

.three {
	grid-column: 1 / 2;
	grid-row: 3;
}

.four {
	grid-column: 1 / 2;
	grid-row: 4;
}

.five {
	grid-column: 1 / 2;
	grid-row: 5;    
}

.six {
	grid-column: 1 / 2;
	grid-row: 6;
}

.seven {
	grid-column: 1 / 2;
	grid-row: 7;
}

.eight{
	grid-column: 1 / 2;
	grid-row: 8;
}

.mosaik h2 {
	width: 100%; 
	height: 100%;
	margin: 0;
	line-height: 1.3;
	font-size: 25px;
}

.mosaik :is(.blue-bg,.green,.white) h2 > :is(a,button) {
	border: 5px solid transparent;
}

.mosaik :is(.blue-bg,.green) h2 > :is(a,button) {
	display: flex;
	color: #fff;
	background-color: transparent;
	text-decoration: none; /* für blaue Kacheln notwendig */
	width: 100%;
	height: 100%;
	position: relative;
	/* padding: 20px; */
	padding: 7.5%;
}

.mosaik :is(.blue-bg,.green,.white) h2 > :is(a,button):is(:focus,:active) {
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.mosaik :is(.blue-bg,.green) h2 > :is(a,button):focus {
	border: 5px solid #fff;
	/* background-color: transparent; */ /* ? */
}

.mosaik .white-bg {
	background-color: var(--hintergrund);
	color: var(--schrift);
	width: 100%;
	height: 100%;
}

.mosaik .white {
	width: 100%;
	height: 100%;
}

.mosaik .white a {
	width: 100%;
	height: 100%;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	padding: 10px 25px 25px;
	border: 5px solid transparent;
	gap: 8px;
}

.mosaik .white a:focus {
	border: 5px solid var(--zwei);
}

.mosaik .white a h2 {
	color: var(--schrift);
	height: auto;
	hyphens: manual;
	word-break: break-word;
}

/* Überschrift für Screenreader unsichtbar machen */
.mosaik .white h2.sr-only {
	border: 0;
	clip: rect(0,0,0,0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

.mosaik .white a p {
	color: var(--schrift);
	flex-grow: 1;
}

.mosaik .white .white-linktext {
	color: var(--zwei);
	text-decoration: none;
}

.mosaik .white a:is(:hover,:focus,:active) .white-linktext {
	text-decoration: underline;
}

.mosaik :is(.green-1-bg,.green-2-bg,.green-3-bg,.green-4-bg,.green-5-bg,.green-6-bg) {
	width: 100%;
	height: 100%;
	margin: 0 !important;
	background-color: var(--grueneins);
}

.mosaik .green {
	background-color: transparent;
	/* background-image: linear-gradient(223deg, rgba(72,179,140,0.9), rgba(72,169,113,0.9)); */
	/* Lue 11.09.2024: Nach BITV-Test etwas abgedunkelt */
	background-image: linear-gradient(223deg, rgba(61,153,119,0.93), rgba(66,154,102,0.93));
	width: 100%;
	height: 100%;
}

.mosaik .blue-bg {
	background-color: #247cb2;
	/* background-image: linear-gradient(45deg, rgba(71,141,181,0.9), rgba(115,183,226,0.9)); */
	background-image: var(--mittelblaugradient);
	width: 100%;
	height: 100%;
	margin: 0 !important;
	padding-top: 0 !important;
}

/* i wird für FontAwesome benutzt */
.mosaik :is(.blue-bg,.green) h2 > :is(a,button) > i {
	position: absolute;
	top: 30%;
	left: 0;
	font-size: 2.5em;
	text-align: center;
	width: 100%;
	padding-left: 0;
}

.mosaik .green-1-bg {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/lexikon-bg-foto.jpg');
}

.mosaik .green-2-bg {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/publikationen-bg-foto.jpg');
}

.mosaik .green-3-bg {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/hilfsmittel-bg-foto.jpg');
}

.mosaik .green-4-bg {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/rehadat-erklaert-bg-foto.jpg');
}

.mosaik :is(.green-1-bg,.green-2-bg,.green-3-bg,.green-4-bg,.green-5-bg,.green-6-bg) {
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
}

.mosaik .green .linktext {
	width: 100%;
	text-align: center;
	position: absolute; 
	top: 65%; 
	left: 0;
	hyphens: manual;
	word-break: break-word;
}

.mosaik .blue-1 {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/liste.svg');
}

.mosaik .blue-2 {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/books.svg');
}

.mosaik .blue-3 {
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/lupe.svg');
}

.mosaik .blue-4 {
	/* Umstellung von Twitter auf LinkedIn */
	/* background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/x-logo.svg'); */
	background-image: url('/system/modules/de.rehadat.projekt2021.frontend/resources/images/mosaik/linkedin-logo.svg');
}

.mosaik :is(.blue-1,.blue-2,.blue-3,.blue-4,.blue-5,.blue-6) {
	width: 100%;
	height: 100%;
	background-position: right 15px;
	background-size: 130px;
	background-repeat: no-repeat;
}

.mosaik :is(.blue-1,.blue-2,.blue-3,.blue-4,.blue-5,.blue-6) img {
	width: 130px;
	position: absolute;
	top: 15px;
	right: 0px;
}

.mosaik .blue-bg .linktext {
	align-self: flex-end;
}

.blue-4 img {
	width: 130px; /* X-Logo skalieren */
}


/* BEGINN News-Kachel */
.news-bg {
	width: 100%;
	height: 100%;
	background-color: var(--hintergrund); /* Hintergrundfarbe bei allen Portalen außer rehadat.de */
}

.news {
	color: var(--schrift);
	padding: 20px 30px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.news h2 {
	flex: 0; /* sorgt dafür, dass Überschrift nicht vertikal wächst */
}

.news ul {
	margin: 0;
	padding: 0;
	flex: 0;
}

.news ul li {
	list-style-type: none;
	padding: 15px 0;
	border-bottom: 1px solid var(--bordergrau);
}

.news ul > li::before {
	display: none;
}

.news .newslink {
	display: block;
	text-decoration: none;
	padding: 0;
}

.news .newslink:is(:focus,:active) {
	outline: 3px solid var(--zwei);
}

.news .newslink .news-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.news .newslink img {
	height: 100%;
	width: 100%;
	max-width: 300px;
}

.news .newslink .text {
	display: flex;
	flex-direction: column;
	gap: 5px;
	color: var(--schrift);
	line-height: 1.3;
}

.news .newslink .bigFont {
	color: var(--zwei);
}

.news .newslink:is(:hover,:focus,:active) .smallFont {
	color: var(--schrift);
	text-decoration: none;
}

.news .newslink:is(:hover,:focus,:active) .bigFont {
	color: var(--zwei);
	text-decoration: underline;
}

.news .news-button {
	flex-grow: 1;
	display: flex;
	justify-content: center; /* Button horizontal zentriert */
	margin-bottom: 0;
}




/* div für einzelne News */
.nachricht {
	margin-bottom: 50px; /* Schafft Platz nach jeder Nachricht. B.Luessem 28.08.2018 */
}

.nachricht .imageWithCaption {
    margin: 0;
    padding: 0;
    width: 100%;
}

.nachricht .imageWithCaption .image  {
	margin: 0;
}

.nachricht .imageWithCaption .image img {
	width: 100%;
	margin: 5px 0 15px;
}

.nachricht .imageWithCaption .imageCaption {
	width: 100%;
	/* font-size: 16px; */
	font-size: 1rem;
	color: #999;
}

.nachricht p,
.nachricht ul {
	overflow: hidden;
}
/* ENDE News-Kachel */
/* ENDE Mosaik */





@media (min-width: 576px) {
	.news .newslink .news-item {
		flex-direction: row;
		gap: 15px;
	}
	
	.news .newslink .image {
		flex: 0 0 40%;
		align-self: flex-start; /* notwendig für niedrige Bilder neben viel Text */
	}
	
	.news .newslink img {
		width: 100%;
		/* margin-top: 5px; */ /* Bild steht sonst scheinbar höher als der Text rechts daneben */
	}
	
	.news .newslink .text {
		/* flex: 0 0 60%; */
		flex: 0 0 calc(60% - 15px);
	}
	
	.news .news-button {
		justify-content: flex-end; /* Button rechts ausgerichtet */
		align-items: flex-end;
	}
}





@media (min-width: 768px) {
	.hoverteaser a .hovertip {
		font-size: 0.875rem;
		font-weight: 400;
		line-height: 1.2;
		color: var(--zwei);
		background-color: var(--hintergrund);
		position: absolute;
		left: 0;
		top: calc(100% + 5px);
		z-index: 20;
		display: block;
	}
	
	/* BEGINN Mosaik */
	.mosaik {
		display: grid;
		grid-template-columns: repeat(2, 330px);
		grid-template-rows: repeat(5, minmax(330px, auto));
	}

	.one {
		grid-column: 1 / 3;
		grid-row: 1 / 2;
	}
	
	.two {
		grid-column: 1 / 2;
		grid-row: 2 / 3;
	}

	.three {
		grid-column: 2 / 3;
		grid-row: 2 / 3;
	}

	.four {
		grid-column: 2 / 3;
		grid-row: 3 / 4;
	}

	.five {
		grid-column: 1 / 2;
		grid-row: 3 / 4;
	}

	.six {
		grid-column: 1 / 3;
		grid-row: 4 / 5;
	}
	
	.seven {
		grid-column: 1 / 2;
		grid-row: 5 / 6;
	}
	
	.eight {
		grid-column: 2 / 3;
		grid-row: 5 / 6;
	}
	
	.blue-1, .blue-2, .blue-3, .blue-4, .blue-5, .blue-6 {
		background-position: right 45px;
		background-size: 150px;
	}
	/* ENDE Mosaik */
}







@media (min-width: 992px) {
	.news .newslink img {
		opacity: 0.8;
	}
	
	.news .newslink:is(:hover,:focus,:active) img {
		/* box-shadow: 0 0 10px rgba(138, 138, 138, 0.3); */
		opacity: 1;
	}
}



@media (min-width: 1200px) {	
	/* BEGINN Mosaik */
	.mosaik {
		grid-template-columns: repeat(4, 255px);
		grid-template-rows: repeat(3, minmax(255px, auto));
	}

	.one {
		position: relative;
		grid-column: 1 / 3;
		grid-row: 1 / 3;
	}
	
	.two {
		grid-column: 1 / 2;
		grid-row: 3 / 4;
	}
	
	.three {
		grid-column: 2 / 3;
		grid-row: 3 / 4;
	}
	
	.four {
		grid-column: 3 / 4;
		grid-row: 1 / 2;
	}
	
	.five {
		grid-column: 4 / 5;
		grid-row: 1 / 2;
	}
	
	.six {
		grid-column: 3 / 5;
		grid-row: 2 / 3;
	}
	
	.seven {
		grid-column: 3 / 4;
		grid-row: 3 / 4;
	}

	.eight {
		grid-column: 4 / 5;
		grid-row: 3 / 4;
	}
	
	.mosaik .green h2 :is(a, button) > i,
	.mosaik :is(.blue-1,.blue-2,.blue-3,.blue-4,.blue-5,.blue-6) h2 :is(a, button) > i {
		font-size: 2em;
	}
	
	.blue-1 {
		background-position: right 20px;
		background-size: 145px;
	}
	
 	.blue-2, .blue-3, .blue-4, .blue-5, .blue-6 {
		background-position: right 20px;
		background-size: 130px;
	}
	/* ENDE Mosaik */
}



@media (prefers-color-scheme: dark), (inverted-colors: inverted) {
	.bg-hoverteaser {
		background: none;
		background-color: #000;
	}

	.hoverteaser {
		background-color: #171717;
	}
	
	
	
	/* BEGINN Mosaik */
	.mosaik-outer {
		background-color: #333;
	}
	
	.mosaik .blue-bg {
		/* etwas dunkleres Blau als normalerweise */
		background-image: var(--blaugradient);
	}
	
	.mosaik .green {
		background-image: linear-gradient(223deg, rgba(61,143,91,0.9), rgba(0,102,34,0.9));
	}
	
	.mosaik .white-bg {
		background-color: #000;
		color: #fff !important;
	}
	
	.mosaik .white h2,
	.mosaik .white .bigFont,
	.mosaik .white .bigFont p {
		color: #fff !important;
	}
	
	.mosaik :is(.blue-bg,.green,.white) a:is(:hover,:focus,:active) {
		border: 5px solid #fff;
	}
	/* ENDE Mosaik */
}
