/*
Theme Name: Portal-EP 1.14.2
Theme URI: https://fantasy.uniza.sk/
Author: prof. Ing. Radovan Madleňák, PhD.
Description: Portal-EP – redakčná téma pre Informačný portál predmetu Elektronické podnikanie. Určená výhradne na publikovanie tematických študentských článkov: zvýraznený najnovší článok, mriežka článkov, filtrovanie podľa predmetu (kategórie), automatický obsah článku, čas čítania, zvýraznený zoznam zdrojov, súvisiace články a podpora profilov BuddyPress.
Version: 1.14.2
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ep-portal
Tags: blog, news, education, one-column, grid-layout, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready
*/

/* ==========================================================================
   1. Premenné
   ========================================================================== */
:root {
	--ep-accent: #0b5f73;
	--ep-accent-dark: #083f4d;
	--ep-accent-soft: #e6f1f3;
	--ep-ink: #17212b;
	--ep-ink-2: #3d4a57;
	--ep-muted: #66727f;
	--ep-line: #dfe4e8;
	--ep-bg: #f6f7f8;
	--ep-surface: #ffffff;
	--ep-radius: 10px;
	--ep-radius-sm: 6px;
	--ep-shadow: 0 1px 2px rgba(23, 33, 43, .06), 0 4px 16px rgba(23, 33, 43, .06);
	--ep-shadow-hover: 0 2px 4px rgba(23, 33, 43, .08), 0 12px 32px rgba(23, 33, 43, .10);
	--ep-wrap: 1200px;
	--ep-measure: 720px;
	--ep-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ep-font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--ep-font-prose: var(--ep-font);
	--ep-btn: var(--ep-accent);
	--ep-btn-hover: var(--ep-accent-dark);
	--ep-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ==========================================================================
   2. Základ
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
	margin: 0;
	font-family: var(--ep-font);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ep-ink);
	background: var(--ep-bg);
	-webkit-font-smoothing: antialiased;
}

img, video, iframe, svg { max-width: 100%; height: auto; }
img { display: block; }
figure { margin: 0; }

a { color: var(--ep-accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ep-accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
	outline: 3px solid var(--ep-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 0 0 .5em; color: var(--ep-ink); font-weight: 700; letter-spacing: -.01em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--ep-surface); clip: auto !important; clip-path: none; color: var(--ep-ink);
	display: block; font-weight: 600; height: auto; left: 8px; padding: 12px 20px; top: 8px; width: auto; z-index: 100000;
	box-shadow: var(--ep-shadow-hover); border-radius: var(--ep-radius-sm);
}

.ep-wrap { width: 100%; max-width: var(--ep-wrap); margin: 0 auto; padding: 0 20px; }
.ep-main { padding: 32px 0 64px; min-height: 60vh; }

/* ==========================================================================
   3. Hlavička
   ========================================================================== */
.ep-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--ep-accent); z-index: 1000; }
body.admin-bar .ep-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ep-progress { top: 46px; } }

.ep-header {
	position: sticky; top: 0; z-index: 900;
	background: rgba(255, 255, 255, .94);
	background: color-mix(in srgb, var(--ep-surface) 92%, transparent);
	backdrop-filter: saturate(160%) blur(8px);
	-webkit-backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--ep-line);
}
body.admin-bar .ep-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ep-header { top: 0; } }

.ep-header__inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.ep-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ep-ink); min-width: 0; }
.ep-brand:hover { color: var(--ep-ink); }
.ep-brand .custom-logo { max-height: 44px; width: auto; }
.ep-brand__mark {
	flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9px;
	display: grid; place-items: center;
	background: var(--ep-btn); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.ep-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ep-brand__kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ep-muted); font-weight: 600; }
.ep-brand__title { font-size: 1.05rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ep-nav { margin-left: auto; }
.ep-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.ep-nav a {
	display: block; padding: 8px 12px; border-radius: var(--ep-radius-sm);
	color: var(--ep-ink-2); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.ep-nav a:hover, .ep-nav .current-menu-item > a, .ep-nav .current-cat > a, .ep-nav .current_page_item > a { background: var(--ep-accent-soft); color: var(--ep-accent-dark); }
.ep-nav .sub-menu { display: none; }

.ep-header__actions { display: flex; align-items: center; gap: 6px; }
.ep-iconbtn {
	display: inline-grid; place-items: center; width: 40px; height: 40px;
	border: 1px solid transparent; border-radius: var(--ep-radius-sm);
	background: transparent; color: var(--ep-ink-2); cursor: pointer; padding: 0; text-decoration: none;
}
.ep-iconbtn:hover { background: var(--ep-accent-soft); color: var(--ep-accent-dark); }
.ep-iconbtn svg { width: 20px; height: 20px; }
.ep-account { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--ep-line); color: var(--ep-ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; }
.ep-account:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }
.ep-account img { width: 28px; height: 28px; border-radius: 50%; }
.ep-login { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .9rem; font-weight: 600; padding: 8px 14px; border-radius: var(--ep-radius-sm); background: var(--ep-btn); color: #fff; text-decoration: none; }
.ep-login:hover { background: var(--ep-btn-hover); color: #fff; }
.ep-login svg { width: 18px; height: 18px; }
@media (max-width: 600px) { .ep-login span:last-child { display: none; } .ep-login { padding: 0; width: 40px; height: 40px; justify-content: center; } }

.ep-menu-toggle { display: none; }

.ep-search-panel { border-top: 1px solid var(--ep-line); background: var(--ep-surface); padding: 16px 0; }
.ep-search-panel[hidden] { display: none; }

@media (max-width: 900px) {
	.ep-menu-toggle { display: inline-grid; }
	.ep-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ep-surface); border-bottom: 1px solid var(--ep-line); box-shadow: var(--ep-shadow); display: none; margin: 0; }
	.ep-nav.is-open { display: block; }
	.ep-nav ul { flex-direction: column; align-items: stretch; padding: 10px 20px 16px; }
	.ep-nav a { padding: 12px; }
	.ep-header__actions { margin-left: auto; }
	.ep-account span { display: none; }
	.ep-account { padding: 4px; }
}
@media (max-width: 520px) { .ep-brand__kicker { display: none; } .ep-brand__title { font-size: .95rem; } }

/* ==========================================================================
   4. Vyhľadávanie
   ========================================================================== */
.ep-searchform { display: flex; gap: 8px; max-width: 640px; }
.ep-searchform input[type="search"] {
	flex: 1; min-width: 0; font: inherit; padding: 11px 14px;
	border: 1px solid var(--ep-line); border-radius: var(--ep-radius-sm); background: var(--ep-surface); color: var(--ep-ink);
}
.ep-searchform input[type="search"]:focus { border-color: var(--ep-accent); outline: none; box-shadow: 0 0 0 3px var(--ep-accent-soft); }

.ep-btn, .ep-searchform button, input[type="submit"], button[type="submit"] {
	font: inherit; font-weight: 600; cursor: pointer;
	padding: 11px 18px; border: 0; border-radius: var(--ep-radius-sm);
	background: var(--ep-btn); color: #fff;
}
.ep-btn:hover, .ep-searchform button:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: var(--ep-btn-hover); color: #fff; }

/* ==========================================================================
   5. Úvod a filtre
   ========================================================================== */
.ep-intro { padding: 40px 0 8px; }
.ep-intro__eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ep-accent); margin-bottom: 10px; }
.ep-intro__title { font-family: var(--ep-font-serif); font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 700; max-width: 22ch; margin-bottom: 12px; letter-spacing: -.015em; }
.ep-intro__text { color: var(--ep-ink-2); font-size: 1.08rem; max-width: 62ch; margin: 0; }
.ep-intro__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--ep-muted); font-size: .9rem; }
.ep-intro__stats strong { color: var(--ep-ink); }

.ep-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 28px; padding: 0; list-style: none; }
.ep-chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 14px; border-radius: 999px;
	border: 1px solid var(--ep-line); background: var(--ep-surface);
	color: var(--ep-ink-2); text-decoration: none; font-size: .88rem; font-weight: 600; line-height: 1.3;
}
.ep-chip:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }
.ep-chip.is-active { background: var(--ep-btn); border-color: var(--ep-btn); color: #fff; }
.ep-chip__count { font-size: .76rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--ep-bg); color: var(--ep-muted); }
.ep-chip.is-active .ep-chip__count { background: rgba(255,255,255,.2); color: #fff; }

.ep-filterbox { margin: 26px 0 28px; padding: 16px 18px; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); display: flex; flex-direction: column; gap: 10px; }
.ep-filter-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; }
.ep-filter-row__label { padding-top: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ep-muted); }
.ep-filterbox .ep-filters { margin: 0; }
.ep-filter-row--year { padding-bottom: 10px; border-bottom: 1px solid var(--ep-line); }
.ep-filterbox--years .ep-filter-row--year { padding-bottom: 0; border-bottom: 0; }
.ep-chip__tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ep-muted) 18%, transparent); }
.ep-chip.is-active .ep-chip__tag { background: rgba(255,255,255,.2); }
.ep-year-notice { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--ep-radius-sm); background: #fcf9e8; border-left: 4px solid #dba617; color: #50440a; font-size: .92rem; }
html[data-ep-theme="dark"] .ep-year-notice { background: #2a2610; color: #efe3a6; }
.ep-year-notice a { font-weight: 650; margin-left: 6px; }
.ep-card__year { background: color-mix(in srgb, var(--ep-muted) 15%, transparent); color: var(--ep-ink-2); padding: 1px 7px; border-radius: 999px; }
.ep-chip__x { margin-left: 2px; font-size: 1rem; line-height: 1; opacity: .85; }
.ep-filter-result { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 10px; border-top: 1px solid var(--ep-line); font-size: .9rem; color: var(--ep-ink-2); }
.ep-filter-result a { font-weight: 650; }
@media (max-width: 600px) { .ep-filter-row { grid-template-columns: 1fr; gap: 4px; } .ep-filter-row__label { padding-top: 0; } }
.ep-labels { position: relative; z-index: 2; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; align-self: flex-start; }
.ep-labels__sep { color: var(--ep-muted); font-size: .8rem; }
.ep-card__group { background: var(--ep-accent-soft); padding: 1px 7px; border-radius: 999px; letter-spacing: .03em; }
.ep-article-head__cats .ep-labels { justify-content: center; }
.ep-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 40px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--ep-line); }
.ep-section-title h2 { font-size: 1.15rem; margin: 0; }
.ep-section-title span { color: var(--ep-muted); font-size: .9rem; }

/* ==========================================================================
   6. Karty článkov
   ========================================================================== */
.ep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1000px) { .ep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ep-grid { grid-template-columns: 1fr; } }

.ep-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius);
	overflow: hidden; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.ep-card:hover { box-shadow: var(--ep-shadow-hover); transform: translateY(-2px); border-color: color-mix(in srgb, var(--ep-accent) 30%, var(--ep-line)); }
.ep-card:focus-within { box-shadow: var(--ep-shadow-hover); }

.ep-card__media { aspect-ratio: 16 / 9; background: var(--ep-accent-soft); overflow: hidden; }
.ep-card__media img { width: 100%; height: 100%; object-fit: cover; }

.ep-placeholder {
	width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 18px;
	color: #fff; position: relative; overflow: hidden;
	background: linear-gradient(135deg, color-mix(in srgb, var(--ep-btn) 82%, #000), color-mix(in srgb, var(--ep-btn) 80%, #fff));
}
.ep-placeholder, .ep-initials { --ep-rot: 0deg; }
.ep-placeholder::before, .ep-placeholder::after { pointer-events: none; }
.ep-placeholder::before {
	content: ""; position: absolute; inset: 0; opacity: .14;
	background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
	background-size: 18px 18px;
}
.ep-placeholder::after {
	content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -12%; top: -30%;
	border-radius: 50%; border: 28px solid rgba(255,255,255,.10);
}
.ep-placeholder__label { position: relative; z-index: 1; font-family: var(--ep-font-serif); font-size: 1.05rem; font-weight: 700; line-height: 1.3; max-width: 85%; text-shadow: 0 1px 2px rgba(0,0,0,.2); }

.ep-card__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.ep-card__cat { align-self: flex-start; position: relative; z-index: 2; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ep-accent); text-decoration: none; }
.ep-card__cat:hover { text-decoration: underline; }
.ep-card__title { font-size: 1.12rem; line-height: 1.35; margin: 0; }
.ep-card__title a { color: var(--ep-ink); text-decoration: none; }
.ep-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ep-card__title a:hover { color: var(--ep-accent-dark); }
.ep-card__excerpt { color: var(--ep-ink-2); font-size: .94rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ep-card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ep-line); }

.ep-byline { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--ep-muted); min-width: 0; }
.ep-byline img { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; }
.ep-avatars { display: inline-flex; flex: 0 0 auto; }
.ep-avatars > * + * { margin-left: -10px; }
.ep-avatars img, .ep-avatars .ep-initials { box-shadow: 0 0 0 2px var(--ep-surface); border-radius: 50%; }
.ep-authorbox .ep-avatars > * { box-shadow: 0 0 0 3px var(--ep-accent-soft); }
.ep-initials {
	display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%;
	background: linear-gradient(135deg, color-mix(in srgb, var(--ep-btn) 88%, #000), color-mix(in srgb, var(--ep-btn) 78%, #fff));
	color: #fff; font-weight: 700; letter-spacing: .02em; line-height: 1; user-select: none;
}
.ep-initials--anon { background: var(--ep-accent-soft); color: var(--ep-accent); box-shadow: none !important; }
.ep-initials--anon svg { width: 55%; height: 55%; }
.ep-byline__anon { font-weight: 600; color: var(--ep-ink-2); }
.ep-author-head .ep-initials { font-size: 2rem !important; }
.ep-byline__names { color: var(--ep-ink); }
.ep-byline__name { color: var(--ep-ink); font-weight: 650; text-decoration: none; position: relative; z-index: 2; }
.ep-byline__name:hover { color: var(--ep-accent-dark); text-decoration: underline; }
.ep-byline__meta { display: flex; flex-wrap: wrap; gap: 0 6px; }
.ep-byline__text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ep-dot::before { content: "·"; margin-right: 6px; }

/* Zvýraznený článok */
.ep-featured {
	display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
	background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius);
	overflow: hidden; position: relative; box-shadow: var(--ep-shadow);
}
.ep-featured .ep-card__media { aspect-ratio: auto; min-height: 340px; height: 100%; }
.ep-featured .ep-placeholder__label { font-size: 1.5rem; }
.ep-featured__body { padding: 36px 40px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.ep-featured__badge { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--ep-accent-soft); color: var(--ep-accent-dark); }
.ep-featured .ep-card__title { font-family: var(--ep-font-serif); font-size: clamp(1.45rem, 1rem + 1.4vw, 2rem); line-height: 1.2; }
.ep-featured .ep-card__excerpt { font-size: 1.02rem; -webkit-line-clamp: 4; }
.ep-featured .ep-card__foot { border-top: 0; padding-top: 6px; }
.ep-featured:hover { box-shadow: var(--ep-shadow-hover); }
@media (max-width: 860px) {
	.ep-featured { grid-template-columns: 1fr; }
	.ep-featured .ep-card__media { min-height: 0; aspect-ratio: 16 / 9; }
	.ep-featured__body { padding: 24px; }
}

/* ==========================================================================
   7. Stránkovanie
   ========================================================================== */
.ep-pagination { margin-top: 44px; }
.ep-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ep-pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center;
	border: 1px solid var(--ep-line); border-radius: var(--ep-radius-sm); background: var(--ep-surface);
	color: var(--ep-ink-2); text-decoration: none; font-weight: 600;
}
.ep-pagination .page-numbers:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }
.ep-pagination .page-numbers.current { background: var(--ep-btn); border-color: var(--ep-btn); color: #fff; }
.ep-pagination .page-numbers.dots { border: 0; background: none; }

/* ==========================================================================
   8. Archívy, autor, vyhľadávanie, 404
   ========================================================================== */
.ep-archive-head { padding: 24px 0 4px; }
.ep-archive-head__label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ep-accent); }
.ep-archive-head h1 { font-family: var(--ep-font-serif); font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); margin: 6px 0 8px; }
.ep-archive-head__desc { color: var(--ep-ink-2); max-width: 70ch; }
.ep-archive-head__desc p { margin: 0 0 .6em; }
.ep-archive-head__count { color: var(--ep-muted); font-size: .92rem; }

.ep-author-head { display: flex; gap: 24px; align-items: center; padding: 24px 0 8px; }
.ep-author-head img { width: 96px; height: 96px; border-radius: 50%; }
.ep-author-head h1 { margin: 4px 0; font-family: var(--ep-font-serif); }

.ep-empty { text-align: center; padding: 64px 20px; background: var(--ep-surface); border: 1px dashed var(--ep-line); border-radius: var(--ep-radius); }
.ep-empty h1, .ep-empty h2 { font-family: var(--ep-font-serif); }
.ep-empty p { color: var(--ep-ink-2); }
.ep-empty .ep-searchform { margin: 20px auto 0; }
.ep-404-code { font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--ep-accent); letter-spacing: -.04em; margin-bottom: 8px; }

/* ==========================================================================
   9. Detail článku
   ========================================================================== */
.ep-article-head { max-width: 860px; margin: 8px auto 28px; text-align: center; }
.ep-article-head .ep-card__cat { align-self: center; display: inline-block; margin-bottom: 14px; }
.ep-article-head__cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.ep-article-title { font-family: var(--ep-font-serif); font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 18px; }
.ep-article-lead { font-size: 1.15rem; color: var(--ep-ink-2); max-width: 64ch; margin: 0 auto 22px; }
.ep-article-head .ep-byline { justify-content: center; font-size: .92rem; }
.ep-article-head .ep-byline img { width: 44px; height: 44px; }
.ep-article-head .ep-byline__text { text-align: left; }

.ep-article-media { max-width: 1040px; margin: 0 auto 36px; border-radius: var(--ep-radius); overflow: hidden; }
.ep-article-media img { width: 100%; }
.ep-article-media figcaption { font-size: .85rem; color: var(--ep-muted); padding: 8px 4px 0; }

.ep-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--ep-measure)) minmax(0, 1fr); gap: 40px; align-items: start; }
.ep-article-layout > .ep-content-col { grid-column: 2; min-width: 0; }
.ep-toc-col { grid-column: 3; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
@media (max-width: 1180px) {
	.ep-article-layout { grid-template-columns: minmax(0, 1fr); }
	.ep-article-layout > .ep-content-col { grid-column: 1; max-width: var(--ep-measure); margin: 0 auto; width: 100%; }
	.ep-toc-col { display: none; }
}

.ep-article-body {
	background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius);
	padding: clamp(22px, 4vw, 48px);
}

.ep-toc { font-size: .88rem; border-left: 2px solid var(--ep-line); padding-left: 14px; }
.ep-toc__title { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ep-muted); margin: 0 0 10px; }
.ep-toc ol { list-style: none; margin: 0; padding: 0; }
.ep-toc li { margin: 0; }
.ep-toc li.ep-toc__h3 { padding-left: 12px; }
.ep-toc a { display: block; padding: 4px 0; color: var(--ep-ink-2); text-decoration: none; line-height: 1.4; }
.ep-toc a:hover { color: var(--ep-accent-dark); }
.ep-toc a.is-active { color: var(--ep-accent); font-weight: 650; }

.ep-toc-inline { margin: 0 0 28px; background: var(--ep-bg); border: 1px solid var(--ep-line); border-radius: var(--ep-radius-sm); }
.ep-toc-inline summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: .92rem; }
.ep-toc-inline .ep-toc { border-left: 0; padding: 0 16px 14px; }
@media (min-width: 1181px) { .ep-toc-inline { display: none; } }

/* Typografia obsahu */
.ep-prose { font-family: var(--ep-font-prose); font-size: 1.075rem; line-height: 1.75; color: var(--ep-ink); overflow-wrap: break-word; }
.ep-prose > * { margin-top: 0; margin-bottom: 1.15em; }
.ep-prose > *:last-child { margin-bottom: 0; }
.ep-prose h2 { font-size: 1.55rem; margin-top: 2em; padding-top: .2em; }
.ep-prose h3 { font-size: 1.25rem; margin-top: 1.7em; }
.ep-prose h4 { font-size: 1.08rem; margin-top: 1.5em; }
.ep-prose > h2:first-child, .ep-prose > h3:first-child { margin-top: 0; }
.ep-prose ul, .ep-prose ol { padding-left: 1.4em; }
.ep-prose li { margin-bottom: .4em; }
.ep-prose li::marker { color: var(--ep-accent); }
.ep-prose a { overflow-wrap: anywhere; }
.ep-prose strong { font-weight: 700; }
.ep-prose blockquote, .ep-prose .wp-block-quote {
	margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--ep-accent);
	font-family: var(--ep-font-serif); font-size: 1.18rem; color: var(--ep-ink-2);
}
.ep-prose blockquote cite { display: block; margin-top: 8px; font-family: var(--ep-font); font-size: .85rem; font-style: normal; color: var(--ep-muted); }
.ep-prose .wp-block-pullquote { border-top: 3px solid var(--ep-accent); border-bottom: 3px solid var(--ep-accent); padding: 1.5em 0; text-align: center; }
.ep-prose img { border-radius: var(--ep-radius-sm); height: auto; }
.ep-prose figure { margin-bottom: 1.5em; }
.ep-prose figcaption, .ep-prose .wp-element-caption, .ep-prose .wp-caption-text { font-size: .86rem; color: var(--ep-muted); text-align: center; margin-top: 8px; line-height: 1.5; }
.ep-prose .wp-caption { max-width: 100%; }
.ep-prose hr { border: 0; border-top: 1px solid var(--ep-line); margin: 2.2em 0; }
.ep-prose code { font-family: var(--ep-font-mono); font-size: .9em; background: var(--ep-bg); padding: .1em .35em; border-radius: 4px; }
.ep-prose pre { font-family: var(--ep-font-mono); font-size: .9rem; background: #0f1720; color: #e6edf3; padding: 18px; border-radius: var(--ep-radius-sm); overflow-x: auto; line-height: 1.55; }
.ep-prose pre code { background: none; padding: 0; color: inherit; }
.ep-prose table { width: 100%; border-collapse: collapse; font-size: .94rem; display: block; overflow-x: auto; }
.ep-prose .wp-block-table table { display: table; }
.ep-prose .wp-block-table { overflow-x: auto; }
.ep-prose th, .ep-prose td { border: 1px solid var(--ep-line); padding: 9px 12px; text-align: left; vertical-align: top; }
.ep-prose thead th, .ep-prose tr:first-child th { background: var(--ep-bg); font-weight: 700; }
.ep-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.ep-prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.ep-prose .aligncenter { margin-left: auto; margin-right: auto; }
.ep-prose::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .ep-prose .alignleft, .ep-prose .alignright { float: none; margin: 0 0 1em; max-width: 100%; } }
.ep-prose .wp-block-embed iframe { width: 100%; }
.ep-prose .wp-block-button__link { background: var(--ep-btn); color: #fff; border-radius: var(--ep-radius-sm); text-decoration: none; padding: 10px 20px; }

/* Zoznam zdrojov – automaticky rozpoznaný podľa nadpisu */
.ep-prose .ep-sources-heading {
	font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ep-muted);
	border-top: 1px solid var(--ep-line); padding-top: 1.6em; margin-top: 2.4em;
}
.ep-prose .ep-sources-heading ~ ul, .ep-prose .ep-sources-heading ~ ol, .ep-prose .ep-sources-heading ~ p {
	font-size: .9rem; line-height: 1.6; color: var(--ep-ink-2);
}
.ep-prose .ep-sources-heading ~ ol, .ep-prose .ep-sources-heading ~ ul { padding-left: 1.6em; }
.ep-prose .ep-sources-heading ~ ol li, .ep-prose .ep-sources-heading ~ ul li { margin-bottom: .55em; }

.ep-article-foot { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ep-line); display: flex; flex-direction: column; gap: 20px; }
.ep-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ep-tags__label { font-size: .85rem; font-weight: 700; color: var(--ep-muted); margin-right: 4px; }
.ep-tags a { font-size: .84rem; padding: 4px 11px; border-radius: 999px; background: var(--ep-bg); border: 1px solid var(--ep-line); color: var(--ep-ink-2); text-decoration: none; }
.ep-tags a:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }

.ep-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--ep-muted); }
.ep-share a, .ep-share button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: .84rem; padding: 6px 12px; border-radius: var(--ep-radius-sm); border: 1px solid var(--ep-line); background: var(--ep-surface); color: var(--ep-ink-2); text-decoration: none; cursor: pointer; }
.ep-share svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ep-share a:hover, .ep-share button:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }

.ep-authorbox { display: flex; gap: 18px; align-items: flex-start; padding: 22px; background: var(--ep-accent-soft); border-radius: var(--ep-radius); margin-top: 28px; }
.ep-authorbox img { width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; }
.ep-authorbox__label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ep-accent-dark); }
.ep-authorbox__name { font-size: 1.1rem; margin: 2px 0 6px; }
.ep-authorbox__name a { color: var(--ep-ink); text-decoration: none; }
.ep-authorbox__name a:hover { color: var(--ep-accent-dark); text-decoration: underline; }
.ep-authorbox p { margin: 0 0 8px; color: var(--ep-ink-2); font-size: .95rem; }
.ep-authorbox .ep-authorbox__meta { font-size: .85rem; color: var(--ep-accent-dark); font-weight: 600; margin-bottom: 6px; }
.ep-authorbox__link { font-size: .9rem; font-weight: 650; }

.ep-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.ep-postnav a { display: block; padding: 16px 18px; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); text-decoration: none; color: var(--ep-ink); height: 100%; }
.ep-postnav a:hover { border-color: var(--ep-accent); box-shadow: var(--ep-shadow); }
.ep-postnav small { display: block; color: var(--ep-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.ep-postnav span { font-weight: 650; line-height: 1.35; }
.ep-postnav .ep-postnav__next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .ep-postnav { grid-template-columns: 1fr; } .ep-postnav .ep-postnav__next { grid-column: 1; } }

.ep-related { margin-top: 56px; }

/* ==========================================================================
   10. Komentáre
   ========================================================================== */
.ep-comments { margin-top: 40px; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); padding: clamp(20px, 3.5vw, 36px); }
.ep-comments__title { font-size: 1.25rem; margin-bottom: 20px; }
.ep-comments ol.comment-list { list-style: none; margin: 0 0 28px; padding: 0; }
.ep-comments ol.children { list-style: none; margin: 0; padding-left: 28px; border-left: 2px solid var(--ep-line); }
.ep-comments .comment-body { padding: 16px 0; border-bottom: 1px solid var(--ep-line); }
.ep-comments .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.ep-comments .comment-author img { width: 36px; height: 36px; border-radius: 50%; }
.ep-comments .comment-author .says { display: none; }
.ep-comments .comment-meta a { color: var(--ep-muted); font-size: .82rem; text-decoration: none; }
.ep-comments .comment-metadata { margin: 2px 0 0 46px; }
.ep-comments .comment-content { margin-left: 46px; color: var(--ep-ink-2); }
.ep-comments .reply { margin-left: 46px; font-size: .85rem; font-weight: 650; }
.ep-comments .bypostauthor > .comment-body .fn::after { content: " · autor"; color: var(--ep-accent); font-size: .8rem; font-weight: 700; }
.comment-respond label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
	width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--ep-line); border-radius: var(--ep-radius-sm); background: var(--ep-surface);
}
.comment-respond textarea { min-height: 140px; }
.comment-respond input, .comment-respond textarea { color: var(--ep-ink); }
.comment-respond .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.comment-respond .comment-form-cookies-consent label { font-weight: 400; }
.comment-respond .comment-reply-title { font-size: 1.1rem; }
.comment-respond .logged-in-as, .comment-notes { font-size: .88rem; color: var(--ep-muted); }

/* ==========================================================================
   11. Päta
   ========================================================================== */
.ep-footer { background: #101a23; color: #b9c3cc; padding: 48px 0 28px; font-size: .92rem; }
.ep-footer a { color: #e3e9ee; }
.ep-footer a:hover { color: #fff; }
.ep-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .ep-footer__grid { grid-template-columns: 1fr; gap: 28px; } }
.ep-footer__title { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.ep-footer p { margin: 0 0 .7em; }
.ep-footer ul { list-style: none; margin: 0; padding: 0; }
.ep-footer li { margin-bottom: 6px; }
.ep-footer .widget { margin-bottom: 20px; }
.ep-footer .widget-title, .ep-footer .widgettitle, .ep-footer h2 { color: #fff; font-size: 1rem; }
.ep-footer input[type="text"], .ep-footer input[type="password"] { width: 100%; padding: 8px 10px; border-radius: var(--ep-radius-sm); border: 1px solid #2a3a48; background: #17242f; color: #fff; font: inherit; }
.ep-footer__bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid #22313d; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem; color: #8b98a4; }
.ep-footer__menu ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ==========================================================================
   11b. Stránka Autori
   ========================================================================== */
.ep-au-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 22px 0 26px; }
.ep-au-search { flex: 1 1 280px; max-width: 420px; font: inherit; padding: 10px 14px; border: 1px solid var(--ep-line); border-radius: var(--ep-radius-sm); background: var(--ep-surface); color: var(--ep-ink); }
.ep-au-search:focus { border-color: var(--ep-accent); outline: none; box-shadow: 0 0 0 3px var(--ep-accent-soft); }
.ep-au-letters { display: flex; flex-wrap: wrap; gap: 4px; }
.ep-au-letters a { min-width: 32px; height: 32px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: var(--ep-radius-sm); border: 1px solid var(--ep-line); background: var(--ep-surface); color: var(--ep-ink-2); text-decoration: none; font-weight: 700; font-size: .85rem; }
.ep-au-letters a:hover { border-color: var(--ep-accent); color: var(--ep-accent-dark); }
.ep-au-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 860px) { .ep-au-grid { grid-template-columns: 1fr; } }
.ep-au-card { background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); padding: 20px 22px; scroll-margin-top: 90px; }
.ep-au-card[hidden], .ep-au-anon[hidden] { display: none; }
.ep-au-card__head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--ep-line); }
.ep-au-card__head img { width: 52px; height: 52px; border-radius: 50%; }
.ep-au-card__name { font-family: var(--ep-font-serif); font-size: 1.2rem; margin: 0 0 2px; }
.ep-au-card__name a { color: var(--ep-ink); text-decoration: none; }
.ep-au-card__name a:hover { color: var(--ep-accent-dark); text-decoration: underline; }
.ep-au-card__count { font-size: .85rem; color: var(--ep-muted); }
.ep-au-posts { list-style: none; margin: 0; padding: 0; }
.ep-au-post { padding: 12px 0; border-bottom: 1px dashed var(--ep-line); }
.ep-au-post:last-child { border-bottom: 0; padding-bottom: 0; }
.ep-au-post__title { font-weight: 700; color: var(--ep-ink); text-decoration: none; line-height: 1.35; }
.ep-au-post__title:hover { color: var(--ep-accent-dark); text-decoration: underline; }
.ep-au-post__meta { font-size: .8rem; color: var(--ep-muted); margin: 3px 0 4px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; }
.ep-au-post__excerpt { margin: 0; font-size: .9rem; color: var(--ep-ink-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-au-posts--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); padding: 6px 22px 16px; }
.ep-au-posts--cols .ep-au-post:last-child { border-bottom: 1px dashed var(--ep-line); padding-bottom: 12px; }
@media (max-width: 860px) { .ep-au-posts--cols { grid-template-columns: 1fr; } }
.ep-au-anon { margin-top: 36px; }
.ep-au-empty { padding: 24px; text-align: center; color: var(--ep-muted); background: var(--ep-surface); border: 1px dashed var(--ep-line); border-radius: var(--ep-radius); }

/* ==========================================================================
   12. BuddyPress – zladenie so vzhľadom témy
   ========================================================================== */
.ep-page { max-width: 1000px; margin: 0 auto; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: var(--ep-radius); padding: clamp(20px, 4vw, 44px); }
.ep-page__title { font-family: var(--ep-font-serif); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
body.buddypress .ep-page { max-width: var(--ep-wrap); }
#buddypress .bp-navs ul li.selected a, #buddypress .bp-navs ul li.current a { color: var(--ep-accent-dark); }
#buddypress .button, #buddypress button, #buddypress input[type="submit"] { border-radius: var(--ep-radius-sm); }
#buddypress .item-list .item-avatar img { border-radius: 50%; }
.buddypress-wrap .bp-list li .item-avatar img.avatar { border-radius: 50%; }

/* ==========================================================================
   13. Tmavý režim
   ========================================================================== */
.ep-theme-toggle .ep-theme-toggle__moon { display: inline-grid; place-items: center; }
.ep-theme-toggle .ep-theme-toggle__sun { display: none; }
html[data-ep-theme="dark"] .ep-theme-toggle .ep-theme-toggle__sun { display: inline-grid; place-items: center; }
html[data-ep-theme="dark"] .ep-theme-toggle .ep-theme-toggle__moon { display: none; }
html[data-ep-theme="dark"] body { background: var(--ep-bg); }
html[data-ep-theme="dark"] .ep-footer { background: #0a0f14; }
html[data-ep-theme="dark"] .ep-prose pre { background: #0a0f14; border: 1px solid var(--ep-line); }
html[data-ep-theme="dark"] .ep-card__media img, html[data-ep-theme="dark"] .ep-article-media img { filter: brightness(.92); }
html[data-ep-theme="dark"] .ep-placeholder { opacity: .9; }
html[data-ep-theme="dark"] .ep-chip.is-active .ep-chip__count { background: rgba(255,255,255,.2); }

/* ==========================================================================
   14. Tlač
   ========================================================================== */
@media print {
	.ep-header, .ep-footer, .ep-progress, .ep-toc-col, .ep-toc-inline, .ep-share, .ep-postnav, .ep-related, .ep-comments, .ep-filters { display: none !important; }
	body { background: #fff; }
	.ep-article-body { border: 0; padding: 0; }
	.ep-prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
