/*
 * Blog and portfolio as under Avada: post lists (layout "large" with the full
 * content), single post (meta line, share box, related posts), portfolio
 * cards, the job filter (assets/js/filter.js) and the portfolio archive.
 */

/* ---------- Post lists (home.html, archive.html) ---------- */

/* 55px above and 40px below every post, 65px between posts (Avada child theme). */
.fvei-posts .wp-block-post {
	padding: 55px 0 40px;
}

.fvei-posts .wp-block-post + .wp-block-post {
	margin-top: 65px;
}

.fvei-posts .wp-block-post-title {
	margin: 0 0 25px;
}

/* ---------- Meta line (post lists and single.html) ---------- */

/* Author, date and category between two thin lines, "Weiterlesen" on the right. */
.fvei-meta {
	margin-top: 20px;
	padding: 5px 0;
	border-block: 1px solid #e0dede;
	font-size: 12px;
	line-height: 1.46;
}

.fvei-meta__info > * {
	display: inline;
	margin: 0;
}

.fvei-meta__info .wp-block-post-date::before,
.fvei-meta__info .wp-block-post-terms::before {
	content: "|";
	margin-right: 0.3em;
}

/* ---------- Single post (single.html) ---------- */

/* Share box (Avada social sharing box): heading left, icon links right. */
.fvei-share {
	margin-top: 60px;
}

.fvei-share .wp-block-heading {
	margin: 0;
}

.wp-block-social-links.fvei-share__links {
	gap: 20px;
	margin: 0;
	padding: 0;
}

/* Related posts (Avada "Ähnliche Beiträge"): five images in a row. */
.fvei-related {
	margin-top: 55px;
}

.fvei-related .wp-block-post-featured-image {
	margin: 0;
}

/* ---------- Portfolio cards (patterns portfolio-grid, jobs-grid) ---------- */

/* Avada left 40px between the text above and the project grid. */
.fvei-projects {
	margin-top: 40px;
}

/* Card (Avada portfolio "boxed"): thin line around, 3px at the bottom. */
.fvei-cards > .wp-block-post {
	display: flex;
	flex-direction: column;
	border: 1px solid #ebeaea;
	border-bottom-width: 3px;
}

/* Filtered out by assets/js/filter.js. */
.fvei-cards > .wp-block-post[hidden] {
	display: none;
}

.fvei-cards .wp-block-post-featured-image {
	margin: 0;
}

.fvei-cards .wp-block-post-title {
	margin: 0 0 1px;
}

.fvei-cards .wp-block-post-terms {
	margin-top: 0;
}

/* Projects: dotted line between title and excerpt. */
.fvei-cards .wp-block-post-excerpt {
	margin: 20px 0 0;
	padding-top: 20px;
	border-top: 1px dotted #ebeaea;
}

/* Jobs: logo at 75% of Avada's 300 x 214 crop, a gray box where there is none. */
.fvei-jobs .wp-block-post-featured-image,
.fvei-jobs .wp-block-post:not(:has(.wp-block-post-featured-image))::before {
	width: 64%;
	margin: 10px 0 0 11%;
}

.fvei-jobs .wp-block-post:not(:has(.wp-block-post-featured-image))::before {
	content: "";
	aspect-ratio: 300 / 214;
	background: #f6f6f6;
}

/* Category filter above the jobs (Avada portfolio filters). */
.fvei-filter {
	display: flex;
	flex-wrap: wrap;
	column-gap: 30px;
	margin: 18px 0 55px;
	border-block: 1px solid #e0dede;
}

.fvei-filter button {
	padding: 0;
	border: 0;
	border-top: 3px solid transparent;
	background: none;
	color: var(--wp--preset--color--gruen);
	font: inherit;
	line-height: 31px;
	cursor: pointer;
}

.fvei-filter button[aria-pressed="true"] {
	border-top-color: currentColor;
}

/* Mobile: one category per line, as in Avada. */
@media (max-width: 800px) {
	.fvei-filter {
		flex-direction: column;
	}

	.fvei-filter button {
		border-bottom: 1px solid #e0dede;
		text-align: left;
	}

	.fvei-filter button:last-child {
		border-bottom: 0;
	}
}

/* ---------- Portfolio archive (pattern portfolio-archive) ---------- */

/* One entry per row: image, title and excerpt (Avada portfolio archive). */
.fvei-portfolio-list .wp-block-post + .wp-block-post {
	margin-top: 50px;
}

.fvei-portfolio-list .wp-block-post-featured-image {
	margin: 0 0 20px;
}

.fvei-portfolio-list .wp-block-post-title {
	margin: 0 0 20px;
}
