/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Template: blocksy
Author: Rainer Brosi
Description: Child-Theme für rainerbrosi.de – eigenes Karten- und Hero-Design im Stil von system-ecke.de.
Version: 1.0.0
Text Domain: blocksy-child
*/

/* =========================================================
   Alle Farben laufen über die Blocksy-Palette
   (--theme-palette-color-*), damit Farbwechsel im
   Customizer weiterhin greifen.
   ========================================================= */

/* ---------- Hero (Startseite) ---------- */
.rb-hero {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 3rem;
	align-items: center;
	padding: 1rem 0 2.5rem;
}

.rb-hero h1,
.rb-hero h2 {
	margin: 0 0 0.75rem;
	line-height: 1.1;
}

.rb-hero .rb-hero-kicker {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--theme-palette-color-1);
}

.rb-hero .rb-hero-intro {
	font-size: 1.05rem;
	line-height: 1.7;
	margin: 0 0 1.5rem;
}

.rb-hero .rb-hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

.rb-hero .rb-hero-buttons a {
	display: inline-block;
}

.rb-hero figure,
.rb-hero .wp-block-image {
	margin: 0;
	justify-self: center;
	width: 100%;
	max-width: 420px;
}

.rb-hero .wp-block-image img {
	border-radius: 12px;
}

@media (max-width: 899px) {
	.rb-hero {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding-bottom: 1.5rem;
	}
	.rb-hero figure,
	.rb-hero .wp-block-image {
		max-width: 300px;
		order: -1;
	}
}

/* ---------- Kategorie-Karten ---------- */
.rb-karten {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 1.25rem;
	margin: 1.5rem 0 3.5rem;
	align-items: stretch;
}

@media (max-width: 1319px) {
	.rb-karten {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

@media (max-width: 899px) {
	.rb-karten {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.rb-karten {
		grid-template-columns: minmax(0, 1fr);
	}
}

.rb-karte {
	display: flex;
	flex-direction: column;
	height: 100%;
	gap: 0.6rem;
	background: var(--theme-palette-color-4);
	color: #ffffff;
	border-radius: 10px;
	padding: 1.75rem 1.5rem;
	box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rb-karte:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(17, 24, 39, 0.2);
}

.rb-karte .rb-icon {
	line-height: 0;
	margin-bottom: 0.35rem;
}

.rb-karte .rb-icon svg {
	width: 52px;
	height: 52px;
	fill: var(--theme-palette-color-1);
}

.rb-karte h3,
.rb-karte h2 {
	color: #ffffff;
	font-size: clamp(1.2rem, 1.6vw, 1.4rem);
	line-height: 1.2;
	margin: 0;
}

.rb-karte p {
	margin: 0;
	color: #c3cdd7;
	font-size: 0.97rem;
}

.rb-karte .rb-link {
	margin-top: auto;
	padding-top: 0.6rem;
}

.rb-karte .rb-link a {
	display: block;
	text-align: center;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 6px;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.93rem;
	line-height: 1.35;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.rb-karte .rb-link a:hover {
	background: var(--theme-palette-color-1);
	border-color: var(--theme-palette-color-1);
	color: #ffffff;
}

.rb-karte .rb-subcats {
	margin: 0;
	font-size: 0.84rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 600;
	color: #c3cdd7;
}

.rb-karte .rb-subcats a {
	color: var(--theme-palette-color-1);
	text-decoration: none;
}

.rb-karte .rb-subcats a:hover {
	text-decoration: underline;
}


/* ---------- Archiv-Grid (Blog, Kategorien, Suche) ----------
   Blocksy gibt für das Blog-Archiv kein --grid-template-columns aus,
   deshalb hier fest gesetzt (3 / 2 / 1 Spalten). */
[data-prefix="blog"] .entries[data-layout="grid"],
[data-prefix="categories"] .entries[data-layout="grid"],
[data-prefix="author"] .entries[data-layout="grid"],
[data-prefix="search"] .entries[data-layout="grid"] {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
}

@media (max-width: 999px) {
	[data-prefix="blog"] .entries[data-layout="grid"],
	[data-prefix="categories"] .entries[data-layout="grid"],
	[data-prefix="author"] .entries[data-layout="grid"],
	[data-prefix="search"] .entries[data-layout="grid"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	[data-prefix="blog"] .entries[data-layout="grid"],
	[data-prefix="categories"] .entries[data-layout="grid"],
	[data-prefix="author"] .entries[data-layout="grid"],
	[data-prefix="search"] .entries[data-layout="grid"] {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Beiträge-Grid (Query Loop) ---------- */
.rb-posts .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
	margin: 0;
	padding: 0;
}

.rb-posts .wp-block-post-template > li {
	width: auto;
	margin: 0;
}

@media (max-width: 999px) {
	.rb-posts .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.rb-posts .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
	}
}

.rb-posts .wp-block-post {
	background: var(--theme-palette-color-7);
	border: 1px solid var(--theme-border-color);
	border-radius: 10px;
	padding: 1.25rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rb-posts .wp-block-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
}

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

.rb-posts .wp-block-post-terms {
	margin: 0.9rem 0 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.rb-posts .wp-block-post-terms a {
	text-decoration: none;
}

.rb-posts .wp-block-post-title {
	font-size: 1.2rem;
	line-height: 1.3;
	margin: 0.25rem 0 0.5rem;
}

.rb-posts .wp-block-post-title a {
	text-decoration: none;
	color: var(--theme-palette-color-3);
}

.rb-posts .wp-block-post-excerpt {
	font-size: 0.93rem;
	line-height: 1.6;
}

.rb-posts .wp-block-post-date {
	margin-top: 0.8rem;
	font-size: 0.8rem;
	color: var(--theme-palette-color-2);
}

/* ---------- QR-/Visitenkarten-Box ---------- */
.rb-qr {
	display: flex;
	flex-wrap: wrap;
	gap: 1.75rem;
	align-items: center;
	margin: 3rem 0 3.5rem;
	padding: 1.75rem 2rem;
	background: var(--theme-palette-color-6);
	border-radius: 10px;
}

.rb-qr figure,
.rb-qr .wp-block-image {
	margin: 0;
	flex: 0 0 auto;
}

.rb-qr .wp-block-image img {
	width: 220px;
	height: auto;
	border-radius: 6px;
	background: #ffffff;
}

.rb-qr h3 {
	margin: 0 0 0.4rem;
}

.rb-qr p {
	margin: 0;
	max-width: 32ch;
}

@media (max-width: 599px) {
	.rb-qr {
		padding: 1.25rem;
	}
	.rb-qr .wp-block-image img {
		width: 100%;
		max-width: 260px;
	}
}


/* ---------- Artikel-Liste in den Kategorie-Karten ---------- */
.rb-karte .rb-karte-posts {
	margin: 0.35rem 0 0;
}

.rb-karte .rb-karte-posts .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rb-karte .rb-karte-posts .wp-block-post {
	margin: 0;
	padding: 0.5rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.rb-karte .rb-karte-posts .wp-block-post:first-child {
	border-top: 0;
	padding-top: 0;
}

.rb-karte .rb-karte-posts .wp-block-post-title {
	margin: 0;
	font-size: 0.94rem;
	line-height: 1.35;
	font-weight: 500;
	color: #c3cdd7;
}

.rb-karte .rb-karte-posts .wp-block-post-title a {
	color: #c3cdd7;
	text-decoration: none;
}

.rb-karte .rb-karte-posts .wp-block-post-title a:hover {
	color: var(--theme-palette-color-1);
	text-decoration: underline;
}

/* ---------- Sidebar (Blog-Archiv) ---------- */
[data-prefix="blog"] .ct-sidebar .ct-widget {
	background: var(--theme-palette-color-7);
	border: 1px solid var(--theme-border-color);
	border-radius: 10px;
	padding: 1.5rem;
}

[data-prefix="blog"] .ct-sidebar .ct-widget .widget-title,
[data-prefix="blog"] .ct-sidebar .wp-block-heading {
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--theme-palette-color-2);
	margin-top: 0;
}

[data-prefix="blog"] .ct-sidebar .wp-block-categories-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

[data-prefix="blog"] .ct-sidebar .wp-block-categories-list > li {
	padding: 0.45rem 0;
	border-top: 1px solid var(--theme-border-color);
}

[data-prefix="blog"] .ct-sidebar .wp-block-categories-list > li:first-child {
	border-top: 0;
}

[data-prefix="blog"] .ct-sidebar .wp-block-categories-list .children {
	list-style: none;
	margin: 0.35rem 0 0;
	padding-left: 1rem;
	font-size: 0.92em;
}

[data-prefix="blog"] .ct-sidebar .wp-block-categories-list .children li {
	padding: 0.2rem 0;
	border: 0;
}

/* ---------- Kleinkram ---------- */
.rb-section-title {
	margin-top: 1rem;
}
