/*
Theme Name: Syja Journal
Theme URI: https://syja.de/
Author: Albe
Author URI: https://syja.de/
Description: A custom block theme for Syja with a modern magazine layout.
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.1
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: syja-journal
Tags: blog, news, block-patterns, full-site-editing, editor-style
*/

@font-face {
	font-family: "Archivo";
	src: url("./assets/fonts/Archivo-VariableFont.ttf") format("truetype");
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
}

@font-face {
	font-family: "Archivo";
	src: url("./assets/fonts/Archivo-Italic-VariableFont.ttf") format("truetype");
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("./assets/fonts/SourceSans3-VariableFont.ttf") format("truetype");
	font-style: normal;
	font-weight: 200 900;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("./assets/fonts/SourceSans3-Italic-VariableFont.ttf") format("truetype");
	font-style: italic;
	font-weight: 200 900;
	font-display: swap;
}

:root {
	--syja-shadow-soft: 0 24px 64px rgba(15, 23, 42, 0.08);
	--syja-shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
	--syja-radius-lg: 0;
	--syja-radius-md: 0;
	--syja-radius-sm: 0;
}

body {
	background:
		radial-gradient(circle at top left, rgba(228, 217, 190, 0.26), transparent 24rem),
		linear-gradient(180deg, #f7f4ed 0%, #ffffff 28%, #ffffff 100%);
}

.wp-site-blocks {
	min-height: 100vh;
}

.syja-site-header {
	position: relative;
	padding-top: 0;
	padding-bottom: 0;
}

.syja-site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(135deg, #057800, #06a000);
	box-shadow: var(--syja-shadow-soft);
}

.syja-site-header > * {
	position: relative;
	z-index: 1;
}

.syja-site-header .wp-block-columns {
	align-items: center;
	justify-content: space-between;
}

.syja-site-header .wp-block-column:first-child {
	position: relative;
	z-index: 2;
}

.syja-site-header .wp-block-column:last-child {
	position: relative;
	z-index: 3;
	pointer-events: none;
}

.syja-brand-logo {
	margin: 0;
	flex-shrink: 0;
	display: inline-block;
	text-decoration: none;
}

.syja-brand-logo img {
	display: block;
	height: auto;
	width: 220px;
	max-width: 100%;
}

.syja-main-nav {
	font-size: 0.93rem;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	width: 100%;
	pointer-events: none;
}

.syja-main-nav .wp-block-navigation__responsive-container-open,
.syja-main-nav .wp-block-navigation__responsive-container,
.syja-main-nav .wp-block-navigation__responsive-dialog {
	pointer-events: auto;
}

.syja-site-header .wp-block-site-title {
	margin: 0;
	font-family: "Archivo", sans-serif;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
}

.syja-main-nav .wp-block-navigation-item {
	white-space: nowrap;
}

.syja-main-nav .wp-block-navigation-item__content {
	line-height: 1.2;
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
}

.syja-main-nav .wp-block-navigation-item__content:hover,
.syja-main-nav .wp-block-navigation-item__content:focus {
	color: #dff5d8;
}

.syja-main-nav .wp-block-navigation__responsive-container-open,
.syja-main-nav .wp-block-navigation__responsive-container-close {
	margin: 0;
	padding: 0;
	color: #fff;
}

.syja-main-nav .wp-block-navigation__responsive-container-open {
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 28px;
	margin-right: 0.4rem;
}

.syja-main-nav .wp-block-navigation__responsive-container-open svg,
.syja-main-nav .wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

.syja-main-nav .wp-block-navigation__responsive-container-open svg {
	display: none;
}

.syja-main-nav .wp-block-navigation__responsive-container-open::before {
	content: "\2630";
	display: inline-block;
	color: #fff;
	font-size: 30px;
	line-height: 1;
}

.syja-main-nav .wp-block-navigation__responsive-container {
	background: linear-gradient(160deg, rgba(8, 25, 45, 0.98), rgba(6, 160, 0, 0.96));
	color: #fff;
}

.syja-main-nav .wp-block-navigation__responsive-container.is-menu-open {
	inset: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
}

.syja-main-nav .wp-block-navigation__responsive-container-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin-left: auto;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
}

.syja-main-nav .wp-block-navigation__responsive-container-close svg {
	display: block;
}

.syja-main-nav .wp-block-navigation__responsive-container-content {
	min-height: calc(100vh - 4rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 2rem;
	padding: clamp(1rem, 4vw, 2.5rem) 0;
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	width: min(100%, 32rem);
	padding: 0;
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item,
.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-pages-list__item {
	width: 100%;
	margin: 0;
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content,
.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-pages-list__item__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.95rem 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-family: "Archivo", sans-serif;
	font-size: clamp(1.05rem, 1.5vw, 1.35rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: none;
	text-decoration: none;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:hover,
.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content:focus,
.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-pages-list__item__link:hover,
.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-pages-list__item__link:focus {
	color: #fff;
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(223, 245, 216, 0.5);
	transform: translateY(-1px);
}

.syja-main-nav .wp-block-navigation__responsive-container-content .current-menu-item > .wp-block-navigation-item__content,
.syja-main-nav .wp-block-navigation__responsive-container-content .current-menu-item > .wp-block-pages-list__item__link,
.syja-main-nav .wp-block-navigation__responsive-container-content .current-menu-ancestor > .wp-block-navigation-item__content {
	background: rgba(223, 245, 216, 0.16);
	border-color: rgba(223, 245, 216, 0.55);
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	position: static;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	width: 100%;
	margin-top: 0.55rem;
	padding: 0.2rem 0 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 0.98rem;
	background: rgba(8, 25, 45, 0.22);
}

.syja-home-shell {
	gap: 1.5rem;
}

.syja-home-header {
	margin-bottom: 1rem;
}

.syja-classic-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: start;
}

.syja-classic-grid .wp-block-post-template > li,
.syja-home-card {
	margin: 0;
}

.syja-card .wp-block-post-featured-image {
	margin: 0;
}

.syja-card,
.syja-sidebar-card,
.syja-footer-card,
.syja-archive-card .wp-block-post {
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: none;
	overflow: visible;
}

.syja-card .wp-block-post-featured-image img,
.syja-archive-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 0;
	transition: none;
}

.syja-card .wp-block-post-featured-image figcaption,
.syja-card .wp-block-post-featured-image .wp-element-caption,
.syja-card .wp-block-post-featured-image .ccfic,
.syja-archive-card .wp-block-post-featured-image figcaption,
.syja-archive-card .wp-block-post-featured-image .wp-element-caption,
.syja-archive-card .wp-block-post-featured-image .ccfic {
	display: none;
}

.syja-card-classic .wp-block-post-title {
	font-size: 1.3rem;
	line-height: 1.2;
}

.syja-card-classic .wp-block-post-excerpt {
	font-size: 0.96rem;
	color: #475569;
}

.syja-card-classic .wp-block-post-title a:hover,
.syja-card-classic .wp-block-post-title a:focus,
.syja-sidebar-card a:hover,
.syja-sidebar-card a:focus {
	color: #06a000;
}

.syja-section-label {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.syja-section-label::before {
	content: "";
	width: 1.2rem;
	height: 2px;
	background: currentColor;
}

.syja-sidebar-card .wp-block-heading,
.syja-footer-card .wp-block-heading {
	margin-top: 0;
}

.syja-sidebar-card {
	padding: 1.25rem;
}

.syja-sidebar-card .wp-block-latest-posts,
.syja-sidebar-card .wp-block-categories-list,
.syja-briefing-panel .wp-block-categories-list,
.syja-briefing-panel .wp-block-latest-posts {
	margin: 0;
	padding-left: 1.1rem;
}

.syja-sidebar-card .wp-block-latest-posts li,
.syja-sidebar-card .wp-block-categories-list li {
	margin-bottom: 0.8rem;
}

.syja-footer {
	position: relative;
	margin-top: 4rem;
	padding-top: 0;
	padding-bottom: 0;
	color: #fff;
}

.syja-footer::before {
	content: none;
}

.syja-footer > * {
	position: relative;
	z-index: 1;
}

.syja-footer a {
	color: inherit;
}

.syja-footer-card {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
	color: #fff;
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.syja-footer-card .wp-block-site-title,
.syja-footer-card .wp-block-heading,
.syja-footer-card .wp-block-latest-posts a,
.syja-footer-card .wp-block-page-list a,
.syja-footer-card .wp-block-categories-list a {
	color: #fff;
}

.syja-footer-card .wp-block-latest-posts,
.syja-footer-card .wp-block-page-list,
.syja-footer-card .wp-block-categories-list {
	margin: 0;
	padding-left: 1.1rem;
}

.syja-footer-card .wp-block-latest-posts li,
.syja-footer-card .wp-block-page-list li,
.syja-footer-card .wp-block-categories-list li {
	margin-bottom: 0.7rem;
}

.syja-footer-card .wp-block-latest-posts__post-date {
	color: rgba(255, 255, 255, 0.82);
}

.syja-footer-legal {
	margin: 0;
	padding-left: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.syja-footer-legal li {
	margin: 0;
}

.syja-footer-legal a {
	color: #4ade80;
	font-size: 0.84rem;
}

.syja-footer .wp-block-columns.alignwide {
	background: #06a000;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.syja-footer-bottom {
	background: #08192d;
	margin-top: 0;
	padding: 0.9rem 1.5rem;
}

.syja-post-shell,
.syja-page-shell,
.syja-archive-shell {
	margin-top: 0;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.syja-post-shell .wp-block-post-featured-image img {
	border-radius: var(--syja-radius-lg);
	box-shadow: none;
}

.syja-post-shell figcaption,
.syja-post-shell .wp-element-caption {
	margin-top: 0.55rem;
	margin-bottom: 1.25rem;
	font-size: 0.92rem;
	color: #475569;
}

.syja-post-shell figcaption::before,
.syja-post-shell .wp-element-caption::before {
	content: "Bild: ";
	font-weight: 600;
}

.syja-post-shell .wp-block-post-title {
	font-size: clamp(2.1rem, 4vw, 3.1rem);
	line-height: 1.15;
}

.syja-post-shell .wp-block-post-content {
	max-width: 100%;
}

.syja-post-shell .wp-block-post-content .wp-block-table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

.syja-post-shell .wp-block-post-content .wp-block-table table,
.syja-post-shell .wp-block-post-content > table {
	width: max-content;
	min-width: 100%;
	max-width: none;
}

.syja-related-posts {
	margin-top: 2.75rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.syja-related-posts__header {
	margin-bottom: 1.25rem;
}

.syja-related-posts__header h2 {
	margin: 0.35rem 0 0;
	font-size: clamp(1.7rem, 3vw, 2.2rem);
	line-height: 1.08;
}

.syja-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

.syja-related-posts__card {
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.96);
	overflow: hidden;
}

.syja-related-posts__image-link,
.syja-related-posts__image-link img {
	display: block;
	width: 100%;
}

.syja-related-posts__image-link {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #dbe2ea;
}

.syja-related-posts__image-link img {
	height: 100%;
	object-fit: cover;
}

.syja-related-posts__card .ccfic,
.syja-related-posts__card figcaption,
.syja-related-posts__card .wp-element-caption {
	display: none;
}

.syja-related-posts__content {
	padding: 1rem;
}

.syja-related-posts__terms {
	margin-bottom: 0.7rem;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.syja-related-posts__terms a {
	color: #06a000;
	text-decoration: none;
}

.syja-related-posts__title {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.14;
}

.syja-related-posts__title a {
	color: #0f172a;
	text-decoration: none;
}

.syja-related-posts__title a:hover,
.syja-related-posts__title a:focus {
	color: #06a000;
}

.syja-related-posts__cta {
	display: inline-flex;
	align-items: center;
	margin-top: 1rem;
	color: #06a000;
	font-weight: 700;
	text-decoration: none;
}

.syja-related-posts__cta:hover,
.syja-related-posts__cta:focus {
	color: #057800;
}

.syja-ad-slot {
	margin: 2rem 0;
}

.syja-ad-slot__label {
	margin: 0 0 0.45rem;
	color: #64748b;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.syja-ad-slot__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--syja-ad-min-height, 280px);
	padding: 0.75rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98));
}

.syja-ad-slot__inner .adsbygoogle {
	width: 100%;
}

.syja-ad-slot--in-article {
	margin-top: 2.25rem;
	margin-bottom: 2.25rem;
}

.syja-ad-slot--below-article {
	margin-top: 2.5rem;
}

.syja-ad-slot--archive {
	margin-top: 1.5rem;
	margin-bottom: 1.75rem;
}

.syja-content-panel {
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: none;
}

.syja-archive-header {
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.98));
	box-shadow: none;
	padding: 1.6rem 1.6rem 1.2rem;
	margin-bottom: 1.5rem;
}

.syja-sidebar-stack {
	gap: 1rem;
}

.syja-sidebar-stack > * {
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: none;
	padding: 1.25rem;
}

.syja-search-form .wp-block-search__inside-wrapper {
	border: 1px solid rgba(6, 160, 0, 0.28);
	background: #fff;
	box-shadow: none;
}

.syja-search-form {
	margin: 0;
}

.syja-search-form .wp-block-search__button {
	background: #06a000;
	color: #fff;
}

.syja-search-form .wp-block-search__button:hover,
.syja-search-form .wp-block-search__button:focus {
	background: #057800;
}

.syja-archive-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: start;
}

.syja-archive-grid .wp-block-post-template > li,
.syja-archive-card {
	margin: 0;
}

.syja-archive-grid .wp-block-post,
.syja-archive-card .wp-block-post-featured-image {
	margin: 0;
	padding-bottom: 1.25rem;
}

.syja-archive-grid .wp-block-post-featured-image {
	margin-bottom: 1rem;
}

.syja-archive-grid .wp-block-post-date,
.syja-archive-grid .wp-block-post-terms {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.syja-pagination .wp-block-query-pagination {
	gap: 0.65rem;
	margin-top: 1rem;
}

.syja-pagination .wp-block-query-pagination > * {
	border: 1px solid rgba(6, 160, 0, 0.2);
	padding: 0.65rem 1rem;
	background: #fff;
}

.syja-pagination .wp-block-query-pagination a:hover,
.syja-pagination .wp-block-query-pagination a:focus {
	color: #06a000;
}

@media (max-width: 900px) {
	.syja-classic-grid .wp-block-post-template,
	.syja-archive-grid .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
	}

	.syja-topbar .wp-block-group.alignwide,
	.syja-topbar .wp-block-post-template {
		gap: 0.75rem;
	}

	.syja-footer-legal {
		gap: 0.65rem;
	}

	.syja-site-header .wp-block-columns {
		align-items: center !important;
		flex-wrap: nowrap !important;
		justify-content: space-between !important;
	}

	.syja-site-header {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	.syja-archive-shell {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.syja-site-header .wp-block-column:first-child {
		flex: 1 1 auto !important;
		min-width: 0;
	}

	.syja-site-header .wp-block-column:last-child {
		flex: 0 0 auto !important;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		min-width: 28px;
	}

	.syja-brand-logo img {
		width: 132px;
		max-width: 132px;
	}

	.syja-main-nav {
		width: auto;
	}

	.syja-main-nav .wp-block-navigation__responsive-container-open {
		position: static;
		margin-left: 0;
		margin-right: 0.6rem;
	}

	.syja-main-nav .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1rem;
	}

	.syja-main-nav .wp-block-navigation__responsive-container-content {
		min-height: calc(100vh - 3.5rem);
		padding-top: 0.75rem;
		padding-bottom: 1.5rem;
	}

	.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
		width: 100%;
	}

	.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content,
	.syja-main-nav .wp-block-navigation__responsive-container-content .wp-block-pages-list__item__link {
		font-size: 1rem;
		padding: 0.9rem 1rem;
	}

	.syja-content-panel {
		padding-left: 1.1rem !important;
		padding-right: 1.1rem !important;
	}

	.syja-post-shell .wp-block-post-title {
		font-size: 2.35rem;
	}

	.syja-related-posts__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.syja-ad-slot__inner {
		min-height: 250px;
		padding: 0.6rem;
	}
}
