/*************************************************************************/
/*  Blog: Kategorieseite (Hero) und Block "Category Posts"
	functions/res-blog.php, category.php, templates/blog/, templates/blocks/category-posts/
*/


/*************************************************************************/
/*  Hero Kategorieseite  */

.res-blog-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 78vh;
	min-height: 460px;
	max-height: 920px;
	overflow: hidden;
	color: #fff;
	text-align: center;
	background: #000;
}
.res-blog-hero-media,
.res-blog-hero-media .res-blog-hero-img,
.res-blog-hero-media .res-blog-hero-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.res-blog-hero-media .res-blog-hero-img,
.res-blog-hero-media .res-blog-hero-video {
	object-fit: cover;
	max-width: none;
}

/* Verlauf unten für die Lesbarkeit des Titels */
.res-blog-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60%;
	background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}
.res-blog-hero-noimg::after {
	display: none;
}

/* ganzes Bild verlinkt (optional) */
.res-blog-hero-link {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}

.res-blog-hero-text {
	position: relative;
	z-index: 2;
	max-width: 960px;
	padding: 0 6vw clamp(44px, 9vh, 96px);
}
.res-blog-hero .res-blog-hero-title {
	margin: 0;
	color: #fff;
	font-family: 'poppins', sans-serif;
	font-size: clamp(36px, 6.4vw, 104px);
	font-weight: 600;
	line-height: 1;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.res-blog-hero .res-blog-hero-parent {
	display: inline-block;
	margin-bottom: 16px;
	color: rgba(255, 255, 255, .85);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	text-decoration: none;
}
.res-blog-hero .res-blog-hero-desc {
	max-width: 640px;
	margin: 22px auto 0;
	font-size: clamp(13px, 1vw, 15px);
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.res-blog-hero .res-blog-hero-desc p {
	margin: 0;
}
.res-blog-hero-subcats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 30px;
	margin-top: 28px;
}
.res-blog-hero .res-blog-hero-subcats a {
	padding-bottom: 4px;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, .45);
	transition: border-color .3s ease;
}
.res-blog-hero .res-blog-hero-parent:hover,
.res-blog-hero .res-blog-hero-subcats a:hover {
	color: #fff;
	border-color: #fff;
}

@media only screen and (max-width: 969.98px) {
	.res-blog-hero {
		height: 70vh;
		min-height: 420px;
	}
}

/* Beitrag: längere Titel, Datum */
.res-blog-hero-post .res-blog-hero-text {
	max-width: 1180px;
}
.res-blog-hero.res-blog-hero-post .res-blog-hero-title {
	font-size: clamp(30px, 4.6vw, 76px);
	line-height: 1.08;
	letter-spacing: .03em;
}
.res-blog-hero .res-blog-hero-date {
	margin: 22px 0 0;
	color: rgba(255, 255, 255, .85);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
}


/*************************************************************************/
/*  Blog-Beitrag: Inhalt  */

.res-post-content {
	padding: clamp(56px, 7vw, 120px) 0 clamp(20px, 3vw, 50px);
}
.res-post-content.res-post-starts-with-header {
	padding-top: 0;
}

/* Text in angenehmer Lesebreite, Layout-Blöcke (Text & Bild, Slider ...) in voller Breite */
.res-post-content > .container > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, .wp-block-quote, .wp-block-image, .wp-block-embed, .wp-block-gallery, .wp-block-buttons, .single-back-btn) {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}
.res-post-content > .container > :where(.alignwide) {
	max-width: 1080px;
}
.res-post-content > .container > p,
.res-post-content > .container > ul,
.res-post-content > .container > ol {
	font-family: 'poppins', sans-serif;
	font-size: clamp(16px, 1.25vw, 20px);
	font-weight: 400;
	line-height: 1.8;
	margin-bottom: 1.5em;
}
.res-post-content > .container > :where(h2, h3, h4) {
	margin-top: 2.2em;
	margin-bottom: .8em;
	letter-spacing: .05em;
	text-transform: uppercase;
}
.res-post-content > .container > .wp-block-image,
.res-post-content > .container > .wp-block-gallery {
	margin-top: 3em;
	margin-bottom: 3em;
}
.res-post-content > .container > .wp-block-quote {
	margin-top: 2.5em;
	margin-bottom: 2.5em;
	padding: 0;
	border: 0;
	font-size: clamp(20px, 1.8vw, 28px);
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: .04em;
	text-align: center;
	text-transform: uppercase;
}
/* Anführungszeichen des Themes zentriert über dem Zitat */
.res-post-content > .container > .wp-block-quote::before {
	position: static;
	display: block;
	width: auto;
	margin-bottom: 8px;
	font-size: 200%;
	line-height: 1;
}
.res-post-content > .container > .wp-block-quote p {
	margin: 0;
}
/* Bild links/rechts im Text: Text fliesst daneben */
.res-post-content > .container > div.wp-block-image {
	margin-top: 0;
	margin-bottom: 0;
}
.res-post-content > .container > .wp-block-image :where(.alignleft, .alignright) {
	max-width: 45%;
	margin-top: .4em;
	margin-bottom: 1.4em;
}
.res-post-content > .container > .wp-block-image .alignleft {
	margin-right: 2.4em;
}
.res-post-content > .container > .wp-block-image .alignright {
	margin-left: 2.4em;
}
.res-post-content > .container > .wp-block-image :where(.alignleft, .alignright) img {
	width: 100%;
	height: auto;
}
@media only screen and (max-width: 575.98px) {
	.res-post-content > .container > .wp-block-image :where(.alignleft, .alignright) {
		float: none;
		max-width: 100%;
		margin: 2em 0;
	}
}
.res-post-content .wp-block-image figcaption {
	color: #777;
	font-size: 12px;
	letter-spacing: .12em;
	text-align: center;
	text-transform: uppercase;
}

/* Blockstile (Editor: Stile in der Seitenleiste) */
p.is-style-res-intro,
.res-post-content > .container > p.is-style-res-intro {
	font-size: clamp(19px, 1.7vw, 26px);
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: .02em;
}
.wp-block-heading.is-style-res-label,
.res-post-content > .container > .wp-block-heading.is-style-res-label {
	margin-bottom: .8em;
	color: #777;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
}
.res-post-content > .container > .is-style-res-label + :where(h2, h3, h4) {
	margin-top: 0;
}
.res-post-content > .container > .wp-block-separator {
	width: 80px;
	max-width: 80px;
	margin: 3.5em auto;
	border: 0;
	border-top: 1px solid #000;
	border-bottom: 0;
	opacity: 1;
}
.res-post-content > .container > .wp-block-separator.is-style-wide {
	width: auto;
	max-width: 760px;
}
.res-post-content > .container > :where(.wp-block-embed, .wp-block-video) {
	margin-top: 3em;
	margin-bottom: 3em;
}
.res-post-content .wp-block-video video {
	width: 100%;
}

/* Weitere Beiträge unter dem Beitrag */
.res-post-related {
	padding-top: clamp(40px, 5vw, 80px);
	border-top: 1px solid #eee;
}


/*************************************************************************/
/*  Block "Category Posts" - Beitrags-Raster  */

.res-category-posts {
	padding: clamp(56px, 8vw, 130px) 0;
}
.res-category-posts .res-category-posts-title {
	margin: 0 0 clamp(32px, 4vw, 64px);
	font-size: clamp(20px, 2vw, 30px);
	letter-spacing: .12em;
	text-align: center;
	text-transform: uppercase;
}

.res-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(44px, 4.5vw, 80px) clamp(16px, 2.4vw, 44px);
}
.res-post-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.res-post-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media only screen and (max-width: 969.98px) {
	.res-post-grid,
	.res-post-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media only screen and (max-width: 575.98px) {
	.res-post-grid,
	.res-post-grid-2,
	.res-post-grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.res-post-card .res-post-card-link {
	display: block;
	color: #000;
	text-decoration: none;
	border: 0;
}
.res-post-card-img {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #f1f1f1;
}
.res-post-card-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1s ease;
}
.res-post-card-link:hover .res-post-card-img img {
	transform: scale(1.04);
}
.res-post-card-cat {
	display: block;
	margin-top: 20px;
	color: #777;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
}
.res-post-card .res-post-card-title {
	margin: 10px 0 0;
	color: #000;
	font-size: clamp(15px, 1.15vw, 19px);
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition: opacity .3s ease;
}
.res-post-card-link:hover .res-post-card-title {
	opacity: .65;
}

.res-category-posts-empty {
	margin: 0;
	padding: 30px 0;
	font-size: 14px;
	letter-spacing: .16em;
	text-align: center;
	text-transform: uppercase;
}

/* Seitennavigation */
.res-blog-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 26px;
	margin-top: clamp(56px, 6vw, 90px);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.res-blog-pagination .page-numbers {
	color: #000;
	padding-bottom: 4px;
	border-bottom: 1px solid transparent;
}
.res-blog-pagination .page-numbers.current,
.res-blog-pagination a.page-numbers:hover {
	border-color: #000;
}

/* Editor: Raster in der Block-Vorschau */
.acf-block-preview .res-category-posts {
	padding: 30px 0;
}


/*************************************************************************/
/*  Block "Featured Post"  */

.res-featured-post {
	padding: clamp(40px, 6vw, 100px) 0;
}
.res-featured-post .res-featured-post-link {
	display: block;
	color: #000;
	text-decoration: none;
	border: 0;
}
.res-featured-post-img {
	overflow: hidden;
	background: #f1f1f1;
}
.res-featured-post-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s ease;
}
.res-featured-post-link:hover .res-featured-post-img img {
	transform: scale(1.03);
}

/* Titel auf dem Bild */
.res-featured-post-overlay .res-featured-post-link {
	position: relative;
	overflow: hidden;
	background: #000;
}
.res-featured-post-overlay .res-featured-post-img {
	height: clamp(420px, 72vh, 840px);
}
.res-featured-post-overlay .res-featured-post-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 70%;
	background: linear-gradient(to top, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}
.res-featured-post-overlay .res-featured-post-text {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 1;
	max-width: 900px;
	padding: clamp(26px, 5vw, 72px);
	color: #fff;
}

/* Handy: Bild bleibt im Vordergrund, ohne Kurztext */
@media only screen and (max-width: 575.98px) {
	.res-featured-post-overlay .res-featured-post-excerpt {
		display: none;
	}
}

/* Bild und Text nebeneinander */
.res-featured-post-side .res-featured-post-link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(30px, 6vw, 110px);
	align-items: center;
}
.res-featured-post-side .res-featured-post-img {
	aspect-ratio: 4 / 5;
}
@media only screen and (max-width: 969.98px) {
	.res-featured-post-side .res-featured-post-link {
		grid-template-columns: minmax(0, 1fr);
	}
}

.res-featured-post-cat {
	display: block;
	color: #777;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
}
.res-featured-post-overlay .res-featured-post-cat {
	color: rgba(255, 255, 255, .85);
}
.res-featured-post .res-featured-post-title {
	margin: 14px 0 0;
	color: inherit;
	font-size: clamp(26px, 3.4vw, 54px);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: .03em;
	text-transform: uppercase;
}
.res-featured-post-excerpt {
	max-width: 560px;
	margin: 20px 0 0;
	font-size: clamp(14px, 1vw, 16px);
	font-weight: 400;
	line-height: 1.7;
}
.res-featured-post-more {
	display: inline-block;
	margin-top: 26px;
	padding-bottom: 4px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	border-bottom: 1px solid currentColor;
	transition: opacity .3s ease;
}
.res-featured-post-link:hover .res-featured-post-more {
	opacity: .65;
}


/*************************************************************************/
/*  Bild-Links in Blöcken (Text & Bild, Header Image)  */

a.res-image-link {
	display: block;
	border: 0;
}
a.res-image-link img {
	transition: opacity .3s ease;
}
a.res-image-link:hover img {
	opacity: .88;
}
.res-image-link-cover {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
}
/* Header Image: ganzes Bild klickbar, Text und Buttons behalten ihre Links */
.res-header-image:has(.res-image-link-cover) .res-header-image-vertical-center {
	pointer-events: none;
}
.res-header-image:has(.res-image-link-cover) .res-header-image-vertical-center :where(a, button) {
	pointer-events: auto;
}
