/* ==========================================================================
   Mathi Editorial — klasická téma
   Farby a fonty prichádzajú ako CSS premenné z Customizeru (pozri functions.php
   -> wp_head -> #mathi-customizer-vars). Tento súbor rieši layout a komponenty.
   ========================================================================== */

* { box-sizing: border-box; }

:root {
	--mathi-page-bg: #ffffff;
	--mathi-page-text: var(--mathi-black, #111111);
	--mathi-page-border: var(--mathi-black, #111111);
	--mathi-page-surface: #ffffff;
}
html[data-theme="dark"] {
	--mathi-page-bg: #121212;
	--mathi-page-text: #f0f0f0;
	--mathi-page-border: #f0f0f0;
	--mathi-page-surface: #1c1c1c;
}
html {
	transition: background-color 0.2s ease;
}

body {
	margin: 0;
	font-family: var(--mathi-font-body, 'Inter', sans-serif);
	color: var(--mathi-page-text);
	background: var(--mathi-page-bg);
	line-height: 1.5;
	transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1.05;
	margin: 0 0 0.5rem;
}

a {
	color: var(--mathi-page-text);
	text-decoration: none;
}
a:hover {
	color: var(--mathi-blue, #2e2be0);
}

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

.text-center { text-align: center; }

.btn {
	display: inline-block;
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	border-radius: 999px;
	border: 2px solid var(--mathi-black, #111111);
	padding: 0.9rem 2rem;
	cursor: pointer;
}
.btn--primary {
	background: var(--mathi-yellow, #f5e617);
	color: var(--mathi-black, #111111);
}
.btn--primary:hover {
	background: var(--mathi-black, #111111);
	color: var(--mathi-yellow, #f5e617);
}
.btn--dark {
	background: var(--mathi-black, #111111);
	color: var(--mathi-yellow, #f5e617);
}
.btn--dark:hover {
	background: var(--mathi-yellow, #f5e617);
	color: var(--mathi-black, #111111);
}

/* --- Hlavička --- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	background: var(--mathi-black, #111111);
	color: #ffffff;
	padding: 1rem 1.5rem;
}
.site-header__title {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 1.5rem;
	color: #ffffff;
}
.site-header__nav {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.site-header__menu {
	list-style: none;
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}
.site-header__menu a {
	color: #ffffff;
	font-weight: 600;
}
.site-header__menu a:hover {
	color: var(--mathi-yellow, #f5e617);
}
.site-header__menu-hint {
	color: var(--mathi-yellow, #f5e617) !important;
	border: 1px dashed var(--mathi-yellow, #f5e617);
	padding: 0.4rem 0.8rem;
	border-radius: 6px;
	font-size: 0.875rem;
}

/* --- Progress bar čítania --- */
#mathi-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 4px;
	width: 0%;
	background: var(--mathi-yellow, #f5e617);
	z-index: 9999;
	display: none;
	transition: width 0.1s ease-out;
}
.single-post #mathi-reading-progress { display: block; }

/* --- Prepínač tmavého režimu --- */
.theme-toggle {
	background: transparent;
	border: 2px solid #ffffff;
	color: #ffffff;
	border-radius: 999px;
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0;
}
.theme-toggle:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* --- Pätička --- */
.site-footer {
	background: var(--mathi-yellow, #f5e617);
	color: var(--mathi-black, #111111);
	padding: 4rem 1.5rem 3rem;
	text-align: center;
}
.site-footer__inner {
	max-width: 700px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}
.site-footer__wordmark {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	font-size: clamp(3rem, 10vw, 6.5rem);
	line-height: 0.9;
	margin: 0;
}
.site-footer__tagline { font-size: 1.75rem; margin: 0; }
.site-footer__menu {
	list-style: none;
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0;
}
.site-footer__copy { font-size: 0.875rem; margin: 1rem 0 0; }

/* --- Hero sekcia --- */
.hero-featured {
	position: relative;
	overflow: hidden;
}
.hero-featured img {
	width: 100%;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	display: block;
}
.hero-featured__caption {
	background: var(--mathi-black, #111111);
	color: #ffffff;
	padding: 1.25rem 1.5rem;
}
.hero-featured__caption a { color: #ffffff; }
.hero-featured__caption a:hover { color: var(--mathi-yellow, #f5e617); }
.hero-featured__caption h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.hero-featured__meta {
	display: flex;
	gap: 0.5rem;
	font-size: 0.875rem;
	margin-top: 0.5rem;
}
@media (min-width: 782px) {
	.hero-featured__caption {
		position: absolute;
		left: 0;
		bottom: 2rem;
		max-width: 420px;
	}
}

/* --- Ticker --- */
.site-ticker {
	overflow: hidden;
	white-space: nowrap;
	background: var(--mathi-black, #111111);
	color: var(--mathi-yellow, #f5e617);
	padding: 0.5rem 0;
}
.site-ticker__track {
	display: flex;
	width: max-content;
	margin: 0;
	animation: mathi-ticker-scroll 22s linear infinite;
}
.site-ticker__set {
	display: flex;
	flex-shrink: 0;
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-size: 1.75rem;
}
.site-ticker__set span { padding: 0 0.4em; }
@keyframes mathi-ticker-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.site-ticker__track { animation: none; }
}

/* --- Filter kategórií --- */
.category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	margin: 2rem 0 1rem;
	padding: 0;
}
.category-pills a {
	display: inline-block;
	border: 2px solid var(--mathi-page-border, #111111);
	border-radius: 999px;
	padding: 0.5rem 1.25rem;
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 0.75rem;
}
.category-pills a:hover {
	background: var(--mathi-page-border, #111111);
	color: var(--mathi-page-bg, #ffffff);
}

/* --- Štítok kategórie na karte/článku --- */
.post-category-tag {
	display: inline-block;
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 0.75rem;
	padding: 0.3em 0.75em;
	background: var(--mathi-category-color, var(--mathi-yellow, #f5e617));
	color: var(--mathi-black, #111111);
	margin-bottom: 0.5rem;
}
.post-category-tag a { color: inherit; }

/* --- Mriežka článkov --- */
.article-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	margin: 2rem 0 3rem;
}
@media (max-width: 900px) {
	.article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.article-grid { grid-template-columns: 1fr; }
}
.mathi-post-card { transition: transform 0.15s ease; }
.mathi-post-card:hover { transform: translateY(-4px); }
.mathi-post-card img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}
.mathi-post-card h3 { font-size: 1.125rem; margin: 0.5rem 0 0.25rem; }
.mathi-post-card__meta {
	display: flex;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--mathi-page-text, #111111);
}

/* --- Stránka/archív nadpisy --- */
.page-heading, .archive-heading, .author-heading {
	padding: 2.5rem 1.5rem 1rem;
}
.archive-heading, .author-heading {
	background: var(--mathi-black, #111111);
	color: #ffffff;
}
.author-heading {
	background: var(--mathi-yellow, #f5e617);
	color: var(--mathi-black, #111111);
	display: flex;
	align-items: center;
	gap: 1rem;
}
.author-heading img { border-radius: 999px; }

/* --- Jednotlivý článok --- */
.article-heading { padding: 2.5rem 1.5rem 1rem; max-width: 800px; margin: 0 auto; }
.article-heading__meta { display: flex; gap: 0.5rem; font-size: 0.875rem; margin-top: 0.5rem; }
.article-featured-image img { width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block; }
.article-content { max-width: 800px; margin: 2rem auto 0; }
.article-content img { max-width: 100%; height: auto; }
.article-tags { max-width: 800px; margin: 1.5rem auto; font-size: 0.875rem; }
.article-comments { max-width: 800px; margin: 2rem auto 3rem; }

/* --- Autorský box --- */
.author-box {
	max-width: 800px;
	margin: 2rem auto;
	border: 2px solid var(--mathi-page-border, #111111);
	padding: 1.5rem;
	display: flex;
	gap: 1rem;
	align-items: center;
}
.author-box img { border-radius: 999px; }
.author-box__label { font-size: 0.875rem; margin: 0; }
.author-box__name {
	display: block;
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
}
.author-box__bio { font-size: 0.875rem; margin: 0.25rem 0 0; }

/* --- 404 --- */
.error-404-page {
	text-align: center;
	padding: 5rem 1.5rem;
}
.error-404-page__code {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-size: clamp(3rem, 10vw, 6.5rem);
	margin: 0;
}
.error-404-page__text { font-size: 1.75rem; margin: 0 0 1.5rem; }

/* --- Reklamné bannery --- */
.mathi-ad-slot {
	margin: 2.5rem auto;
	text-align: center;
	position: relative;
}
.mathi-ad-slot__label {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--mathi-page-text, #111111);
	opacity: 0.5;
	margin-bottom: 0.4rem;
}
.mathi-ad-slot img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

/* --- Obsah článku (Table of Contents) --- */
.table-of-contents {
	max-width: 800px;
	margin: 0 auto 2rem;
	border: 2px solid var(--mathi-page-border, #111111);
	border-radius: 6px;
	padding: 1.25rem 1.5rem;
}
.table-of-contents__title {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	font-size: 0.9rem;
	margin: 0 0 0.75rem;
}
.table-of-contents ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.table-of-contents li { margin: 0.35rem 0; }
.table-of-contents li.table-of-contents__sub { margin-left: 1.25rem; font-size: 0.9em; }
.table-of-contents a { text-decoration: underline; text-underline-offset: 2px; }
.table-of-contents a:hover { color: var(--mathi-blue, #2e2be0); }

/* --- 404 návrhy --- */
.error-404-page__suggestion-title {
	font-family: var(--mathi-font-heading, 'Archivo Black', sans-serif);
	font-weight: 900;
	text-transform: uppercase;
	text-align: center;
	margin-bottom: 1rem;
}

/* --- Pagination --- */
.pagination {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin: 2rem 0;
}
.pagination .page-numbers {
	border: 2px solid var(--mathi-page-border, #111111);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
}
.pagination .page-numbers.current {
	background: var(--mathi-page-border, #111111);
	color: var(--mathi-page-bg, #ffffff);
}
