/*
Theme Name: Moto Warsztat
Theme URI: https://autoanalizy.pl
Author: Auto Analizy
Description: Techniczny szablon motoryzacyjny dla WordPressa — asfaltowa czerń, sygnałowa czerwień i krój wyścigowy. Duże zdjęcie bohatera, siatka kategorii i lista popularnych wpisów. Motyw blokowy (FSE) zbudowany dla Auto Analizy.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.15.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: moto-warsztat
*/

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Racing+Sans+One&display=swap');

/* --- Consistent palette: semantic aliases over the theme.json color presets --- */
:root {
	--color-bg-dark: var(--wp--preset--color--asphalt-dark);
	--color-bg-dark-rgb: 18, 20, 23;
	--color-panel-bg: var(--wp--preset--color--asphalt);
	--color-header-bg: var(--wp--preset--color--asphalt-dark);
	--color-accent: var(--wp--preset--color--red);
	--color-accent-rgb: 224, 38, 28;
	--color-text-light: var(--wp--preset--color--white);
	--color-text-light-rgb: 255, 255, 255;
	--color-text-muted: var(--wp--preset--color--mid-gray);
	--color-border-on-dark: rgba(255, 255, 255, 0.08);
	--color-light-gray-rgb: 184, 187, 190;
	--tile-gradient: linear-gradient(
		180deg,
		rgba(var(--color-bg-dark-rgb), 0) 0%,
		rgba(var(--color-bg-dark-rgb), 0.55) 55%,
		rgba(var(--color-bg-dark-rgb), 0.92) 100%
	);
}

/* --- Site-wide background --- */
html body {
	background-color: var(--color-bg-dark);
}

/* --- Homepage main: solid dark panel so text never sits directly on the
   body's road-photo background (which stays visible around/behind it) --- */
.home-main {
	background: var(--color-bg-dark);
}

.home-main > .wp-block-query:first-child,
.home-main .wp-block-query > ul.wp-block-post-template,
.home-main .hero-banner {
	margin: 0;
}

.home-main h2:not(.section-heading) {
	color: var(--color-text-light);
}

.home-main .section-heading {
	color: var(--color-text-light);
	border-bottom-color: var(--color-accent);
}

/* --- Single post featured image --- */
.single-featured-image {
	text-align: center;
}

.single-featured-image img {
	max-width: 100%;
	width: auto;
	height: auto;
	max-height: 480px;
	border-radius: 8px;
	display: inline-block;
}

/* --- Category label above the title, styled like the homepage tiles --- */
.post-category-label {
	display: block;
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.post-category-label a {
	color: var(--color-accent);
	text-decoration: none;
}

.post-category-label a:hover {
	text-decoration: underline;
}

/* --- Title on its own line, meta bar (date, author, share) always below --- */
.post-title-row {
	text-align: center;
}

.post-meta-bar {
	column-gap: 1.25rem;
	row-gap: 0.6rem;
	align-items: center;
	margin-top: 0.6rem;
}

.post-title-meta {
	column-gap: 0.6rem;
	row-gap: 0.25rem;
	align-items: center;
}

.share-buttons-top {
	margin-top: 0;
}

.post-title-date,
.post-title-author {
	font-family: var(--wp--preset--font-family--system);
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: normal;
	color: var(--wp--preset--color--mid-gray);
	white-space: nowrap;
}

.post-title-author::before {
	content: "\2022";
	margin-right: 0.6rem;
	color: var(--wp--preset--color--border);
}

.share-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: var(--wp--preset--color--red);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.share-icon-btn:hover {
	background: var(--wp--preset--color--asphalt-dark);
}

.share-icon-btn svg {
	width: 16px;
	height: 16px;
}

.share-icon-btn.share-icon-copied {
	background: #2e7d32;
}

/* --- Narrow text content sits on an opaque card --- */
.content-card {
	background: var(--wp--preset--color--white);
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(30, 32, 35, 0.08);
	padding-left: 2rem;
	padding-right: 2rem;
}

@media (max-width: 600px) {
	.content-card {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

/* --- Post layout: article + sidebar --- */
.post-rail-wrap {
	position: relative;
}

.post-rail {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	width: 10px;
}

.post-rail-left {
	right: 100%;
	margin-right: 40px;
}

.post-rail-right {
	left: 100%;
	margin-left: 40px;
}

.post-rail-stripe {
	position: absolute;
	inset: 0;
	border-radius: 5px;
	background: repeating-linear-gradient(
		135deg,
		var(--wp--preset--color--red) 0,
		var(--wp--preset--color--red) 8px,
		var(--wp--preset--color--asphalt-dark) 8px,
		var(--wp--preset--color--asphalt-dark) 16px
	);
}

@media (min-width: 1500px) {
	.post-rail {
		display: block;
	}
}

.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2.5rem;
	align-items: start;
}

@media (max-width: 900px) {
	.post-layout {
		grid-template-columns: 1fr;
	}
}

.sidebar-card {
	padding: 1.5rem;
	background: var(--wp--preset--color--asphalt);
	border: 1px solid var(--color-border-on-dark);
	border-top: 4px solid var(--wp--preset--color--red);
	border-radius: 8px;
	overflow-wrap: break-word;
}

.sidebar-card .section-heading {
	color: var(--wp--preset--color--white);
	border-bottom-color: var(--wp--preset--color--red);
}

.sidebar-card .compact-post-title a {
	color: var(--wp--preset--color--white);
}

.sidebar-card .compact-post-title a:hover {
	color: var(--wp--preset--color--red);
}

.sidebar-card .compact-post-term a {
	color: rgba(var(--color-text-light-rgb), 0.55);
}

.sidebar-card .section-heading a {
	color: inherit;
	text-decoration: none;
}

.sidebar-card .section-heading a:hover {
	color: var(--wp--preset--color--red);
}

/* --- Editorial box: static "who wrote this" card below the post content ---
   Sits inside .content-card, which has a WHITE background, so this card
   needs its own light-gray tint (not the dark panel colors used elsewhere)
   to read as a separate, bordered block. --- */
.editorial-box {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-top: 2.5rem;
	padding: 22px 24px;
	background: rgba(var(--color-light-gray-rgb), 0.14);
	border-left: 4px solid var(--color-accent);
	border-radius: 8px;
}

.editorial-box-avatar {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	padding-right: 1.5rem;
	border-right: 1px solid var(--wp--preset--color--border);
}

.editorial-box-avatar img {
	display: block;
	width: auto;
	height: 56px;
}

.editorial-box-body {
	min-width: 0;
}

.editorial-box-name {
	margin: 0 0 0.4rem;
	color: var(--wp--preset--color--dark-gray);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: 1.05rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.editorial-box-desc {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--mid-gray);
	font-size: 0.9rem;
	line-height: 1.6;
}

.editorial-box-link {
	color: var(--color-accent);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.editorial-box-link:hover {
	color: var(--wp--preset--color--dark-gray);
}

@media (max-width: 600px) {
	.editorial-box {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.editorial-box-avatar {
		width: 100%;
		padding-right: 0;
		padding-bottom: 1rem;
		border-right: none;
		border-bottom: 1px solid var(--wp--preset--color--border);
	}
}

/* --- Sidebar follows the article while scrolling --- */
.latest-sidebar {
	position: sticky;
	top: 2rem;
}

@media (max-width: 900px) {
	.latest-sidebar {
		position: static;
	}
}

/* --- Share buttons: brand color circle style --- */
.share-buttons {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.25rem;
}

.related-section {
	margin-top: 1.5rem;
	text-align: center;
}

/* --- Tag pills: outlined --- */
.tags-section {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tag-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.tag-pills a {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	background: transparent;
	color: var(--wp--preset--color--dark-gray);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.tag-pills a:hover {
	border-color: var(--wp--preset--color--red);
	color: var(--wp--preset--color--red);
}

/* --- Bottom share row: centered --- */
.share-row {
	align-items: center;
	gap: 0.85rem;
}

/* --- Previous / next post cards: big image, label, title --- */
.prev-next-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

@media (max-width: 600px) {
	.prev-next-nav {
		grid-template-columns: 1fr;
	}
}

.prev-next-empty {
	visibility: hidden;
}

.prev-next-card {
	display: block;
	text-decoration: none;
}

.prev-next-thumb {
	display: block;
	width: 100%;
	height: 160px;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 0.75rem;
	background: var(--wp--preset--color--light-gray);
}

.prev-next-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.prev-next-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--mid-gray);
	margin-bottom: 0.35rem;
}

.prev-next-title {
	display: block;
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.35;
	color: var(--wp--preset--color--dark-gray);
}

.prev-next-card:hover .prev-next-title {
	color: var(--wp--preset--color--red);
}

.share-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--share-btn-color, #999);
	border: none;
	border-radius: 50%;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.share-btn:hover {
	opacity: 0.85;
}

.share-btn-facebook {
	--share-btn-color: #3b5998;
}

.share-btn-whatsapp {
	--share-btn-color: #25d366;
}

.share-btn-pinterest {
	--share-btn-color: #c8232c;
}

.share-btn-email {
	--share-btn-color: #f39c3a;
}

.share-btn svg {
	width: 18px;
	height: 18px;
}

/* --- Latest posts list (sidebar) --- */
.latest-posts .compact-post {
	margin-bottom: 1.25rem;
}

.latest-posts .compact-post:last-child {
	margin-bottom: 0;
}

/* --- Topbar --- */
.site-topbar {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--mid-gray);
}

.site-topbar a {
	color: rgba(var(--color-text-light-rgb), 0.75);
	text-decoration: none;
}

.site-topbar a:hover {
	color: var(--wp--preset--color--red);
}

/* --- Main header bar --- */
.logo-plate {
	display: inline-flex;
	align-items: center;
}

.logo-plate .wp-block-site-logo {
	margin: 0;
	line-height: 0;
}

.logo-plate img {
	display: block;
}

.site-header-search .wp-block-search__inside-wrapper {
	border-radius: 4px;
	overflow: hidden;
	border: none;
}

.site-header-search .wp-block-search__input {
	border: none !important;
	padding: 0.55rem 0.9rem !important;
	font-size: 0.9rem;
	min-width: 220px;
}

.site-header-search .wp-block-search__button {
	background: var(--wp--preset--color--red) !important;
	color: var(--wp--preset--color--white) !important;
	border: none !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.site-header-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--asphalt-dark) !important;
}

/* --- Hazard stripe divider --- */
.hazard-stripe {
	height: 8px;
	background: repeating-linear-gradient(
		135deg,
		var(--wp--preset--color--red) 0,
		var(--wp--preset--color--red) 14px,
		var(--wp--preset--color--asphalt-dark) 14px,
		var(--wp--preset--color--asphalt-dark) 28px
	);
}

/* --- Secondary nav bar --- */
.site-nav-bar {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	background: var(--color-header-bg);
	overflow: visible;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

/* Wraps the sticky nav + main content so the nav's containing block spans
   the full page height (a nav bar can only stay stuck while its parent
   box is still in view - a short parent unsticks it almost immediately). */
.page-body {
	display: block;
}

.site-nav-bar::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--color-accent);
}

/* --- Hero banner --- */
.hero-carousel-wrap {
	position: relative;
}

.hero-carousel {
	position: relative;
	height: clamp(320px, 45vw, 520px);
}

.hero-carousel .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-carousel .wp-block-post-template > li {
	margin: 0;
}

.hero-banner {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.7s ease;
}

.hero-banner.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

.hero-dots {
	position: absolute;
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%);
	z-index: 2;
	display: flex;
	gap: 0.5rem;
}

.hero-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hero-dot:hover {
	border-color: var(--color-accent);
}

.hero-dot.is-active {
	background: var(--color-accent);
	border-color: var(--color-accent);
}

@media (max-width: 600px) {
	.hero-carousel {
		height: clamp(260px, 62vw, 360px);
	}
}

.hero-banner .wp-block-post-featured-image {
	margin: 0;
	height: 100%;
}

.hero-banner .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.hero-banner-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: linear-gradient(
		180deg,
		rgba(var(--color-bg-dark-rgb), 0) 0%,
		rgba(var(--color-bg-dark-rgb), 0) 45%,
		rgba(var(--color-bg-dark-rgb), 0.88) 100%
	);
}

.hero-banner-overlay .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--system);
	text-transform: uppercase;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.hero-banner-overlay .wp-block-post-terms a {
	color: var(--color-accent);
	text-decoration: none;
}

.hero-banner-overlay .wp-block-post-title {
	text-transform: uppercase;
}

.hero-banner-overlay .wp-block-post-title a {
	color: var(--color-text-light);
	text-decoration: none;
}

.hero-banner-overlay .wp-block-post-title a:hover {
	color: var(--color-accent);
}

.hero-banner-overlay .post-meta-row {
	color: rgba(var(--color-text-light-rgb), 0.75);
}

@media (max-width: 600px) {
	.hero-banner-overlay {
		padding: 1.25rem;
	}

	.hero-banner-overlay .wp-block-post-title {
		font-size: 1.75rem;
		line-height: 1.2;
	}
}

/* --- Section heading --- */
.section-heading {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	text-transform: uppercase;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	border-bottom: 2px solid var(--wp--preset--color--red);
	padding-bottom: 0.6rem;
	margin: 0 0 0.25rem !important;
}

/* --- Archive / search / 404 titles and empty-state text sit directly
   on the dark page background, so they need light text explicitly --- */
.archive-title {
	color: var(--color-text-light);
}

.archive-empty {
	color: rgba(var(--color-text-light-rgb), 0.7);
}

.wp-block-search__label {
	color: var(--color-text-light);
}

/* --- Homepage category sections: heading flanked by lines + tile grid --- */
.category-section {
	margin-top: 3rem;
}

.category-section-heading {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.category-section-heading::before,
.category-section-heading::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: rgba(var(--color-text-light-rgb), 0.15);
}

.category-section-heading-text {
	flex-shrink: 0;
	font-family: var(--wp--preset--font-family--heading);
	text-transform: uppercase;
	font-weight: 700;
	font-size: 1.125rem;
	letter-spacing: 0.05em;
}

.category-section-heading-text a {
	color: var(--color-text-light);
	text-decoration: none;
}

.category-section-heading-text a:hover {
	color: var(--color-accent);
}

.category-section-more {
	display: block;
	text-align: center;
	margin-top: 1.5rem;
	font-family: var(--wp--preset--font-family--system);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--color-accent);
	text-decoration: none;
}

.category-section-more:hover {
	text-decoration: underline;
}

.home-tile-small {
	height: 150px;
}

.home-tile-small .home-tile-title a {
	font-size: 0.8125rem;
}

.home-tile-small .home-tile-term {
	font-size: 0.6875rem;
}

/* --- Related posts grid ("Zobacz inne"): horizontal scroll carousel --- */
.related-grid .wp-block-post-template {
	position: relative;
	height: 220px;
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: left;
}

@media (max-width: 600px) {
	.related-grid .wp-block-post-template {
		height: 380px;
	}

	.related-card {
		flex-direction: column;
	}

	.related-card-media {
		flex: 0 0 160px;
	}
}

.related-grid .wp-block-post-template > li {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.6s ease;
}

.related-grid .wp-block-post-template > li.is-active {
	opacity: 1;
	pointer-events: auto;
	z-index: 1;
}

/* --- "Zobacz inne": magazine spread, deliberately different from the
   homepage's dark photo tiles - light card, image on one side, editorial
   text (eyebrow/title/excerpt/date) on the other. --- */
.related-card {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	overflow: hidden;
}

.related-card-media {
	flex: 0 0 42%;
	margin: 0;
}

.related-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Whole-card "stretched link": hidden duplicate of the title link, sized
   to cover the entire card. The real eyebrow/title links stay
   independently clickable/focusable on top of it. */
.related-card-link-cover {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0;
	font-size: 0;
	line-height: 0;
}

.related-card-link-cover a {
	position: absolute;
	inset: 0;
	display: block;
}

.related-card-content {
	position: relative;
	z-index: 3;
	flex: 1;
	min-width: 0;
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	pointer-events: none;
}

.related-card-eyebrow {
	font-family: var(--wp--preset--font-family--system);
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-bottom: 0.4rem;
}

.related-card-eyebrow a {
	position: relative;
	color: var(--color-accent);
	text-decoration: none;
	pointer-events: auto;
}

.related-card-title {
	margin: 0 0 0.4rem;
}

.related-card-title a {
	position: relative;
	color: var(--wp--preset--color--dark-gray);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.1875rem;
	line-height: 1.3;
	pointer-events: auto;
}

.related-card-title a:hover {
	color: var(--color-accent);
}

.related-card-excerpt {
	margin: 0 0 0.5rem;
}

.related-card-excerpt p {
	color: var(--wp--preset--color--mid-gray);
	font-size: 0.875rem;
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-card-date {
	color: var(--wp--preset--color--mid-gray);
	font-size: 0.75rem;
}

/* --- Arrow navigation for the "Zobacz inne" carousel --- */
.related-carousel {
	position: relative;
}

.related-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(var(--color-bg-dark-rgb), 0.85);
	color: var(--color-text-light);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}

.related-arrow svg {
	width: 18px;
	height: 18px;
}

.related-arrow:hover {
	background: var(--color-accent);
}

.related-arrow-prev {
	left: 0.5rem;
}

.related-arrow-next {
	right: 0.5rem;
}

@media (max-width: 600px) {
	.related-arrow {
		display: none;
	}
}

/* --- Post card grid --- */
.post-card {
	position: relative;
	background: var(--wp--preset--color--asphalt);
	border: 1px solid var(--color-border-on-dark);
	border-radius: 8px;
	overflow: hidden;
	height: 100%;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 26px rgba(var(--color-accent-rgb), 0.25);
}

.post-card:hover .post-card-bg img {
	transform: scale(1.05);
}

.post-card-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin: 0;
}

.post-card-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.post-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		180deg,
		rgba(var(--color-bg-dark-rgb), 1) 0%,
		rgba(var(--color-bg-dark-rgb), 1) 22%,
		rgba(var(--color-bg-dark-rgb), 0.72) 50%,
		rgba(var(--color-bg-dark-rgb), 0.94) 100%
	);
}

.post-card-accent {
	position: relative;
	z-index: 2;
	height: 10px;
	background: var(--color-bg-dark);
	border-bottom: 3px solid var(--color-accent);
}

.post-card-body {
	position: relative;
	z-index: 2;
}

.post-card .wp-block-post-terms {
	font-family: var(--wp--preset--font-family--system);
	text-transform: uppercase;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.post-card .wp-block-post-terms a {
	color: var(--color-accent);
	text-decoration: none;
}

.post-card .wp-block-post-title a {
	color: var(--color-text-light);
	text-decoration: none;
}

.post-card .wp-block-post-title a:hover {
	color: var(--color-accent);
}

.post-card .wp-block-post-excerpt {
	color: rgba(var(--color-text-light-rgb), 0.65);
}

.post-card .wp-block-post-date {
	color: rgba(var(--color-text-light-rgb), 0.5);
}

/* --- Top nav: category links unfold on hover, showing post-card tiles --- */
.site-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.75rem;
}

.site-nav-link {
	display: inline-block;
	padding: 0.4rem 0;
	font-family: var(--wp--preset--font-family--heading);
	text-transform: uppercase;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--color-text-light);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.site-nav-link:hover {
	color: var(--color-accent);
	border-bottom-color: var(--color-accent);
}

.site-nav-item {
	position: relative;
}

.site-nav-preview {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 40;
	display: grid;
	grid-template-columns: repeat(3, 160px);
	gap: 1.25rem;
	width: max-content;
	max-width: 90vw;
	padding: 1.25rem;
	margin-top: 0.35rem;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.site-nav-preview:empty {
	display: none;
}

.site-nav-item:hover .site-nav-preview,
.site-nav-item:focus-within .site-nav-preview {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-nav-item:nth-last-child(-n+2) .site-nav-preview {
	left: auto;
	right: 0;
}

.mini-post-card {
	display: block;
	text-decoration: none !important;
}

.mini-post-card-image {
	position: relative;
	display: block;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 0.6rem;
}

.mini-post-card-image img {
	width: 100%;
	height: 100px;
	object-fit: cover;
	display: block;
}

.mini-post-card-badge {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	background: rgba(28, 31, 34, 0.72);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0.2rem 0.55rem;
	border-radius: 4px;
}

.mini-post-card-title {
	color: var(--wp--preset--color--dark-gray);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.35;
	text-transform: uppercase;
}

.mini-post-card:hover .mini-post-card-title {
	color: var(--wp--preset--color--red);
}

.mini-post-card-date {
	margin-top: 0.3rem;
	font-size: 0.75rem;
	color: var(--wp--preset--color--mid-gray);
}

@media (max-width: 900px) {
	.site-nav-preview {
		grid-template-columns: repeat(2, 150px);
	}
}

@media (max-width: 600px) {
	.site-nav-preview {
		grid-template-columns: 1fr;
		width: 220px;
	}
}

.post-meta-row {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--mid-gray);
}

/* --- Featured tiles (highlighted posts) --- */
.featured-tile {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid var(--color-border-on-dark);
	height: 260px;
}

.featured-tile .wp-block-post-featured-image {
	margin: 0;
	height: 100%;
}

.featured-tile .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.featured-tile-date {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: var(--wp--preset--color--white);
	border-radius: 4px;
	padding: 0.35rem 0.6rem;
	text-align: center;
	line-height: 1.05;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.featured-tile-date .featured-tile-day {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--asphalt);
}

.featured-tile-date .featured-tile-month {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--mid-gray);
}

.featured-tile-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1rem;
	background: var(--tile-gradient);
}

.featured-tile-term {
	font-family: var(--wp--preset--font-family--system);
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.35rem;
}

.featured-tile-term a {
	color: var(--color-accent);
	text-decoration: none;
}

.featured-tile-overlay .wp-block-post-title {
	margin: 0;
}

.featured-tile-overlay .wp-block-post-title a {
	color: var(--color-text-light);
	text-decoration: none;
	line-height: 1.3;
}

.featured-tile-overlay .wp-block-post-title a:hover {
	color: var(--color-accent);
}

@media (max-width: 900px) {
	.featured-tile {
		height: 220px;
	}
}

/* --- Homepage "latest posts" tiles: image + bottom gradient overlay --- */
.home-tile {
	position: relative;
	height: 200px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--color-border-on-dark);
	cursor: pointer;
	transition: box-shadow 0.2s ease;
}

.home-tile:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.home-tile-bg {
	position: absolute;
	inset: 0;
	margin: 0;
	z-index: 0;
}

.home-tile-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, filter 0.35s ease;
}

.home-tile:hover .home-tile-bg img {
	transform: scale(1.06);
	filter: brightness(0.8);
}

.home-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: var(--tile-gradient);
}

/* Whole-tile "stretched link": a hidden duplicate of the title link,
   sized to cover the entire card so any part of it is clickable. The
   real term/title links stay independently clickable on top of it. */
.home-tile-link-cover {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0;
	font-size: 0;
	line-height: 0;
}

.home-tile-link-cover a {
	position: absolute;
	inset: 0;
	display: block;
}

.home-tile-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 1rem;
	pointer-events: none;
}

.home-tile-term {
	font-family: var(--wp--preset--font-family--system);
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.3rem;
}

.home-tile-term a {
	position: relative;
	color: var(--color-accent);
	text-decoration: none;
	pointer-events: auto;
}

.home-tile-title {
	margin: 0;
}

.home-tile-title a {
	position: relative;
	color: var(--color-text-light);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1.3;
	pointer-events: auto;
}

.home-tile-title a:hover {
	color: var(--color-accent);
}

@media (max-width: 700px) {
	.home-tile {
		height: 220px;
	}
}

/* --- Category section grid variants: featured (big + stack) and mosaic --- */
.category-grid-featured .wp-block-post-template,
.category-grid-featured-reverse .wp-block-post-template {
	display: grid;
	grid-template-rows: repeat(3, 1fr);
	gap: 1.5rem;
	min-height: 480px;
}

.category-grid-featured .wp-block-post-template {
	grid-template-columns: 2fr 1fr;
}

.category-grid-featured-reverse .wp-block-post-template {
	grid-template-columns: 1fr 2fr;
}

.category-grid-featured .wp-block-post-template > li:first-child {
	grid-column: 1;
	grid-row: 1 / span 3;
}

.category-grid-featured .wp-block-post-template > li:not(:first-child) {
	grid-column: 2;
}

.category-grid-featured-reverse .wp-block-post-template > li:first-child {
	grid-column: 2;
	grid-row: 1 / span 3;
}

.category-grid-featured-reverse .wp-block-post-template > li:not(:first-child) {
	grid-column: 1;
}

.category-grid-featured .home-tile,
.category-grid-featured-reverse .home-tile {
	height: 100%;
}

.category-grid-featured .wp-block-post-template > li:first-child .home-tile-title a,
.category-grid-featured-reverse .wp-block-post-template > li:first-child .home-tile-title a {
	font-size: 1.25rem;
}

.category-grid-mosaic .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 1.5rem;
	min-height: 420px;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(1) {
	grid-column: span 2;
	grid-row: span 2;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(2) {
	grid-column: 3;
	grid-row: 1;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(3) {
	grid-column: 3;
	grid-row: 2;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(4) {
	grid-column: span 3;
	grid-row: 3;
}

.category-grid-mosaic .home-tile {
	height: 100%;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(1) .home-tile-title a {
	font-size: 1.25rem;
}

.category-grid-mosaic .wp-block-post-template > li:nth-child(4) .home-tile-title a {
	font-size: 1.0625rem;
}

@media (max-width: 780px) {
	.category-grid-featured .wp-block-post-template,
	.category-grid-featured-reverse .wp-block-post-template,
	.category-grid-mosaic .wp-block-post-template {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		min-height: 0;
	}

	.category-grid-featured .wp-block-post-template > li,
	.category-grid-featured-reverse .wp-block-post-template > li,
	.category-grid-mosaic .wp-block-post-template > li {
		grid-column: auto;
		grid-row: auto;
	}

	.category-grid-featured .home-tile,
	.category-grid-featured-reverse .home-tile,
	.category-grid-mosaic .home-tile {
		height: 220px;
	}

	.category-grid-featured .wp-block-post-template > li:first-child .home-tile-title a,
	.category-grid-featured-reverse .wp-block-post-template > li:first-child .home-tile-title a,
	.category-grid-mosaic .wp-block-post-template > li:nth-child(1) .home-tile-title a,
	.category-grid-mosaic .wp-block-post-template > li:nth-child(4) .home-tile-title a {
		font-size: 0.9375rem;
	}
}

/* --- Compact post list (the rest, plain) --- */
.compact-post {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
}

.compact-post .wp-block-post-featured-image {
	margin: 0;
	flex-shrink: 0;
}

.compact-post .wp-block-post-featured-image img {
	width: 72px;
	height: 72px;
	object-fit: contain !important;
	background: rgba(var(--color-text-light-rgb), 0.06);
	border-radius: 6px;
	display: block;
}

.compact-post-title {
	margin: 0 0 0.3rem;
	font-size: 0.9375rem;
	line-height: 1.3;
}

.compact-post-title a {
	color: var(--wp--preset--color--dark-gray);
	text-decoration: none;
	font-weight: 600;
}

.compact-post-title a:hover {
	color: var(--wp--preset--color--red);
}

.compact-post-term {
	font-family: var(--wp--preset--font-family--system);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.compact-post-term a {
	color: var(--wp--preset--color--mid-gray);
	text-decoration: none;
}

.wp-block-post-title a {
	text-decoration: none;
}

/* --- Footer --- */
.site-footer-bar a {
	color: rgba(var(--color-text-light-rgb), 0.75);
}

.site-footer-bar a:hover {
	color: var(--color-accent);
}

/* --- Sponsored post disclosure label: below the title, above the content --- */
.sponsored-label {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 1.25rem 0 0;
	padding: 0.85rem 1.1rem;
	background: rgba(var(--color-accent-rgb), 0.08);
	border: 1px solid rgba(var(--color-accent-rgb), 0.3);
	border-left: 4px solid var(--color-accent);
	border-radius: 6px;
}

.sponsored-label-tag {
	flex-shrink: 0;
	padding: 0.25rem 0.6rem;
	background: var(--color-accent);
	color: var(--wp--preset--color--white);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 4px;
}

.sponsored-label-body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.sponsored-label-title {
	color: var(--wp--preset--color--dark-gray);
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.sponsored-label-desc {
	color: var(--wp--preset--color--mid-gray);
	font-size: 0.8125rem;
}

@media (max-width: 600px) {
	.sponsored-label {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
}
