/*
Theme Name: Donata
Theme URI: https://fija.de
Author: fija
Author URI: https://fija.de
Description: Theme für donatawenders.com. Relaunch 2026
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: donata
*/


:root {
	--dw-main: #759e96;
	--dw-light: rgba(255, 255, 255, 0.8);
	--dw-hint: rgba(255, 255, 255, 0.5);
}
*,
*::before,
*::after {
	box-sizing: border-box;
}
html, body {
		width: 100%;
		height: 100%;
	}
html {
	scroll-behavior: smooth;
	scroll-padding: 8rem;
}
body {
	margin: 0 auto;

	font-family: "gill-sans-nova", sans-serif;
	font-weight: 300;
	font-style: normal;
	color: var(--dw-light);
	text-rendering: optimizeSpeed;

	background-color: #000;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease-out;
}
a:hover {
	color: var(--dw-main);
}

button {
	border: none;
	outline-color: transparent;
	background-color: transparent;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

h1, h2, h3, h4 {
	text-transform: uppercase;
	font-weight: normal;
	font-size: inherit;
}

.link {
	display: inline-flex;

	&::before {
		content: '';
		width: 1rem;
		background-image: url('images/icon-link.png');
		background-repeat: no-repeat;
		background-size: contain;
		background-position: center;
		margin-right: 0.5rem;
	}	
}

/* # # # # section bg # # # # */

.section-bg-container {
	height: 100lvh;
	position: fixed;
	inset: 0;
	z-index: -1;
}
.section-bg {
	height: 0;
	transition: height 0.5s ease-out;

	background-size: cover;
	-o-background-size:cover; 
	-moz-background-size:cover; 
	-webkit-background-size:cover;
	background-repeat: no-repeat;
	background-position: center;
}
.section-bg.active {
	height: 100%;
}
/* Die Bilder kommen pro Seite aus dem ACF-Feld "page_background" und werden als Inline-Style eingehaengt.
   s. lib/section_backgrounds.php
   Seiten ohne Bild zeigen den Body-Hintergrund (dw-hintergrund.jpg). */

/* # # # # HEADER / FOOTER / NAV # # # # */

#pageheader {
	padding: 2rem;

	@media screen and (max-width: 899px) {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	@media screen and (min-width: 900px) {
		position: fixed;
		top: 0;
	}
}
#logo {
	& svg {
		width: 100%;
		max-width: 120px;
		& .do {
			fill: #fff;
		}
		& .we {
			fill: var(--dw-main);
		}
	}
}

#menuopener {
	cursor: pointer;
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 10;
	width: 1.2rem;
	height: 1.2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.4rem;
	transition: gap 0.2s ease-out;

	&::before, &::after {
		content: '';
		width: 100%;
		height: 2px;
		background-color: var(--dw-light);
		transition: all 0.2s ease-in;
	}
	&:hover::before, &:hover::after {
		background-color: var(--dw-main);
	}
	.menuopen & {
		gap: 0;
	}
	@media screen and (min-width: 900px) {
		display: none;
	}
}

#pageheader nav, .footer-nav {
	ul {
		margin: 0;
		padding: 0;
		list-style-type: none;
		text-transform: uppercase;
		font-size: small;
	}
	a {
		display: inline-block;
		padding: 0.5rem 0;

		@media (min-width: 900px) {
			padding: 0.3rem 0;
		}

		.current_page_item & {
			color: var(--dw-main);
		}
	}
}
#pageheader nav {
	@media screen and (max-width: 899px) {
		position: fixed;
		inset: 0;
		z-index: 9;
		height: 0;
		overflow-y: auto;
		background-color: rgba(0, 0, 0, 0.9);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		transition: height 0.2s ease-in-out;

		.menuopen & {
			height: 100dvh;
		}
	}

	@media screen and (min-width: 900px) {
		margin-top: 2rem;
	}
}

footer {
	position: fixed;
	bottom: 0;
	padding: 2rem 2rem 1.7rem;

	@media screen and (max-width: 899px) {
		position: fixed;
		bottom: -100dvh;
		z-index: 10;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		width: 100%;
		transition: bottom 0.2s ease-in-out;

		.menuopen & {
			bottom: 0;
		}
	}
	svg {
		width: 20px;
		fill: var(--dw-light);
	}
	a:hover svg {
		fill: var(--dw-main);
	}
}

/* # # # # MAIN # # # # */

main {
	width: 100%;
	padding: 2rem;
	transition: opacity 0.5s ease-in-out;

	@starting-style {
		opacity: 0;
	}

	@media screen and (min-width: 900px) {
		padding-left: 200px;
	}
}

main > header {
	margin-bottom: 1rem;

	@media screen and (min-width: 900px) {
		margin-bottom: 1rem;

		.page-gallery & {
			margin-bottom: 8rem;
		}
	}

	& h1 {
		margin: 0;
		text-align: center;	
		font-size: small;
		@media screen and (min-width: 900px) {
			text-align: right;
		}
	}
}
main > header:has(+ .submenu) {
	margin-bottom: 1rem;
}

.submenu {
	position: sticky;
	top: 1rem;
	z-index: 8;

	display: flex;
	margin-bottom: 1rem;

	@media screen and (min-width: 900px) {
		margin-bottom: 8rem;
	}

	@media (min-width: 600px) {
		top: 2rem;
		justify-content: end;
	}

	@media (max-width: 599px) {
		justify-content: center;
	}
}
.submenu select {
	appearance: none;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23fff' class='size-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E%0A") right center / 20px no-repeat;
	border: none;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	line-height: inherit;
	outline: none;
	color: var(--dark);
	text-transform: uppercase;
	text-align: center;
	text-align-last: center;
	transition: all 0.3s ease-out;

	@media (max-width: 600px) {
		padding: 0 2em;
	}
	@media (min-width: 600px) {
		text-align: right;
		text-align-last: right;
		padding-right: 2em;
	}

	&:hover {
		background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23759e96' class='size-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19.5 8.25-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E%0A") right center / 20px no-repeat;
		color: var(--dw-main);
	}
}

main p a {
	overflow-wrap: break-word;
	word-break: break-all;
	word-break: break-word;
	word-wrap: break-word;
}

/* # # # # START / Exhibition# # # # */

.announcer {
	display: flex;
	flex-direction: column;
	gap: 2rem;

	@media (max-width: 799px) {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 2rem;
		text-align: center;
	}
	@media (min-width: 800px) {
		align-items: end;
		text-align: right;
	}
	.category {
		font-size: x-small;
		text-transform: uppercase;
	}
	.title {
		text-transform: uppercase;
	}
}

.exhibition-detail {
	width: 100%;
	max-width: 400px;
}
.exhibition-detail header {
	margin-bottom: 2em;
}
.exhibition-detail .category {
	font-size: x-small;
	text-transform: uppercase;
}
.exhibition-detail img {
	height: auto !important;
}

/* # # # # album / chapter / item / thumb-list # # # # */

.album {
	display: flex;
	flex-direction: column;
	gap: 6rem;
}

.album .chapter {
		
	& h2 {
		font-size: 1rem;
		text-align: center;
		margin: 0;
	}
	@media screen and (min-width: 900px) {
		& > h2 {	
			text-align: right;
		}
	}

	& .item {

		& img {
			display: block;
			flex-basis: fit-content;
			transition: transform 2s ease-out;

			.item:hover & {
				transform: scale(1.04);
				transition: transform 0.5s ease-out;
			}
		}

		& .title {
			font-size: small;
			text-align: center;
			text-transform: uppercase;
			opacity: 0;
			transition: opacity 0.3s ease-out;

			.item:hover & {
				opacity: 1;
			}
		}
	}
}

.thumb-list {
	display: flex;
	flex-wrap: wrap;
	gap: 3rem;
	margin-top: 2rem;

	@media screen and (min-width: 600px) {
		justify-content: center;
		gap: 2rem;
		
		.page-installations & .item {
			flex: 0 1 220px;
		}

		.page-setphotography & img {
			max-height: 100px;
		}
	}

	@media screen and (min-width: 900px) {
		justify-content: end;
	}

	& .item {
		opacity: 0;
		transform: translateY(2em);
		transition: opacity 0.5s ease-out, transform 0.5s ease-out;

		&.is-visible {
			opacity: 1;
			transform: translateY(0);
		}

		& img {
			width: 100%;
		}
	}
}

/* # # # # INSTALLATIONS # # # # */

.page-installations .thumb {
	position: relative;
	border-radius: 0.5rem;
	overflow: hidden;
	aspect-ratio: 16/9;

	&::after {
		content: '';
		position: absolute;
		right: 0;
		bottom: 0;
		margin: auto;
		width: 2rem;
		height: 2rem;
		color: var(--dw-light);
		font-size: 1rem;
		display: grid;
		place-items: center;

		background-image: url(images/icon-play.svg);
		background-size: 50%;
		background-repeat: no-repeat;
	}

	& img {
		width: 100%;
		height: 100%;
		object-position: center;
		object-fit: cover;
	}
}

/* # # # # GALLERY # # # # */

.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 4rem;
	justify-content: center;

	& img {
		max-width: 100%;
		height: 100%;

		@media screen and (min-width: 600px) {
			height: 260px;

			.small & {
				height: 200px;
			}
			.large & {
				height: 400px;
			}
			.xlarge & {
				height: 500px;
			}
		}
	}
}
.floating {
	margin-bottom: 16vw;
}
.floating .item {
	will-change: transform;
	--target: 16vw;
	transform: translateY(calc(var(--target) * var(--progress, 0)));
	transition: transform 0.5s ease-out;

	@media screen and (min-width: 600px) {
		&:nth-child(3n+1) {
			--target: 8vw;
		}
		&:nth-child(3n+2) {
			--target: 16vw;
		}
		&:nth-child(3n+3) {
			--target: 4vw;
		}
	}
}

/* # # # # OVERLAY # # # # */

.overlay {
	visibility: hidden;
	position: fixed;
	z-index: 11;
	inset: 0;
	height: 100vh;
	height: -webkit-fill-available;
	background-color: rgba(0, 0, 0, 0.9);

	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease-in-out;
	
	&.open {
		visibility: visible;
		opacity: 1;
		pointer-events: all;
	}

	& h4 {
		font-size: 1.2em;
	}

	& .closeBtn {
		position: fixed;
		top: 2rem;
		right: 2rem;
		z-index: 10;

		& svg {
			min-width: 30px;
			fill: var(--dw-hint);
        	transition: fill 0.3s ease-out;
		}
		&:hover svg {
			fill: var(--dw-main);
		}
	}
}

.scroll-snaper {
	height: 100vh;
	overflow: scroll;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
    scrollbar-width: none;

	& > div {
		&:not(:has(.video-container)) {
			min-height: 100vh;
		}
		
		&:has(.video-container) {
			min-height: 100vh;
		}

		scroll-snap-align: start;
		padding: 6rem 2rem;

		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1em;

		@media (min-width: 600px) {
			padding: 4rem;

			&:has(.discription) {
				padding: 4rem 4rem 2rem;
			}
		}
	}
	img {
		height: 100%;
		max-width: 100%;
		max-height: 80vh;
		flex-basis: fit-content;
	}
}

.discription {
	opacity: 0.5;
	transition: opacity 0.3s ease-out;

	&:hover {
		opacity: 0.8;
	}
	& .title {
		text-transform: uppercase;
	}

	.page-gallery & {
		font-size: small;
		text-align: center;
	}

	.page-installations & {
		width: 100%;
		max-width: 800px;
	}
}

/* video */

.video-container {
	width: 100%;
	max-width: 1200px;
}
.video-wrapper {
	padding: 56.25% 0 0 0;
	position: relative;

	 & iframe,
	 & video {
	 	position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	 }
}

/* # # # # content # # # # */

.default-content-wrapper {
	@media (min-width: 899px) {
		width: 100%;
		max-width: 800px;
		margin: 82px auto 0;
		padding-right: 200px;
	}
	table.exhibition-table {
		border-spacing: 0 0.4rem;
		& td {
			vertical-align: top;
		}
		& td:first-child {
			padding-right: 1rem;
		}
	}
}

.centered-content-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	@media (min-width: 899px) {
		min-height: calc(100vh - 4rem);
		padding-right: 200px;
	}
}