/**
 * FdM Layout – oberallgaeuer-meisterkonzerte.de
 *
 * Part 1: page layout · Part 2: side banner · Part 3: front page ·
 * Part 4: restyling of knandi-event-* (empty so far) · Part 5: header
 *
 * Fonts and colours come from Astra. Parts 1 and 3 target Astra's native
 * <article>; Elementor prints a <div>, so they have no effect while its
 * theme builder templates are still active.
 */

:root {
	--fdm-content-width: 1140px; /* former Elementor kit width */
	--fdm-gutter: 10px;
	--fdm-title-gap: 20px;
}

/* ---------- Part 1: page layout ---------- */

.page article.ast-article-single {
	box-sizing: border-box;
	max-width: calc(var(--fdm-content-width) + 2 * var(--fdm-gutter));
	margin: 0 auto;
	padding: var(--fdm-gutter);
}

/* Contain child margins, as the Elementor flex containers did. */
.page article.ast-article-single > .entry-content {
	display: flow-root;
	overflow-wrap: normal; /* do not break words beside floated portraits */
}

.page article.ast-article-single > .entry-header {
	margin: 0 0 var(--fdm-title-gap);
}

/* Astra's own page title is only 32px, keep the regular H1 size. */
.page article.ast-article-single > header.entry-header .entry-title {
	margin: 0;
	color: var(--ast-global-color-2, #0f172a);
	font-size: 3.5555555555556rem; /* 64px */
	font-weight: 600;
	line-height: 1.4;
}

@media (max-width: 921px) {
	.page article.ast-article-single > header.entry-header .entry-title {
		font-size: 30px;
	}
}

/* Astra adds 3em padding to top-level blocks inside .entry-content. */
.page article.ast-article-single > .entry-content > .wp-block-group,
.page article.ast-article-single > .entry-content > .wp-block-columns {
	padding: 0;
}

/*
 * Content. Astra has separate rules for Elementor's post content widget and
 * for .entry-content; keep the former look. Specificity is deliberately just
 * high enough to beat Astra, so that block and plugin styles still win.
 */
.page .entry-content :is(h1, h2, h3, h4, h5, h6):where(:not(.fdm-next-event *)) {
	clear: both; /* headings start below floated portraits */
	margin-top: 1.5em;
	margin-bottom: calc(0.3em + 10px);
}

:where(.page) article .entry-content p {
	margin-bottom: 1.75em;
}

/* Astra removes the margin of the last child. */
.page .entry-content > p:last-child {
	margin-bottom: 1.75em;
}

/* Inside columns the block gap does the spacing. */
.page .entry-content .wp-block-column > p {
	margin-bottom: 0;
}

.page .entry-content :where(ul, ol):where(:not([class]), .wp-block-list) {
	margin: 0 0 1.5em 3em;
	padding: 0;
}

body.page .entry-content a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

.page .entry-content[data-ast-blocks-layout] > figure,
.page .entry-content > .wp-block-buttons {
	margin-bottom: 0;
}

.page .entry-content > .wp-block-columns {
	margin-bottom: 1.75em;
}

/* Astra centres every top-level child and widens it to the container. */
.page .entry-content[data-ast-blocks-layout] > #ez-toc-container {
	margin-right: 0;
	margin-left: 0;
}

.page .entry-content[data-ast-blocks-layout] > .knandi-events-list {
	max-width: 1000px;
}

.page .entry-content .knandi-events-list > hr {
	margin-bottom: 0;
}

/* ---------- Part 2: side banner ---------- */

.fdm-side-banner {
	--fdm-banner-font-size: calc(100vh * var(--fdm-banner-font-ratio, 0.65) / (var(--fdm-banner-chars, 28) * 0.6));

	position: fixed;
	top: 0;
	bottom: 0;
	left: 0; /* adjusted by side-banner.js */
	z-index: 10; /* below header and off-canvas menu */
	display: none;
	align-items: center;
	justify-content: center;
	width: calc(var(--fdm-banner-font-size) * (1 + 2 * var(--fdm-banner-padding-ratio, 0.9)));
	background-color: var(--ast-global-color-0, #9c172c);
	pointer-events: none;
}

.fdm-side-banner.is-visible {
	display: flex;
}

.fdm-side-banner__text {
	padding: calc(var(--fdm-banner-font-size) * var(--fdm-banner-padding-ratio, 0.9)) 0;
	color: var(--ast-global-color-5, #fff);
	font-size: var(--fdm-banner-font-size);
	font-weight: 700;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
}

/* ---------- Part 3: front page ---------- */

.home article.ast-article-single {
	padding-top: 50px; /* former spacer, gap and container padding */
}

/* Design decision: front page H1 in H2 size. */
.home .entry-content h1 {
	font-size: 2.667rem; /* 48px */
}

@media (max-width: 921px) {
	.home .entry-content h1 {
		font-size: 25px;
	}
}

/*
 * #F3F3F3 at 50% opacity, exactly as Elementor rendered it. The transparent
 * border is the gap below the box; a margin would collapse with the H1's.
 */
.fdm-next-event,
.page article.ast-article-single > .entry-content > .fdm-next-event {
	padding: 13px;
	border-bottom: 40px solid transparent;
	background: rgba(243, 243, 243, 0.5) padding-box;
}

.page .fdm-next-event :is(h2, h3) {
	clear: both;
	margin: 0;
}

/* ---------- Part 4: restyling of knandi-event-* ---------- */

/* ---------- Part 5: header ---------- */

/* Moved here from Astra's "Additional CSS". */
.ast-hfb-header .main-header-menu .sub-menu .menu-link,
.ast-hfb-header .main-header-menu .sub-menu .menu-text {
	text-transform: none !important;
}

/*
 * Below Astra's header breakpoint the transparent header of the front page is
 * absolute and covers the concert box. Put it back into the document flow; its
 * height varies, so no fixed offset.
 */
@media (max-width: 921px) {
	.home.ast-theme-transparent-header #masthead {
		position: relative;
	}
}
