/*
Theme Name: regular
Theme URI: https://devvibe.io
Author: Matthias Ruf
Author URI: https://devvibe.io
Description: Minimales Theme von devvibe.io
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regular
*/

/* Eighties Comeback (Variable Font) */
@font-face {
	font-family: 'eightiescomeback';
	src: url('fonts/Eighties_Comeback_Files/Fonts/VARIABLE TTFS/EightiesComeback_VAR-VF.ttf') format('truetype');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* Bootzy TM (Kategorie-Boxen) */
@font-face {
	font-family: 'Bootzy TM';
	src: url('fonts/Bootzy TM/BootzyTM.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

body { font-family: system-ui, sans-serif; line-height: 1.6; margin: 0; }

/* ===== Archiv-Intro (Logo links, Text rechts) ===== */
.archive-intro {
	display: flex;
	align-items: center;
	gap: 2.25rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 2.5rem;
}

.archive-intro-logo {
	flex-shrink: 0;
}

.archive-intro-logo img {
	display: block;
	height: 80px;
	width: auto;
}

.archive-intro-title {
	margin: 0;
	font-family: 'eightiescomeback', sans-serif;
	font-size: 1.65rem;
	line-height: 1.4;
	font-weight: 400;
	color: #333;
}

/* Mobile: Logo und Text untereinander */
@media (max-width: 500px) {
	.archive-intro {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.5rem;
		padding: 2rem 1rem 2rem;
	}
	.archive-intro-title {
		font-size: 1.35rem;
	}
}

/* ===== Kategorie-Boxen (max 6 pro Reihe, 2 Reihen, 12 total; ohne ID 1) ===== */
.archive-categories {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem 2.5rem;
}

.archive-categories-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0.75rem;
}

.cat-box {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.5rem 1rem;
	text-align: center;
	text-decoration: none;
	color: #fff;
	font-family: 'Bootzy TM', sans-serif;
	font-weight: normal;
	font-size: 1.35rem;
	transition: opacity 0.2s;
}

.cat-box:hover { opacity: 0.9; }

.cat-box--black { background: #161616; color: #fff; }
.cat-box--blue  { background: #aecacd; color: #161616; }
.cat-box--orange { background: #eb6138; color: #fff; }

.cat-box-name { line-height: 1.2; }

@media (max-width: 900px) {
	.archive-categories-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile: Kategorien horizontal scrollbar, immer 2 sichtbar */
@media (max-width: 500px) {
	.archive-categories {
		padding-left: 1rem;
		padding-right: 1rem;
		overflow: hidden;
	}
	.archive-categories-grid {
		display: flex;
		flex-wrap: nowrap;
		gap: 0.75rem;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 0.25rem;
	}
	.archive-categories-grid::-webkit-scrollbar {
		display: none;
	}
	.archive-categories-grid .cat-box {
		flex: 0 0 calc(50% - 0.375rem);
		min-width: calc(50% - 0.375rem);
		scroll-snap-align: start;
		box-sizing: border-box;
	}
}

/* ===== Beiträge: Masonry mit Mittelbereich (2. Reihe hochkant) ===== */
.posts-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem 2.5rem;
}

/* Masonry mit CSS Columns: Items fließen von oben nach unten in 3 Spalten */
.posts-masonry {
	column-count: 3;
	column-gap: 1.5rem;
	position: relative;
}

/* Mittelbereich: neuester Beitrag, Hochformat, ragt in 2. Reihe */
.post-card--center {
	break-inside: avoid;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #161616;
	page-break-inside: avoid;
	/* Höher als normale Karten, damit es in die 2. Reihe ragt */
	min-height: 400px;
}

.post-card-center-inner {
	display: flex;
	flex-direction: column;
	min-height: 400px;
}

.post-card-center-media {
	flex: 1;
	min-height: 300px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #161616;
}

.post-card-center-media img,
.post-card-center-media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.post-card-center-media video {
	display: block;
}

.post-card--center .post-card-title {
	margin: 0.5rem 0 0;
	padding-bottom: 0.5rem;
}

.post-card-center-btn {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.5rem 1rem;
	background: #161616;
	color: #fff;
	text-decoration: none;
	font-size: 1rem;
	align-self: flex-start;
	transition: opacity 0.2s;
}

.post-card-center-btn:hover {
	opacity: 0.9;
	color: #fff;
}

/* Masonry-Fallback (falls nur eine Spalte genutzt wird) */
.posts-masonry {
	column-count: 3;
	column-gap: 1.5rem;
}

.post-card {
	break-inside: avoid;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid #161616;
	page-break-inside: avoid;
}

.post-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.post-card-thumb {
	display: block;
	margin-bottom: 0.5rem;
	overflow: hidden;
}

.post-card-thumb img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: top;
}

.post-card-title {
	position: relative;
	margin: 0;
	padding: 0.15em 0;
	font-family: 'eightiescomeback', sans-serif;
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1.3;
	z-index: 0;
}

/* Gelb von rechts bis zur Mitte hinter dem Titel */
.post-card-title::after {
	content: '';
	position: absolute;
	right: 0;
	left: 50%;
	top: 0;
	bottom: 0;
	background: #ffff00;
	z-index: -1;
}

.no-posts {
	max-width: 1200px;
	margin: 0 auto 2rem;
	padding: 0 1.5rem;
}

@media (max-width: 768px) {
	.posts-masonry {
		column-count: 2;
	}

	.post-card--center {
		min-height: 320px;
	}

	.post-card-center-inner {
		min-height: 320px;
	}

	.post-card-center-media {
		min-height: 240px;
	}
}

@media (max-width: 500px) {
	.posts-masonry {
		column-count: 1;
	}
}

/* ===== Header ===== */
.site-header {
	position: relative;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	z-index: 100;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
	min-height: 60px;
}

.site-header .logo {
	display: block;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.site-header .logo img {
	display: block;
	height: 40px;
	width: auto;
}

.hamburger {
	position: absolute;
	right: 1.5rem;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	z-index: 102;
	transition: opacity 0.2s;
}

.hamburger:hover { opacity: 0.8; }

.hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background: #1a1a1a;
	border-radius: 1px;
	transition: transform 0.3s, opacity 0.3s;
}

.site-header.is-open .hamburger-line:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.site-header.is-open .hamburger-line:nth-child(2) {
	opacity: 0;
}

.site-header.is-open .hamburger-line:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* Overlay Menü (Kategorien) */
.nav-overlay {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	max-width: 320px;
	height: 100vh;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
	z-index: 101;
	padding: 5rem 1.5rem 2rem;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	visibility: hidden;
}

.nav-overlay.is-open {
	transform: translateX(0);
	visibility: visible;
}

.nav-overlay[aria-hidden="false"] { visibility: visible; }

.nav-overlay-inner { padding-top: 1rem; }

.nav-overlay-title {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
}

.nav-categories {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-categories li { margin: 0; }

.nav-categories a {
	display: block;
	padding: 0.6rem 0;
	font-size: 1.1rem;
	color: #1a1a1a;
	text-decoration: none;
	border-bottom: 1px solid #eee;
	transition: color 0.2s;
}

.nav-categories a:hover { color: #666; }

.nav-overlay-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.3);
	z-index: 99;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.nav-overlay-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* ===== Slider (CPT regular_slider) ===== */
.regular-slider-section {
	position: relative;
	max-width: 1200px;
	margin: 0 auto 2rem;
	padding: 0 1.5rem;
}

.regular-slider {
	overflow: hidden;
	border-radius: 0;
}

.regular-slider-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.regular-slider-track::-webkit-scrollbar {
	display: none;
}

.regular-slider-slide {
	flex: 0 0 100%;
	width: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.regular-slider-slide-link {
	display: block;
	width: 100%;
	height: 100%;
}

.regular-slider-slide img,
.regular-slider-slide video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 50vh;
	object-fit: cover;
	object-position: center;
	vertical-align: top;
}

.regular-slider-slide video {
	width: 100%;
	height: auto;
	max-height: 50vh;
}

.regular-slider-prev,
.regular-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background 0.2s;
}

.regular-slider-prev:hover,
.regular-slider-next:hover {
	background: rgba(0, 0, 0, 0.75);
}

.regular-slider-prev {
	left: 1.5rem;
}

.regular-slider-next {
	right: 1.5rem;
}

/* Load More (nach Slider + 6 Beiträge) */
.posts-section--more {
	margin-top: 0;
}

.load-more-wrap {
	text-align: center;
	margin-top: 2rem;
	padding: 0 1.5rem;
}

.load-more-btn {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background: #161616;
	color: #fff;
	border: none;
	font-size: 1rem;
	font-family: inherit;
	cursor: pointer;
	transition: opacity 0.2s;
}

.load-more-btn:hover:not(:disabled) {
	opacity: 0.9;
}

.load-more-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* ===== Footer ===== */
.site-footer {
	margin-top: 2rem;
}

.site-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

.site-footer-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.site-footer-logo {
	display: block;
	line-height: 0;
}

.site-footer-logo img {
	display: block;
	width: 96px;
	height: 96px;
	filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(350deg) brightness(95%) contrast(91%);
}

.footer-nav {
	margin: 0;
}

.footer-social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.footer-social-link {
	display: block;
	color: #eb6138;
	line-height: 0;
}

.footer-social-link:hover {
	color: #d9542d;
}

.footer-social-icon {
	width: 28px;
	height: 28px;
	display: block;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0;
}

.footer-menu li {
	margin: 0;
	display: flex;
	align-items: center;
}

.footer-menu li:not(:last-child)::after {
	content: "|";
	margin: 0 0.75rem;
	color: #eb6138;
	font-weight: 400;
}

.footer-menu a {
	color: #eb6138;
	text-decoration: none;
	font-size: 1rem;
}

.footer-menu a:hover {
	text-decoration: underline;
}

/* ===== Single-Post-Layout: Überschrift → Beitragsbild → Gutenberg-Inhalt ===== */
.single-post-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.single-post-article {
	margin: 0;
}

.single-post-header {
	margin-bottom: 1.5rem;
}

.single-post-title {
	margin: 0;
	font-family: 'eightiescomeback', sans-serif;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.3;
	font-weight: 400;
	color: #161616;
}

.single-post-thumbnail {
	margin: 0 0 2rem;
}

.single-post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

.single-post-content.entry-content {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: #333;
}

.single-post-content.entry-content > * + * {
	margin-top: 1.25em;
}

.single-post-content.entry-content p {
	margin: 0;
}

.single-post-content.entry-content img {
	max-width: 100%;
	height: auto;
}

.single-post-content.entry-content h2,
.single-post-content.entry-content h3 {
	margin: 1.5em 0 0.5em;
	font-family: 'eightiescomeback', sans-serif;
	font-weight: 400;
}

.single-post-content.entry-content ul,
.single-post-content.entry-content ol {
	padding-left: 1.5em;
}

/* ===== Newsletter CTA (unten im Archiv + bei jedem Beitrag) ===== */
.newsletter-cta {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 1.5rem 4rem;
	text-align: center;
}

.newsletter-cta-teaser {
	margin: 0 0 1.5rem;
	font-family: 'eightiescomeback', sans-serif;
	font-size: clamp(2rem, 4.5vw, 2.75rem);
	line-height: 1.35;
	font-weight: 700;
	color: #333;
}

.newsletter-cta-form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	max-width: 420px;
	margin: 0 auto;
}

.newsletter-cta-input {
	flex: 1;
	min-width: 200px;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	line-height: 1.4;
	border: 1px solid #ccc;
	border-radius: 0;
	background: #fff;
}

.newsletter-cta-input:focus {
	outline: none;
	border-color: #eb6138;
}

.newsletter-cta-btn {
	padding: 0.75rem 1.5rem;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: #fff;
	background: #eb6138;
	border: none;
	border-radius: 0;
	cursor: pointer;
}

.newsletter-cta-btn:hover {
	background: #d9542d;
}

@media (max-width: 500px) {
	.newsletter-cta {
		padding: 2.5rem 1rem 3rem;
	}
	.newsletter-cta-teaser {
		font-size: 1.75rem;
	}
	.newsletter-cta-form {
		flex-direction: column;
		min-width: 0;
	}
	.newsletter-cta-input {
		min-width: 0;
	}
}
