/*
Theme Name: Webportaly Mag
Theme URI: https://webportaly.sk
Author: treborplus.sk / webportaly.sk
Author URI: https://treborplus.sk
Description: High-performance, multi-purpose magazine framework for a network of portals. 2026 edition with Cyber Olive & Transformative Teal palette.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: webportaly-mag
Tags: blog, news, magazine, full-site-editing, block-patterns, dark-mode, custom-colors, custom-logo, editor-style, translation-ready
*/

/* ===================================================
   CSS Custom Properties - 2026 Palette
   =================================================== */
:root {
	--wp-mag-bg: #1a1a1a;
	--wp-mag-surface: #262626;
	--wp-mag-surface-hover: #2e2e2e;
	--wp-mag-primary: #869e5e;
	--wp-mag-primary-hover: #9bb574;
	--wp-mag-secondary: #005f6b;
	--wp-mag-secondary-hover: #007a8a;
	--wp-mag-text: #f0f0f0;
	--wp-mag-text-muted: #a0a0a0;
	--wp-mag-border: #333333;
	--wp-mag-border-subtle: #2a2a2a;
	--wp-mag-shadow: rgba(0, 0, 0, 0.4);
	--wp-mag-overlay: rgba(26, 26, 26, 0.85);
	--wp-mag-radius: 8px;
	--wp-mag-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-wp-mag-theme="light"] {
	--wp-mag-bg: #f4f4f2;
	--wp-mag-surface: #ffffff;
	--wp-mag-surface-hover: #f0f0ee;
	--wp-mag-primary: #6b8a3f;
	--wp-mag-primary-hover: #567530;
	--wp-mag-secondary: #005f6b;
	--wp-mag-secondary-hover: #004c56;
	--wp-mag-text: #1a1a1a;
	--wp-mag-text-muted: #5a5a5a;
	--wp-mag-border: #e0e0de;
	--wp-mag-border-subtle: #eaeae8;
	--wp-mag-shadow: rgba(0, 0, 0, 0.06);
	--wp-mag-overlay: rgba(244, 244, 242, 0.9);
}

/* ===================================================
   Base & Reset
   =================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	background-color: var(--wp-mag-bg);
	color: var(--wp-mag-text);
	transition: background-color var(--wp-mag-transition), color var(--wp-mag-transition);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--wp-mag-primary);
	text-decoration: none;
	transition: color var(--wp-mag-transition);
}

a:hover,
a:focus {
	color: var(--wp-mag-primary-hover);
}

img {
	max-width: 100%;
	height: auto;
}

/* ===================================================
   Sticky Header
   =================================================== */
.wp-mag-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--wp-mag-overlay);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp-mag-border);
	transition: background-color var(--wp-mag-transition);
}

.wp-mag-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 60px;
}

.wp-mag-logo {
	flex-shrink: 0;
}

.wp-mag-logo a,
.wp-mag-logo .wp-block-site-title a {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--wp-mag-primary) !important;
	letter-spacing: -0.03em;
	text-decoration: none;
}

/* ===================================================
   Navigation
   =================================================== */
.wp-mag-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.wp-mag-nav .wp-block-navigation__container {
	gap: 0.25rem;
}

.wp-mag-nav .wp-block-navigation-item__content {
	color: var(--wp-mag-text-muted);
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.4rem 0.7rem;
	border-radius: 4px;
	transition: color var(--wp-mag-transition), background-color var(--wp-mag-transition);
}

.wp-mag-nav .wp-block-navigation-item__content:hover,
.wp-mag-nav .wp-block-navigation-item__content:focus {
	color: var(--wp-mag-text);
	background-color: var(--wp-mag-surface);
}

.wp-mag-nav .current-menu-item .wp-block-navigation-item__content {
	color: var(--wp-mag-primary);
}

/* ===================================================
   Dark/Light Mode Toggle
   =================================================== */
.wp-mag-toggle {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border);
	border-radius: 20px;
	color: var(--wp-mag-text-muted);
	cursor: pointer;
	padding: 0.35rem 0.85rem;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: all var(--wp-mag-transition);
}

.wp-mag-toggle:hover {
	border-color: var(--wp-mag-primary);
	color: var(--wp-mag-primary);
}

.wp-mag-toggle-icon {
	font-size: 0.95rem;
	line-height: 1;
}

/* ===================================================
   Header Actions (toggle + burger wrapper)
   =================================================== */
.wp-mag-header-actions {
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

/* Ensure header inner stays flex on all viewports */
.wp-mag-header-inner,
.wp-mag-header-inner.wp-block-group {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem;
	height: 60px;
}

/* ===================================================
   Hamburger Button (mobile only)
   =================================================== */
.wp-mag-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	padding: 6px;
	background: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border);
	border-radius: 6px;
	cursor: pointer;
	transition: border-color var(--wp-mag-transition);
}

.wp-mag-burger:hover {
	border-color: var(--wp-mag-primary);
}

.wp-mag-burger-line {
	display: block;
	width: 100%;
	height: 2px;
	background-color: var(--wp-mag-text);
	border-radius: 1px;
	transition: transform var(--wp-mag-transition), opacity var(--wp-mag-transition);
}

/* Animated X when open */
.wp-mag-burger[aria-expanded="true"] .wp-mag-burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.wp-mag-burger[aria-expanded="true"] .wp-mag-burger-line:nth-child(2) {
	opacity: 0;
}

.wp-mag-burger[aria-expanded="true"] .wp-mag-burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================
   Layout: Main content + Sidebar (ezin.sk style)
   =================================================== */
.wp-mag-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
}

.wp-mag-main {
	min-width: 0;
}

/* ===================================================
   Hero Section
   =================================================== */
.wp-mag-hero {
	position: relative;
	border-radius: var(--wp-mag-radius);
	overflow: hidden;
	margin-bottom: 2rem;
	aspect-ratio: 21 / 9;
	background-color: var(--wp-mag-surface);
}

.wp-mag-hero a {
	display: block;
	height: 100%;
}

.wp-mag-hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-mag-hero:hover img {
	transform: scale(1.03);
}

.wp-mag-hero-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 2rem;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.wp-mag-hero-category {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #fff;
	background-color: var(--wp-mag-secondary);
	padding: 0.2rem 0.6rem;
	border-radius: 3px;
	margin-bottom: 0.6rem;
}

.wp-mag-hero-title {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	margin: 0 0 0.5rem;
}

.wp-mag-hero-title a {
	color: inherit;
}

.wp-mag-hero-meta {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.7);
}

/* ===================================================
   Section Headings
   =================================================== */
.wp-mag-section-heading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}

.wp-mag-section-heading h2 {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp-mag-primary);
	margin: 0;
	white-space: nowrap;
}

.wp-mag-section-heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background-color: var(--wp-mag-border);
}

/* ===================================================
   Card Grid (3-column)
   =================================================== */
.wp-mag-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.wp-mag-card {
	background-color: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border-subtle);
	border-radius: var(--wp-mag-radius);
	overflow: hidden;
	transition: transform var(--wp-mag-transition), box-shadow var(--wp-mag-transition), background-color var(--wp-mag-transition);
}

.wp-mag-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px var(--wp-mag-shadow);
}

.wp-mag-card-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.wp-mag-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-mag-card:hover .wp-mag-card-image img {
	transform: scale(1.04);
}

.wp-mag-card-body {
	padding: 1rem 1.15rem 1.15rem;
}

.wp-mag-card-category {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.4rem;
}

.wp-mag-card-category a {
	color: var(--wp-mag-secondary);
	transition: color var(--wp-mag-transition);
}

.wp-mag-card-category a:hover {
	color: var(--wp-mag-secondary-hover);
}

.wp-mag-card-title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 0.6rem;
}

.wp-mag-card-title a {
	color: var(--wp-mag-text);
	transition: color var(--wp-mag-transition);
}

.wp-mag-card-title a:hover {
	color: var(--wp-mag-primary);
}

.wp-mag-card-meta {
	font-size: 0.75rem;
	color: var(--wp-mag-text-muted);
}

.wp-mag-card-meta .wp-block-post-date,
.wp-mag-card-meta .wp-block-post-author-name {
	font-size: inherit;
	color: inherit;
}

/* ===================================================
   Sidebar
   =================================================== */
.wp-mag-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.wp-mag-sidebar-widget {
	background-color: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border-subtle);
	border-radius: var(--wp-mag-radius);
	padding: 1.15rem;
	transition: background-color var(--wp-mag-transition);
}

.wp-mag-widget-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp-mag-primary);
	margin: 0 0 0.85rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp-mag-primary);
}

.wp-mag-sidebar-widget .wp-block-latest-posts__list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.wp-mag-sidebar-widget .wp-block-latest-posts__list li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp-mag-border-subtle);
	font-size: 0.85rem;
	line-height: 1.4;
}

.wp-mag-sidebar-widget .wp-block-latest-posts__list li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wp-mag-sidebar-widget .wp-block-latest-posts__post-date {
	font-size: 0.7rem;
	color: var(--wp-mag-text-muted);
	display: block;
	margin-top: 0.15rem;
}

/* ===================================================
   Ad Zones
   =================================================== */
.wp-mag-ad-zone {
	background-color: var(--wp-mag-surface);
	border: 1px dashed var(--wp-mag-border);
	border-radius: var(--wp-mag-radius);
	padding: 1rem;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--wp-mag-transition);
}

.wp-mag-ad-zone--top {
	max-width: 1200px;
	margin: 0 auto;
	min-height: 90px;
}

/* Responsive ad slots: desktop vs mobile */
.wp-mag-ad-mobile {
	display: none;
}

@media (max-width: 768px) {
	.wp-mag-ad-desktop {
		display: none !important;
	}

	.wp-mag-ad-mobile {
		display: block !important;
	}

	.wp-mag-ad-zone--top {
		min-height: 100px;
	}

	.wp-mag-ad-zone--footer {
		min-height: 100px;
	}
}

.wp-mag-ad-zone--sidebar {
	min-height: 250px;
}

.wp-mag-ad-zone--content {
	min-height: 60px;
	margin: 2rem 0;
}

.wp-mag-ad-zone--footer {
	max-width: 1200px;
	margin: 0 auto;
	min-height: 90px;
}

.revive-ad-slot {
	width: 100%;
}

.wp-mag-ad-label {
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp-mag-text-muted);
	opacity: 0.6;
}

/* ===================================================
   Single Article Layout
   =================================================== */
.wp-mag-single-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
}

.wp-mag-article {
	min-width: 0;
}

.wp-mag-article-header {
	margin-bottom: 2rem;
}

.wp-mag-article-header .wp-mag-card-category {
	margin-bottom: 0.75rem;
}

.wp-mag-article h1 {
	font-size: 2.15rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
}

.wp-mag-article-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.82rem;
	color: var(--wp-mag-text-muted);
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--wp-mag-border);
	margin-bottom: 2rem;
}

.wp-mag-article-featured {
	border-radius: var(--wp-mag-radius);
	overflow: hidden;
	margin-bottom: 2rem;
}

.wp-mag-article-content {
	line-height: 1.75;
	font-size: 1.05rem;
}

.wp-mag-article-content p {
	margin-bottom: 1.25rem;
}

.wp-mag-article-content h2 {
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.wp-mag-article-content h3 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	font-size: 1.2rem;
}

.wp-mag-article-content blockquote {
	border-left: 3px solid var(--wp-mag-secondary);
	padding-left: 1.25rem;
	margin: 1.5rem 0;
	color: var(--wp-mag-text-muted);
	font-style: italic;
}

/* ===================================================
   Footer
   =================================================== */
.wp-mag-footer {
	background-color: var(--wp-mag-surface);
	border-top: 1px solid var(--wp-mag-border);
	margin-top: 3rem;
	transition: background-color var(--wp-mag-transition);
}

.wp-mag-footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem;
}

.wp-mag-footer-col h3 {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp-mag-primary);
	margin: 0 0 1rem;
}

.wp-mag-footer-col p,
.wp-mag-footer-col li {
	font-size: 0.82rem;
	color: var(--wp-mag-text-muted);
	line-height: 1.7;
}

.wp-mag-footer-col a {
	color: var(--wp-mag-text-muted);
	transition: color var(--wp-mag-transition);
}

.wp-mag-footer-col a:hover {
	color: var(--wp-mag-primary);
}

.wp-mag-footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wp-mag-footer-col li {
	margin-bottom: 0.35rem;
}

.wp-mag-footer-bottom {
	text-align: center;
	padding: 1.15rem 1.5rem;
	border-top: 1px solid var(--wp-mag-border);
	font-size: 0.75rem;
	color: var(--wp-mag-text-muted);
	max-width: 1200px;
	margin: 0 auto;
}

/* ===================================================
   Pagination
   =================================================== */
.wp-mag-pagination {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--wp-mag-border);
}

.wp-mag-pagination .wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.5rem;
	border-radius: 4px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--wp-mag-text-muted);
	transition: all var(--wp-mag-transition);
}

.wp-mag-pagination .wp-block-query-pagination-numbers .page-numbers.current,
.wp-mag-pagination .wp-block-query-pagination-numbers .page-numbers:hover {
	background-color: var(--wp-mag-primary);
	color: #fff;
}

/* ===================================================
   Responsive
   =================================================== */
@media (max-width: 960px) {
	.wp-mag-layout,
	.wp-mag-single-layout {
		grid-template-columns: 1fr;
	}

	.wp-mag-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.wp-mag-hero {
		aspect-ratio: 16 / 9;
	}

	.wp-mag-hero-title {
		font-size: 1.35rem;
	}

	/* Show burger, hide desktop nav */
	.wp-mag-burger {
		display: flex !important;
	}

	nav.wp-mag-nav,
	nav.wp-mag-nav.wp-block-group {
		display: none !important;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: var(--wp-mag-surface);
		border-bottom: 1px solid var(--wp-mag-border);
		box-shadow: 0 8px 24px var(--wp-mag-shadow);
		padding: 1rem 1.5rem;
		z-index: 999;
	}

	nav.wp-mag-nav.wp-mag-nav--open,
	nav.wp-mag-nav.wp-block-group.wp-mag-nav--open {
		display: block !important;
	}

	.wp-mag-nav .wp-block-navigation,
	.wp-mag-nav .wp-block-navigation__container {
		flex-direction: column !important;
		gap: 0 !important;
	}

	.wp-mag-nav .wp-block-navigation-item__content {
		display: block;
		padding: 0.7rem 0;
		font-size: 0.9rem;
		border-bottom: 1px solid var(--wp-mag-border-subtle);
	}

	.wp-mag-nav .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
		border-bottom: none;
	}
}

@media (max-width: 640px) {
	.wp-mag-header-inner {
		padding: 0 1rem;
	}

	.wp-mag-grid {
		grid-template-columns: 1fr;
	}

	.wp-mag-footer-grid {
		grid-template-columns: 1fr;
	}

	.wp-mag-hero-overlay {
		padding: 1.25rem;
	}

	.wp-mag-hero-title {
		font-size: 1.15rem;
	}

	.wp-mag-article h1 {
		font-size: 1.6rem;
	}
}

/* ===================================================
   Skip to Content (Accessibility)
   =================================================== */
.wp-mag-skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 10000;
	background-color: var(--wp-mag-primary);
	color: #fff;
	padding: 0.5rem 1rem;
	border-radius: 0 0 6px 6px;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	transition: top 0.2s ease;
}

.wp-mag-skip-link:focus {
	top: 0;
	color: #fff;
}

.wp-mag-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===================================================
   Search Toggle & Overlay
   =================================================== */
.wp-mag-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border);
	border-radius: 50%;
	color: var(--wp-mag-text-muted);
	cursor: pointer;
	transition: all var(--wp-mag-transition);
}

.wp-mag-search-toggle:hover {
	color: var(--wp-mag-primary);
	border-color: var(--wp-mag-primary);
}

.wp-mag-search-overlay {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--wp-mag-surface);
	border-bottom: 1px solid var(--wp-mag-border);
	box-shadow: 0 8px 24px var(--wp-mag-shadow);
	padding: 1rem 1.5rem;
	z-index: 998;
	animation: wp-mag-slide-down 0.2s ease;
}

.wp-mag-search-overlay[hidden] {
	display: none;
}

@keyframes wp-mag-slide-down {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.wp-mag-search-overlay-inner {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 1200px;
	margin: 0 auto;
}

.wp-mag-search-form {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 0;
	background-color: var(--wp-mag-bg);
	border: 1px solid var(--wp-mag-border);
	border-radius: 6px;
	overflow: hidden;
	transition: border-color var(--wp-mag-transition);
}

.wp-mag-search-form:focus-within {
	border-color: var(--wp-mag-primary);
}

.wp-mag-search-input {
	flex: 1;
	background: none;
	border: none;
	color: var(--wp-mag-text);
	font-family: inherit;
	font-size: 0.9rem;
	padding: 0.6rem 0.85rem;
	outline: none;
}

.wp-mag-search-input::placeholder {
	color: var(--wp-mag-text-muted);
}

.wp-mag-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wp-mag-primary);
	border: none;
	color: #fff;
	padding: 0.6rem 0.85rem;
	cursor: pointer;
	transition: background-color var(--wp-mag-transition);
}

.wp-mag-search-submit:hover {
	background: var(--wp-mag-primary-hover);
}

.wp-mag-search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: none;
	border: 1px solid var(--wp-mag-border);
	border-radius: 50%;
	color: var(--wp-mag-text-muted);
	font-size: 1.2rem;
	cursor: pointer;
	flex-shrink: 0;
	transition: all var(--wp-mag-transition);
}

.wp-mag-search-close:hover {
	color: var(--wp-mag-text);
	border-color: var(--wp-mag-text);
}

/* ===================================================
   Breadcrumbs
   =================================================== */
.wp-mag-breadcrumbs {
	font-size: 0.75rem;
	color: var(--wp-mag-text-muted);
	margin-bottom: 1rem;
}

.wp-mag-breadcrumb-list a {
	color: var(--wp-mag-text-muted);
	transition: color var(--wp-mag-transition);
}

.wp-mag-breadcrumb-list a:hover {
	color: var(--wp-mag-primary);
}

.wp-mag-breadcrumb-sep {
	margin: 0 0.4rem;
	opacity: 0.4;
}

.wp-mag-breadcrumb-list [aria-current="page"] {
	color: var(--wp-mag-text);
}

/* ===================================================
   Reading Time Badge
   =================================================== */
.wp-mag-reading-time {
	font-size: 0.82rem;
	color: var(--wp-mag-text-muted);
}

/* ===================================================
   Related Posts
   =================================================== */
.wp-mag-related {
	margin-top: 2.5rem;
}

.wp-mag-related-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp-mag-primary);
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--wp-mag-primary);
}

.wp-mag-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.wp-mag-related-card {
	display: block;
	background-color: var(--wp-mag-surface);
	border: 1px solid var(--wp-mag-border-subtle);
	border-radius: var(--wp-mag-radius);
	overflow: hidden;
	text-decoration: none;
	transition: transform var(--wp-mag-transition), box-shadow var(--wp-mag-transition);
}

.wp-mag-related-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px var(--wp-mag-shadow);
}

.wp-mag-related-card-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.wp-mag-related-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.wp-mag-related-card:hover .wp-mag-related-card-image img {
	transform: scale(1.04);
}

.wp-mag-related-card-body {
	padding: 0.75rem 0.85rem;
}

.wp-mag-related-card-title {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--wp-mag-text);
	margin-bottom: 0.3rem;
}

.wp-mag-related-card:hover .wp-mag-related-card-title {
	color: var(--wp-mag-primary);
}

.wp-mag-related-card-meta {
	display: block;
	font-size: 0.7rem;
	color: var(--wp-mag-text-muted);
}

/* ===================================================
   404 Page
   =================================================== */
.wp-mag-404-code {
	color: var(--wp-mag-primary);
	opacity: 0.3;
}

/* ===================================================
   Archive Header
   =================================================== */
.wp-mag-archive-header .wp-block-query-title {
	margin: 0;
}

@media (max-width: 960px) {
	.wp-mag-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.wp-mag-related-grid {
		grid-template-columns: 1fr;
	}
}

/* ===================================================
   Cookie Consent - Theme Integration (orestbida v3)
   =================================================== */
#cc-main {
	--cc-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--cc-modal-border-radius: var(--wp-mag-radius);
	--cc-btn-border-radius: 6px;
	--cc-modal-transition-duration: var(--wp-mag-transition);
	--cc-bg: var(--wp-mag-surface);
	--cc-primary-color: var(--wp-mag-text);
	--cc-secondary-color: var(--wp-mag-text-muted);
	--cc-btn-primary-bg: var(--wp-mag-primary);
	--cc-btn-primary-color: #fff;
	--cc-btn-primary-border-color: var(--wp-mag-primary);
	--cc-btn-primary-hover-bg: var(--wp-mag-primary-hover);
	--cc-btn-primary-hover-color: #fff;
	--cc-btn-primary-hover-border-color: var(--wp-mag-primary-hover);
	--cc-btn-secondary-bg: var(--wp-mag-bg);
	--cc-btn-secondary-color: var(--wp-mag-text);
	--cc-btn-secondary-border-color: var(--wp-mag-border);
	--cc-btn-secondary-hover-bg: var(--wp-mag-surface-hover);
	--cc-btn-secondary-hover-color: var(--wp-mag-text);
	--cc-btn-secondary-hover-border-color: var(--wp-mag-border);
	--cc-separator-border-color: var(--wp-mag-border);
	--cc-toggle-on-bg: var(--wp-mag-primary);
	--cc-toggle-off-bg: var(--wp-mag-border);
	--cc-toggle-on-knob-bg: #fff;
	--cc-toggle-off-knob-bg: var(--wp-mag-text-muted);
	--cc-toggle-readonly-bg: var(--wp-mag-border);
	--cc-toggle-readonly-knob-bg: var(--wp-mag-text-muted);
	--cc-cookie-category-block-bg: var(--wp-mag-bg);
	--cc-cookie-category-block-border: var(--wp-mag-border);
	--cc-cookie-category-block-hover-bg: var(--wp-mag-surface-hover);
	--cc-cookie-category-block-hover-border: var(--wp-mag-border);
	--cc-cookie-category-expanded-block-bg: transparent;
	--cc-cookie-category-expanded-block-hover-bg: var(--wp-mag-bg);
	--cc-overlay-bg: rgba(0, 0, 0, 0.6);
	--cc-footer-bg: var(--wp-mag-bg);
	--cc-footer-color: var(--wp-mag-text-muted);
	--cc-footer-border-color: var(--wp-mag-border);
	--cc-link-color: var(--wp-mag-primary);
}

/* Cookie consent dark mode override — uses same vars, no extra rules needed.
   Class cc--darkmode is synced automatically via JS MutationObserver. */
html.cc--darkmode #cc-main {
	--cc-bg: var(--wp-mag-surface);
	--cc-primary-color: var(--wp-mag-text);
	--cc-secondary-color: var(--wp-mag-text-muted);
}

/* Footer link in consent modal */
#cc-main .cm__footer a {
	color: var(--wp-mag-primary);
}

/* Preferences modal cookie table */
#cc-main .pm__table td,
#cc-main .pm__table th {
	font-size: 0.78rem;
	border-color: var(--wp-mag-border);
}

/* Settings button in footer */
.wp-mag-cookie-settings {
	cursor: pointer;
	background: none;
	border: none;
	color: var(--wp-mag-text-muted);
	font-family: inherit;
	font-size: 0.82rem;
	padding: 0;
	transition: color var(--wp-mag-transition);
}

.wp-mag-cookie-settings:hover {
	color: var(--wp-mag-primary);
}
