/*
 * Block layouts for charvat-home.de (replaces WPBakery / Massive Addons).
 * Values taken from the original page builder settings.
 */

:root {
	--ch-gold: #ad9a6f;
	--ch-border: #cab38d;
	--ch-slate: #606d80;
	--ch-light: #dce0e6;
	--ch-text: #7e7d7e;
	--ch-heading-font: "Playfair Display", serif;
	--ch-body-font: "Open Sans", sans-serif;
}

html,
body {
	overflow-x: hidden;
}

/* ---------- Base elements ---------- */

.ch-heading {
	font-family: var(--ch-heading-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ch-gold);
	margin: 0 0 15px;
	text-align: left;
}

.ch-heading--slate {
	color: var(--ch-slate);
}

.ch-heading--white {
	color: #fff;
}

.ch-text {
	font-family: var(--ch-body-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ch-text);
}

.ch-text p,
p.ch-text {
	margin: 0 0 1.6em;
}

.ch-text--slate,
.ch-text--slate p {
	color: var(--ch-slate);
}

.ch-text--white,
.ch-text--white p {
	color: #fff;
}

.ch-text img {
	display: inline-block;
	vertical-align: middle;
}

.ch-text a {
	color: inherit;
}

hr.ch-divider {
	width: 15%;
	margin: 0 0 35px;
	border: 0;
	border-top: 1px solid var(--ch-gold);
	opacity: 1;
	background: none;
	height: 0;
}

hr.ch-divider--slate {
	border-top-color: var(--ch-slate);
}

/* Full-bleed sections inside the theme's fixed container */
.ch-full {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}

/* Image that fills its column like a CSS background */
.ch-fill {
	position: relative;
	overflow: hidden;
}

.ch-fill > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.ch-fill > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* ---------- Hero ---------- */

.wp-block-columns.ch-hero {
	gap: 0 !important;
	flex-wrap: nowrap !important;
	align-items: stretch;
}

.wp-block-columns.ch-hero > .ch-hero__image {
	flex: 0 0 66.6667% !important;
}

.wp-block-columns.ch-hero > .ch-hero__logo {
	flex: 0 0 33.3333% !important;
	background: var(--ch-slate);
	padding: 9rem 0;
}

.ch-hero__logo .wp-block-image {
	margin: 0;
	text-align: center;
}

/* original: 34% side padding inside the column, i.e. 32% logo width */
.ch-hero__logo .wp-block-image img {
	display: inline-block;
	width: 32%;
	max-width: 100%;
	height: auto;
}

/* ---------- Bordered text box next to an image ---------- */

.wp-block-columns.ch-boxrow {
	gap: 0 !important;
	align-items: center !important;
	margin: 0;
}

.wp-block-columns.ch-boxrow > .wp-block-column {
	flex: 0 0 50% !important;
	margin: 25px 0;
}

.ch-box {
	position: relative;
	z-index: 0;
	margin: 0 -80px 0 15px;
	padding: 45px 150px 45px 70px;
	border: 5px solid var(--ch-border);
}

.ch-boxrow__media {
	position: relative;
	z-index: 1;
}

.ch-boxrow__media .wp-block-image {
	margin: 0;
	text-align: center;
}

.ch-boxrow__media .wp-block-image img {
	display: inline-block;
	max-width: 100%;
	height: auto;
}

/* ---------- Image left / tinted text right ---------- */

.wp-block-columns.ch-split {
	gap: 0 !important;
	flex-wrap: nowrap !important;
	align-items: stretch;
}

.wp-block-columns.ch-split > .wp-block-column {
	flex: 0 0 50% !important;
}

/* 20% of a half-width column in the original = 10vw */
.ch-split__text {
	background: var(--ch-light);
	padding: 4rem 10vw;
}

/* ---------- Gold band with call to action ---------- */

.ch-band {
	background: var(--ch-gold);
	padding: 4rem 0;
}

.ch-band__inner {
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.ch-band__content {
	width: 66.6667%;
	padding: 3.5% 15px;
}

.ch-band .ch-text {
	margin-bottom: 32px;
}

.ch-buttons {
	gap: 20px;
}

.ch-btn .wp-block-button__link {
	display: inline-block;
	padding: 15px 20px;
	border: 1px solid #fff;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: var(--ch-body-font);
	font-size: 18px;
	line-height: 1.3;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}

.ch-btn .wp-block-button__link:hover,
.ch-btn .wp-block-button__link:focus {
	background: #fff;
	color: var(--ch-gold);
}

.ch-btn--slate .wp-block-button__link {
	border-color: var(--ch-slate);
	color: var(--ch-slate);
}

.ch-btn--slate .wp-block-button__link:hover,
.ch-btn--slate .wp-block-button__link:focus {
	background: var(--ch-slate);
	color: #fff;
}

/* ---------- Intro text above a section ---------- */

.ch-intro {
	width: 66.6667%;
}

.ch-heading.ch-intro__title {
	margin: 0;
	padding: 35px 0 10px;
}

.ch-text--plain,
.ch-text--plain p {
	color: #777;
	line-height: 1.4;
}

/* ---------- Box row variants ---------- */

.wp-block-columns.ch-boxrow--wide > .ch-boxrow__box {
	flex-basis: 58.3333% !important;
}

.wp-block-columns.ch-boxrow--wide > .ch-boxrow__media {
	flex-basis: 41.6667% !important;
}

.ch-box--slate {
	border-color: var(--ch-slate);
}

/* here the box lies above the (white-edged) catalogue image */
.ch-boxrow--wide .ch-box {
	z-index: 2;
}

.ch-boxrow--wide .ch-boxrow__media {
	z-index: 0;
}

.ch-box .ch-buttons {
	margin-top: 32px;
}

/* ---------- Download callouts ---------- */

.ch-callout-group {
	padding: 2% 0;
}

.wp-block-columns.ch-callouts {
	gap: 30px !important;
	margin: 0 0 30px;
}

.wp-block-columns.ch-callouts > .wp-block-column {
	display: flex;
}

.ch-callout {
	flex: 1;
	padding: 37px 30px;
	border: 5px solid var(--ch-slate);
	background: var(--ch-light);
	text-align: center;
}

.ch-callout--book::before {
	content: "";
	display: block;
	width: 50px;
	height: 50px;
	margin: 0 auto;
	background-color: var(--ch-slate);
	-webkit-mask: var(--ch-icon-book) center / contain no-repeat;
	mask: var(--ch-icon-book) center / contain no-repeat;
}

:root {
	--ch-icon-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 8 46 34' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M3 10h19a3 3 0 0 1 3 3v27a3 3 0 0 0-3-3H3zM47 10H28a3 3 0 0 0-3 3v27a3 3 0 0 1 3-3h19z'/%3E%3Cpath d='M7 16h13M7 20h13M7 24h13M7 28h13M7 32h13M30 16h13M30 20h13M30 24h13M30 28h13M30 32h13'/%3E%3C/svg%3E");
}

.ch-callout .ch-callout__title {
	margin: 0;
	font-family: var(--ch-heading-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 2.4;
	color: var(--ch-slate);
	text-transform: capitalize;
}

.ch-callout .ch-callout__text {
	margin: -10px 0 13px;
	font-family: "Raleway", var(--ch-body-font);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ch-slate);
}

.ch-callout__buttons {
	justify-content: center;
}

.ch-callout__btn .wp-block-button__link {
	display: inline-block;
	padding: 12px 30px;
	border: 2px solid var(--ch-slate);
	border-radius: 0;
	background: transparent;
	color: var(--ch-slate);
	font-family: "Raleway", var(--ch-body-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	transition: background-color .2s, color .2s;
}

.ch-callout__btn .wp-block-button__link:hover,
.ch-callout__btn .wp-block-button__link:focus {
	background: var(--ch-slate);
	color: #efefef;
}

.ch-callout--magazine {
	border-color: #b39a68;
	background: #fff;
}

.ch-callout--magazine .ch-callout__btn .wp-block-button__link {
	border-color: #b39a68;
	background: #b39a68;
	color: #fff;
}

.ch-callout--magazine .ch-callout__btn .wp-block-button__link:hover,
.ch-callout--magazine .ch-callout__btn .wp-block-button__link:focus {
	border-color: #6b6b6b;
	background: #6b6b6b;
}

.ch-callout__image {
	margin: 0 0 10px;
}

.ch-callout__image img {
	display: inline-block;
	max-width: 100%;
	height: auto;
}

.ch-callout-group--magazine {
	padding: 2.5rem 0 35px;
}

/* ---------- Reference projects (title + carousel) ---------- */

.ch-project {
	padding: calc(2% + 32px) 0 4rem;
}

.ch-project__head {
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.ch-project .ch-heading {
	margin: 0;
	padding-bottom: 10px;
}

.ch-project--spaced {
	padding-bottom: 10rem;
}

.ch-project--gold,
.ch-project--gold-dark {
	padding: 3% 0 6rem;
	background: var(--ch-gold);
}

.ch-project--gold-dark {
	padding-bottom: 50px;
	background: #b39a68;
}

.ch-project--gold + .ch-project {
	margin-top: 8%;
	padding-top: 0;
}

.ch-band--intro {
	padding: 0;
}

.ch-band__content--wide {
	width: 83.3333%;
	padding: 4rem 15px;
}

/* ---------- Legal text (Impressum) ---------- */

.ch-legal {
	width: 66.6667%;
	padding: 4rem 0;
}

.ch-legal .ch-text {
	line-height: 1.4;
}

/* ---------- Contact form page (ID 811), shown inside the lightbox iframe ---------- */

body.page-id-811 .header,
body.page-id-811 #header,
body.page-id-811 #footer,
body.page-id-811 #gotoTop {
	display: none !important;
}

.ch-kontakt .wpcf7-form {
	padding: 12px;
}

.ch-kontakt input,
.ch-kontakt textarea {
	border: 1px solid #9b9b9b;
	color: #4a4a4a;
}

.ch-kontakt span.wpcf7-list-item {
	margin: 0 1em 0 0;
}

.ch-kontakt .wpcf7-submit {
	border: none;
	background-color: var(--ch-gold);
	color: #fff;
}

/* ---------- Carousel (gallery enhanced by ch.js) ---------- */

.ch-carousel-wrap {
	padding: 2% 0;
}

.wp-block-gallery.ch-carousel {
	display: flex;
	flex-wrap: nowrap !important;
	gap: 50px !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	margin: 0;
	padding: 0;
}

.wp-block-gallery.ch-carousel > .wp-block-image {
	flex: 0 0 calc((100% - 150px) / 4) !important;
	width: auto !important;
	margin: 0 !important;
	scroll-snap-align: start;
}

.wp-block-gallery.ch-carousel > .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.ch-carousel.is-enhanced {
	overflow: visible;
	scroll-snap-type: none;
	will-change: transform;
}

.ch-carousel-viewport {
	position: relative;
	overflow: hidden;
}

.ch-slider-viewport {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}

.ch-slider-viewport .ch-nav {
	opacity: 0;
	transition: opacity .2s;
}

.ch-slider-viewport:hover .ch-nav,
.ch-slider-viewport .ch-nav:focus {
	opacity: 1;
}

.ch-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	padding: 40px 10px;
	border: 0;
	background: rgba(255, 255, 255, .7);
	color: #555;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ch-nav:hover {
	color: #df5461;
}

.ch-nav--prev {
	left: 0;
}

.ch-nav--next {
	right: 0;
}

/* ---------- Slider with dots ---------- */

.wp-block-gallery.ch-slider {
	display: block;
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}

.wp-block-gallery.ch-slider > .wp-block-image {
	width: 100% !important;
	margin: 0 !important;
}

/* core gallery styles use :not(#individual-image), hence !important */
.ch-slider.is-enhanced > .wp-block-image {
	display: none !important;
}

.ch-slider.is-enhanced > .wp-block-image.is-active {
	display: block !important;
	animation: ch-fade .6s ease;
}

.wp-block-gallery.ch-slider > .wp-block-image img {
	width: 100%;
	height: auto;
}

.ch-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 15px;
}

.ch-dots button {
	width: 11px;
	height: 11px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .5);
	cursor: pointer;
}

.ch-dots button.is-active {
	background: rgba(0, 0, 0, .9);
}

@keyframes ch-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ---------- Lightbox ---------- */

.ch-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 15px;
	background: rgba(11, 11, 11, .8);
}

.ch-lightbox-overlay__frame {
	position: relative;
	width: 100%;
	max-width: 900px;
	max-height: 100%;
}

.ch-lightbox-overlay iframe {
	display: block;
	width: 100%;
	height: 720px;
	max-height: calc(100vh - 80px);
	border: 0;
	background: #fff;
}

.ch-lightbox-overlay img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 80px);
	margin: 0 auto;
	background: #fff;
}

.ch-lightbox-overlay__close {
	position: absolute;
	top: -40px;
	right: 0;
	padding: 0 6px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 34px;
	line-height: 40px;
	cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
	.wp-block-columns.ch-boxrow {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.ch-boxrow > .wp-block-column,
	.wp-block-columns.ch-boxrow--wide > .wp-block-column {
		flex-basis: 100% !important;
	}

	.ch-box {
		margin: 0 15px;
	}

	.ch-boxrow__media {
		max-width: 66.6667%;
		margin-left: auto !important;
		margin-right: auto !important;
	}
}

@media (max-width: 991px) {
	.ch-hero__logo .wp-block-image img {
		width: 160px;
	}
}

@media (max-width: 991px) {
	.wp-block-columns.ch-hero,
	.wp-block-columns.ch-split {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.ch-hero > .wp-block-column,
	.wp-block-columns.ch-split > .wp-block-column {
		flex-basis: 100% !important;
	}

	.ch-fill {
		min-height: 40rem;
	}

	.ch-band__content,
	.ch-band__content--wide,
	.ch-intro,
	.ch-legal {
		width: 100%;
	}

	.wp-block-gallery.ch-carousel > .wp-block-image {
		flex-basis: calc((100% - 50px) / 2) !important;
	}
}

@media (max-width: 767px) {
	.ch-box {
		margin: 0;
		padding: 0 30px;
		border: 0;
	}

	.ch-boxrow__media {
		max-width: 100%;
	}

	.ch-split__text {
		padding: 2rem 30px 20px;
	}

	.ch-band__content {
		padding: 0 15px;
	}

	.ch-btn .wp-block-button__link {
		font-size: 16px;
		white-space: normal;
	}

	.wp-block-gallery.ch-carousel {
		gap: 20px !important;
	}

	.wp-block-gallery.ch-carousel > .wp-block-image {
		flex-basis: calc((100% - 20px) / 2) !important;
	}
}

@media (max-width: 600px) {
	.ch-fill {
		min-height: 26rem;
	}
}

@media (max-width: 400px) {
	.ch-fill {
		min-height: 20rem;
	}
}
