/*
Theme Name: Blocksy Child
Description: Child theme of Blocksy for zonta-electra.de
Author: Martin Lotze
Template: blocksy
Version: 1.7.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: blocksy-child
*/

/* Details block (FAQ accordion) */
.entry-content .wp-block-details {
	margin-block-end: 0;
	padding: 1em 0;
	border-bottom: 1px solid var(--theme-border-color);
}

.entry-content .wp-block-details:first-of-type {
	border-top: 1px solid var(--theme-border-color);
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--theme-headings-color);
}

.wp-block-details[open] summary {
	margin-bottom: 0.75em;
}

.entry-content .wp-block-details + :not(.wp-block-details) {
	margin-block-start: var(--theme-content-spacing);
}

/* Header dropdown: mark the current page */
.ct-header .sub-menu .current-menu-item > .ct-menu-link,
.ct-header .sub-menu .current-menu-ancestor > .ct-menu-link {
	font-weight: 700;
	background-color: rgba(0, 0, 0, 0.18);
}

/* Header dropdown: attach to the link instead of the full row height.
   Links are vertically centred with "Items Height" 40 % → their bottom edge sits at 70 % of the row. */
.ct-header [data-id*="menu"] > ul > li > .sub-menu {
	top: 70%;
}

/* Media & Text: gap only between media and text, so the text keeps the
   left edge of the surrounding content (core pads 8 % on both sides). */
.wp-block-media-text > .wp-block-media-text__content {
	padding-inline: 2.5rem 0;
}

.wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
	padding-inline: 0 2.5rem;
}

@media (max-width: 600px) {
	.wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
		padding: 1.5rem 0 0;
	}
}

/* Teaser cards (overview pages): image flush with the rounded card */
.zonta-card {
	overflow: hidden;
}

.zonta-card > .wp-block-image {
	margin: 0;
}

.zonta-card h3 a {
	color: inherit;
	text-decoration: none;
}

/* Core latest posts as cards */
.wp-block-latest-posts.is-grid li {
	margin-bottom: 2em;
}

.wp-block-latest-posts__featured-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 6px;
}

.wp-block-latest-posts__post-title {
	display: block;
	margin-top: 0.75em;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--theme-headings-color);
	text-decoration: none;
}

/* Archive grid cards: share the title, image, excerpt and button rows with the
   neighbouring cards, so a two-line title does not push its image out of line. */
.entries[data-layout="grid"] > .entry-card {
	display: grid;
	grid-row: span 4;
	grid-template-rows: subgrid;
	row-gap: 0;
}

.entries[data-layout="grid"] > .entry-card > .entry-title {
	align-self: end;
}

.entries[data-layout="grid"] > .entry-card > .entry-button {
	justify-self: var(--horizontal-alignment, start);
}

/* Keep IBANs on one line on desktop */
@media (min-width: 1000px) {
	.iban {
		white-space: nowrap;
	}
}

/* Highlight (e.g. "[folgt: …]" markers for missing facts) */
mark {
	padding: 0 0.2em;
	background-color: var(--theme-palette-color-7);
	color: inherit;
}
