/*
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.16.0
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);
}

/* Right-align the previews of the trailing nav items so a hover panel near
   the edge never spills past the viewport. -n+3 accounts for the injected
   "Kalkulatory" item, which is a .site-nav-item but has no .site-nav-preview. */
.site-nav-item:nth-last-child(-n+3) .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;
	}
}

/* ============================================================================
   RESPONSIVE / MOBILE LAYOUT
   Added 2026 — phones and tablets. Only layout, spacing and font sizing
   change here; colours, fonts and the visual language are untouched.
   Breakpoints: 1024px (nav + brand strip), 900px (grids), 600/480px (phones).
   Font-size overrides need !important because WordPress prints
   .has-*-font-size { … !important } from wp-block-library (loaded earlier).
   ============================================================================ */

/* --- Kill any sideways scrolling on small screens ------------------------- */
@media (max-width: 1024px) {
	.site-topbar,
	.site-header-bar,
	.autodane-brands-bar,
	.home-main,
	.category-section,
	.post-rail-wrap,
	.site-footer-bar {
		overflow-x: clip;
	}

	main > .wp-block-group.alignwide,
	main > .wp-block-group {
		max-width: 100%;
	}
}

/* --- Give edge-hugging wide blocks a little breathing room --------------- */
@media (max-width: 1024px) {
	.category-section,
	.home-main > .wp-block-query,
	main > .wp-block-group.alignwide,
	main > .wp-block-query.alignwide {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/* hero stays full-bleed */
	.hero-carousel-wrap {
		padding-left: 0;
		padding-right: 0;
	}
}

/* =========================================================================
   1. HEADER
   ========================================================================= */
@media (max-width: 1024px) {
	.site-header-bar .wp-block-group.alignwide {
		row-gap: 0.9rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.site-header-search {
		flex: 1 1 100%;
		width: 100%;
	}

	.site-header-search .wp-block-search__inside-wrapper {
		width: 100%;
	}

	.site-header-search .wp-block-search__input {
		min-width: 0 !important;
		width: 100%;
	}

	.site-topbar .wp-block-group.alignwide {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

@media (max-width: 480px) {
	.site-topbar .wp-block-group.alignwide {
		justify-content: center;
		text-align: center;
		gap: 0.25rem 1.1rem;
	}

	.site-header-bar {
		padding-top: 0.9rem !important;
		padding-bottom: 0.9rem !important;
	}

	.logo-plate img,
	.logo-plate .custom-logo {
		width: 140px;
		height: auto;
	}
}

/* =========================================================================
   2. PRIMARY NAVIGATION  →  hamburger menu (≤ 1024px)
   ========================================================================= */

/* Slightly tighter nav for small laptops so it still fits on one row. */
@media (max-width: 1200px) and (min-width: 1025px) {
	.site-nav-menu {
		gap: 1.1rem;
	}

	.site-nav-link {
		font-size: 0.875rem;
		letter-spacing: 0.02em;
	}
}

.site-nav-toggle {
	display: none;
}

@media (max-width: 1024px) {
	.site-nav-bar {
		padding-top: 0.35rem;
		padding-bottom: 0.35rem;
	}

	.site-nav-bar > .wp-block-group.alignwide {
		justify-content: space-between;
		flex-wrap: nowrap;
		padding-left: 0.75rem;
		padding-right: 0.75rem;
		gap: 0.5rem;
	}

	/* --- the trigger --- */
	.site-nav-toggle {
		display: inline-flex;
		align-items: center;
		gap: 0.65rem;
		min-height: 44px;
		padding: 0.4rem 0.55rem;
		background: transparent;
		border: 0;
		color: var(--color-text-light);
		font-family: var(--wp--preset--font-family--heading);
		font-size: 0.9375rem;
		font-weight: 700;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		cursor: pointer;
	}

	.site-nav-toggle-icon {
		position: relative;
		display: block;
		width: 24px;
		height: 2px;
		background: currentColor;
	}

	.site-nav-toggle-icon::before,
	.site-nav-toggle-icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 24px;
		height: 2px;
		background: currentColor;
		transition: transform 0.2s ease;
	}

	.site-nav-toggle-icon::before {
		top: -7px;
	}

	.site-nav-toggle-icon::after {
		top: 7px;
	}

	.site-nav-open .site-nav-toggle-icon {
		background: transparent;
	}

	.site-nav-open .site-nav-toggle-icon::before {
		transform: translateY(7px) rotate(45deg);
	}

	.site-nav-open .site-nav-toggle-icon::after {
		transform: translateY(-7px) rotate(-45deg);
	}

	/* --- the panel --- */
	.site-nav-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 60;
		display: none;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		max-height: 78vh;
		max-height: calc(100dvh - 6rem);
		padding: 0.25rem 0 0.85rem;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--color-header-bg);
		border-top: 1px solid var(--color-border-on-dark);
		box-shadow: 0 18px 28px rgba(0, 0, 0, 0.35);
	}

	.site-nav-open .site-nav-menu {
		display: flex;
	}

	.site-nav-menu > .site-nav-link,
	.site-nav-item > .site-nav-link,
	.aa-nav-calculators .aa-nav-heading > .site-nav-link {
		display: block;
		padding: 0.95rem 1.25rem;
		font-size: 1rem;
		border-bottom: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.07);
		border-left: 3px solid transparent;
	}

	.site-nav-menu > .site-nav-link:first-child {
		border-top: 0;
	}

	.site-nav-menu .site-nav-link:hover,
	.site-nav-menu .site-nav-link:focus {
		color: var(--color-accent);
		border-bottom-color: transparent;
		border-left-color: var(--color-accent);
		background: rgba(255, 255, 255, 0.03);
	}

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

	/* Category hover previews are a pointer-only nicety — off for touch. */
	.site-nav-preview {
		display: none !important;
	}

	/* --- Calculators sub-menu: accordion inside the panel ---
	   (styled from the theme because the plugin stylesheet loads first
	   and we cannot edit it here) */
	.site-nav-menu .aa-nav-calculators {
		position: static;
		width: 100%;
	}

	.site-nav-menu .aa-nav-heading {
		justify-content: space-between;
		gap: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.07);
	}

	.site-nav-menu .aa-nav-heading > .site-nav-link {
		flex: 1;
		border-top: 0;
	}

	.site-nav-menu .aa-nav-toggle {
		width: 48px;
		height: 48px;
		flex: 0 0 48px;
		margin-right: 0.4rem;
		font-size: 1rem;
		color: var(--color-text-light);
	}

	.site-nav-menu .aa-nav-dropdown {
		position: static;
		display: none;
		width: auto;
		max-width: none;
		max-height: none;
		margin: 0;
		padding: 0.5rem 1.25rem 1rem;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.35);
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-nav-menu .aa-nav-calculators.is-open .aa-nav-dropdown {
		display: block;
	}

	.site-nav-menu .aa-nav-dropdown-title {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.2rem;
		border-bottom-color: rgba(255, 255, 255, 0.12);
	}

	/* the panel is dark now, so the sub-menu's dark-on-white text needs
	   to flip to light */
	.site-nav-menu .aa-nav-dropdown-title strong {
		color: var(--color-text-light);
	}

	.site-nav-menu .aa-nav-dropdown ol {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.site-nav-menu .aa-nav-dropdown li a {
		padding: 0.8rem 0.35rem;
		font-size: 0.9rem;
		color: rgba(var(--color-text-light-rgb), 0.85);
	}

	.site-nav-menu .aa-nav-dropdown li a:hover,
	.site-nav-menu .aa-nav-dropdown li a:focus-visible {
		background: rgba(255, 255, 255, 0.06);
		color: var(--color-accent);
	}
}

/* =========================================================================
   3. BRANDS BAR  →  horizontal scroll strip (≤ 1024px)
   Driven from the theme (plugin stylesheet loads earlier and is not
   editable here). Replaces the plugin's multi-row grid with one
   swipeable row so it never pushes the hero down a tall block.
   ========================================================================= */
@media (max-width: 1024px) {
	.autodane-brands-bar .autodane-grid-wrap {
		margin: 14px 0;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		/* keep the off-screen icons from counting toward page width */
		contain: paint;
	}

	.autodane-brands-bar .autodane-grid-wrap::-webkit-scrollbar {
		display: none;
	}

	/* flex (not grid) keeps the container itself at viewport width — the
	   icons overflow into the scroller instead of widening the page */
	.autodane-brands-bar .autodane-grid {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		padding: 2px 1rem 6px;
	}

	.autodane-brands-bar .autodane-brand {
		flex: 0 0 auto;
		width: 60px;
		padding: 6px 2px;
	}

	.autodane-brands-bar .autodane-brand__icon {
		width: 44px;
		height: 44px;
	}
}

@media (max-width: 480px) {
	.autodane-brands-bar .autodane-brand {
		width: 52px;
	}

	.autodane-brands-bar .autodane-brand__icon {
		width: 40px;
		height: 40px;
	}
}

/* =========================================================================
   4. HERO / FEATURED ARTICLE
   ========================================================================= */
@media (max-width: 1024px) {
	.hero-carousel {
		height: clamp(300px, 44vw, 420px);
	}

	/* one fluid ramp instead of the !important-less rule that WP's
	   .has-xx-large-font-size (…!important) used to defeat */
	.hero-banner-overlay .wp-block-post-title,
	.hero-banner-overlay .wp-block-post-title.has-xx-large-font-size {
		font-size: clamp(1.5rem, 4vw, 2rem) !important;
		line-height: 1.2;
	}

	.hero-banner-overlay .wp-block-post-terms,
	.hero-banner-overlay .wp-block-post-terms.has-small-font-size {
		font-size: 0.8125rem !important;
	}
}

@media (max-width: 600px) {
	.hero-carousel {
		height: 330px;
	}

	.hero-banner-overlay {
		padding: 1.1rem 1.15rem 1.35rem;
	}

	.hero-dots {
		bottom: 0.8rem;
	}
}

@media (max-width: 380px) {
	.hero-carousel {
		height: 300px;
	}
}

/* =========================================================================
   5. HOMEPAGE CATEGORY SECTIONS  →  simple 2-up (tablet) / single column (phone)
   The old ≤780 media query could not beat the :first-child / :nth-child
   grid-placement rules, so tiles collapsed to slivers. Switching the
   post-template to flex-wrap removes every grid-placement conflict.
   ========================================================================= */
@media (max-width: 900px) {
	.category-section {
		margin-top: 2.25rem;
	}

	.category-section-heading {
		gap: 0.85rem;
	}

	.category-section-heading-text,
	.category-section-heading-text a {
		font-size: 1rem;
	}

	.category-grid-featured .wp-block-post-template,
	.category-grid-featured-reverse .wp-block-post-template,
	.category-grid-mosaic .wp-block-post-template {
		display: flex !important;
		flex-flow: row wrap;
		gap: 1rem;
		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 {
		flex: 1 1 calc(50% - 0.5rem);
		min-width: 0;
		grid-column: auto !important;
		grid-row: auto !important;
	}

	/* a lone tile left on the last row spans full width */
	.category-grid-featured .wp-block-post-template > li:last-child:nth-child(odd),
	.category-grid-featured-reverse .wp-block-post-template > li:last-child:nth-child(odd),
	.category-grid-mosaic .wp-block-post-template > li:last-child:nth-child(odd) {
		flex-basis: 100%;
	}

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

	.home-tile-title a,
	.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 !important;
	}
}

@media (max-width: 600px) {
	.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 {
		flex-basis: 100%;
	}

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

	.category-grid-featured .wp-block-post-template > li:first-child .home-tile,
	.category-grid-featured-reverse .wp-block-post-template > li:first-child .home-tile,
	.category-grid-mosaic .wp-block-post-template > li:first-child .home-tile {
		height: 230px !important;
	}
}

/* =========================================================================
   6. ARCHIVE / SEARCH  post-card grid
   ========================================================================= */
@media (max-width: 900px) {
	.wp-block-query.alignwide > .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* 36px large preset is too big for a half-width card */
	.post-card .wp-block-post-title,
	.post-card .wp-block-post-title.has-large-font-size {
		font-size: 1.5rem !important;
	}

	.archive-title,
	.archive-title.has-x-large-font-size {
		font-size: 2rem !important;
	}
}

@media (max-width: 600px) {
	.wp-block-query.alignwide > .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}

	.post-card .wp-block-post-title,
	.post-card .wp-block-post-title.has-large-font-size {
		font-size: 1.4rem !important;
	}

	.archive-title,
	.archive-title.has-x-large-font-size {
		font-size: 1.85rem !important;
	}
}

/* =========================================================================
   7. SINGLE POST
   ========================================================================= */
@media (max-width: 1024px) {
	.post-rail-wrap {
		padding-left: 0.9rem;
		padding-right: 0.9rem;
	}
}

@media (max-width: 900px) {
	.post-layout {
		gap: 1.75rem;
	}
}

@media (max-width: 600px) {
	.post-rail-wrap {
		padding-top: 1.5rem !important;
		padding-bottom: 2.5rem !important;
	}

	h1.wp-block-post-title,
	h1.wp-block-post-title.has-xx-large-font-size {
		font-size: 1.7rem !important;
		line-height: 1.22;
	}

	.content-card {
		padding-top: 1.35rem !important;
		padding-bottom: 1.35rem !important;
	}

	.post-meta-bar {
		column-gap: 0.9rem;
		row-gap: 0.5rem;
	}

	.editorial-box {
		margin-top: 2rem;
		padding: 18px;
	}

	.related-section .section-heading {
		font-size: 0.9rem;
	}

	.entry-content .wp-block-table,
	.entry-content pre.wp-block-code {
		overflow-x: auto;
	}

	.prev-next-thumb {
		height: 140px;
	}

	.related-grid .wp-block-post-template {
		height: 400px;
	}

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

	.related-card-content {
		padding: 1rem 1.15rem;
	}

	.related-card-title a {
		font-size: 1.05rem;
	}
}

/* =========================================================================
   8. FOOTER  →  stacked columns
   ========================================================================= */
@media (max-width: 700px) {
	.site-footer-bar .wp-block-group.is-layout-grid {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.site-footer-bar {
		padding-top: 2.25rem !important;
	}
}

/* =========================================================================
   9. TOUCH TARGETS & SPACING
   ========================================================================= */
@media (max-width: 1024px) {
	.share-btn {
		width: 44px;
		height: 44px;
	}

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

	.tag-pills a {
		padding: 0.5rem 0.9rem;
	}

	.category-section-more,
	.editorial-box-link {
		display: inline-block;
		padding: 0.35rem 0;
	}
}

