/*
 * Layout — site header, primary navigation, page hero, content wrapper
 * and site footer. Page-type (landing vs sub) is driven by body classes
 * (.is-landing / .is-sub) set in functions.php.
 */

/* ---------- Site header ---------- */
.site-header {
	position: absolute;
	top: 0;
	width: 100%;
	height: 159px;
	padding-top: 10px;
	background-image: url("../../images/farbverlauf.png");
	display: grid;
	grid-template-columns: 1fr auto 1fr;
}

.site-header img {
	opacity: 1 !important;
}

.site-header__spacer {
	display: inline-block;
	width: 100%;
	height: 100px;
	background-color: #fff;
}

.site-header .custom-logo {
	width: auto;
	height: 100px;
}

.site-header .custom-logo-link {
	display: inline;
	height: 100px;
}

/* ---------- Primary navigation ---------- */
.site-nav {
	position: fixed;
	top: 126px;
	left: 0;
	width: 100%;
	z-index: 999;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.94);
	border-top: 1px solid var(--color-hairline);
	border-bottom: 1px solid rgba(35, 35, 38, 0.12);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.site-nav__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.site-nav__menu {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 2px;
	margin: 0;
	padding: 8px;
}

.site-nav__menu li {
	list-style-type: none;
}

.site-nav__menu a {
	position: relative;
	display: block;
	padding: 12px 15px;
	color: var(--color-ink);
	font-family: var(--font-heading);
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
}

.site-nav__menu a::after {
	position: absolute;
	right: 15px;
	bottom: 7px;
	left: 15px;
	height: 2px;
	background: var(--color-taupe);
	content: "";
	opacity: 0;
	transform: scaleX(0.35);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-nav__menu li.active a,
.site-nav__menu .current-menu-item a,
.site-nav__menu a:hover {
	color: #000;
}

.site-nav__menu li.active a::after,
.site-nav__menu .current-menu-item a::after,
.site-nav__menu a:hover::after,
.site-nav__menu a:focus-visible::after {
	opacity: 1;
	transform: scaleX(1);
}

.site-nav__menu a:focus-visible {
	outline: 2px solid var(--color-ring);
	outline-offset: 2px;
}

.site-nav__toggle {
	display: none;
}

/* ---------- Page hero ---------- */
.page-hero {
	position: absolute;
	top: 0;
	z-index: -10;
	width: 100%;
	background-size: cover;
	background-position: center top;
	text-align: center;
	overflow: hidden;
}

.is-landing .page-hero {
	height: 100vh;
}

.is-sub .page-hero {
	height: 400px;
	background-repeat: no-repeat;
	border-bottom: 1px solid #ccc;
}

.is-landing .page-hero img {
	position: absolute;
	top: calc(50% + 90px);
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 100%;
	max-height: calc(100vh - 190px);
}

/* ---------- Content wrapper ---------- */
.content {
	max-width: var(--container);
	margin: 0 auto;
	padding: 20px;
}

.is-landing .content {
	padding-top: 100vh;
}

.is-sub .content {
	padding-top: 420px;
}

.content .wp-caption {
	max-width: 100%;
}

.content .wp-caption-text,
.content figcaption {
	position: relative !important;
	margin-top: -46px !important;
	padding: 10px !important;
	background-color: rgba(255, 255, 255, 0.7) !important;
	display: block !important;
	font-size: inherit !important;
}

.content .wp-caption-text a,
.content figcaption a {
	display: block !important;
	margin: -10px !important;
	padding: 10px !important;
	color: #000 !important;
}

.wp-caption.aligncenter {
	width: 100% !important;
}

.content a img:hover {
	opacity: 0.7;
}

/* ---------- Site footer ---------- */
.site-footer {
	background: var(--color-ink);
	color: #f7f7f4;
	text-align: left;
}

.site-footer__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

.site-footer__intro {
	padding: 34px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__eyebrow {
	margin: 0 0 8px;
	color: var(--color-taupe);
	font-family: var(--font-heading);
	font-size: 13px;
	text-transform: uppercase;
}

.site-footer__lead {
	margin: 0 0 18px;
	max-width: 680px;
	color: #fff;
	font-size: 20px;
	line-height: 1.45;
}

.site-footer__button {
	display: inline-block;
	padding: 0 0 6px;
	border-bottom: 2px solid var(--color-taupe);
	color: #fff;
	font-family: var(--font-heading);
	text-decoration: none;
}

.site-footer__button:hover {
	color: var(--color-taupe);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.45fr 1.1fr 0.8fr 0.8fr 0.9fr;
	gap: 30px;
	padding: 42px 0;
}

.site-footer__section h2 {
	margin: 0 0 16px;
	color: var(--color-taupe);
	font-family: var(--font-heading);
	font-size: 14px;
	line-height: 1.2;
	text-align: left;
	text-transform: uppercase;
}

.site-footer__section p {
	margin: 0 0 10px;
	color: #e8e8e3;
	line-height: 1.55;
}

.site-footer__strong {
	color: #fff !important;
	font-family: var(--font-heading);
}

.site-footer__contact-list {
	margin: 0;
	padding: 0;
}

.site-footer__contact-item {
	padding: 13px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__contact-item:first-child {
	padding-top: 0;
	border-top: 0;
}

.site-footer__contact-item dt {
	margin: 0 0 5px;
	color: #a9a9a2;
	font-size: 12px;
	line-height: 1.2;
	text-transform: uppercase;
}

.site-footer__contact-item dd {
	margin: 0;
	color: #fff;
	line-height: 1.45;
}

.site-footer__contact-item dd span {
	display: block;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--color-taupe);
}

.site-footer__menu {
	margin: 0;
	padding: 0;
}

.site-footer__menu li {
	display: block;
	margin: 0 0 10px;
	list-style-type: none;
}

.site-footer__qr {
	display: block;
	width: 112px;
	max-width: 100%;
	margin: 0;
}

.site-footer__qr img {
	display: block;
	width: 100%;
	height: auto;
}

.site-footer__qr:hover {
	opacity: 0.82;
}

.site-footer__bottom {
	padding: 18px 0 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	color: #b8b8b2;
	font-size: 14px;
}

.site-footer__bottom p {
	margin: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
	.site-header {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1000;
		display: flex;
		width: 100%;
		height: 74px;
		align-items: center;
		padding: 0 16px;
		box-sizing: border-box;
		background: #fff;
		border-bottom: 1px solid var(--color-hairline);
	}

	.site-header__spacer {
		display: none;
	}

	.site-header .custom-logo {
		width: 54px;
		height: 54px;
		opacity: 0 !important;
	}

	.site-header .custom-logo-link {
		display: block;
		width: 54px;
		height: 54px;
		overflow: hidden;
		background: url("https://cg-heidelsheim.de/wp-content/uploads/2018/06/favicon_trans.png") center / contain no-repeat;
	}

	.site-nav {
		top: 0;
		z-index: 1001;
		height: 74px;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		pointer-events: none;
	}

	.site-nav__inner {
		position: relative;
		display: flex;
		height: 74px;
		align-items: center;
		justify-content: flex-end;
		max-width: none;
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		pointer-events: none;
	}

	.site-nav__toggle {
		position: relative;
		z-index: 1002;
		display: flex;
		width: auto;
		height: 74px;
		align-items: center;
		gap: 12px;
		justify-content: flex-end;
		padding: 0 16px;
		border: 0;
		background: transparent;
		color: var(--color-ink);
		font-family: var(--font-heading);
		font-size: 14px;
		text-transform: uppercase;
		cursor: pointer;
		pointer-events: auto;
	}

	.site-nav__toggle-icon {
		position: relative;
		display: inline-block;
		width: 24px;
		height: 2px;
		background: var(--color-ink);
	}

	.site-nav__toggle-icon::before,
	.site-nav__toggle-icon::after {
		position: absolute;
		left: 0;
		width: 24px;
		height: 2px;
		background: var(--color-ink);
		content: "";
		transition: transform 0.18s ease, top 0.18s ease;
	}

	.site-nav__toggle-icon::before {
		top: -7px;
	}

	.site-nav__toggle-icon::after {
		top: 7px;
	}

	.site-nav.is-open .site-nav__toggle-icon {
		background: transparent;
	}

	.site-nav.is-open .site-nav__toggle-icon::before {
		top: 0;
		transform: rotate(45deg);
	}

	.site-nav.is-open .site-nav__toggle-icon::after {
		top: 0;
		transform: rotate(-45deg);
	}

	.site-nav__menu {
		position: fixed;
		top: 74px;
		right: 0;
		left: 0;
		z-index: 1002;
		display: none;
		width: 100vw;
		box-sizing: border-box;
		padding: 6px 22px 14px;
		background: #fff;
		border-top: 1px solid rgba(35, 35, 38, 0.12);
		box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
		pointer-events: auto;
	}

	.site-nav.is-open .site-nav__menu {
		display: block;
	}

	.site-nav__menu li {
		border-bottom: 1px solid rgba(35, 35, 38, 0.08);
	}

	.site-nav__menu li:last-child {
		border-bottom: 0;
	}

	.site-nav__menu a {
		padding: 14px 0;
		font-size: 16px;
	}

	.site-nav__menu a::after {
		right: auto;
		bottom: 9px;
		left: 0;
		width: 42px;
	}

	.is-sub .content {
		padding-top: 340px !important;
	}

	.is-sub .page-hero {
		height: 320px;
	}

	.site-footer__intro {
		display: block;
		padding: 28px 0;
		text-align: center;
	}

	.site-footer__lead {
		font-size: 18px;
	}

	.site-footer__button {
		margin-top: 18px;
		white-space: normal;
	}

	.site-footer__grid {
		display: block;
		padding: 32px 0 22px;
		text-align: center;
	}

	.site-footer__section {
		margin-bottom: 30px;
	}

	.site-footer__section h2 {
		text-align: center;
	}

	.site-footer__contact-item {
		max-width: 320px;
		margin: 0 auto;
	}

	.site-footer__qr {
		margin: 0 auto;
	}

	.site-footer__bottom {
		text-align: center;
	}
}
