/*
Theme Name: Hereditas Patrum 2026
Theme URI: https://www.hereditaspatrum.sk
Description: Téma pre dobový spolok Hereditas Patrum. Nadväzuje na vizuál pôvodnej témy z roku 2015 — rovnaký banner, hradné pozadie aj farebnosť — ale rozloženie, typografia a galéria sú prerobené a kód je napísaný nanovo na bežných funkciách WordPressu.
Version: 1.0.0
Author: obchodpc.sk
Author URI: https://obchodpc.sk
Requires at least: 6.0
Requires PHP: 7.4
Tags: dvoj-stlpcovy, responzivny, vlastne-menu, widgety
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hereditaspatrum
*/

/* ==========================================================================
   1. Premenné
   ========================================================================== */

:root {
	/* Farby prevzaté z pôvodnej témy, miestami o stupeň sýtejšie
	   kvôli kontrastu. */
	--hp-gold:        #E79B18;
	--hp-gold-light:  #F1C579;
	--hp-gold-dark:   #B87A10;
	--hp-parchment:   #E6E3B4;
	--hp-parchment-2: #CFCB95;
	--hp-heading:     #F4F2DC;
	--hp-panel:       rgba(42, 47, 36, 0.93);
	--hp-panel-2:     rgba(32, 36, 28, 0.93);
	--hp-panel-soft:  rgba(58, 64, 48, 0.75);
	--hp-line:        rgba(231, 155, 24, 0.28);
	--hp-shadow:      0 2px 18px rgba(0, 0, 0, 0.45);

	--hp-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--hp-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--hp-wrap: 1100px;
	--hp-gap:  28px;
	--hp-radius: 6px;
}

/* ==========================================================================
   2. Základ
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
	margin: 0;
	font-family: var(--hp-sans);
	font-size: 16px;
	line-height: 1.7;
	color: var(--hp-parchment);
	background-color: #1b1e16;
	background-image:
		linear-gradient(rgba(12, 14, 10, 0.40), rgba(12, 14, 10, 0.66)),
		url("images/pozadie.jpg");
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
	background-attachment: fixed;
	-webkit-text-size-adjust: 100%;
}

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

a { color: var(--hp-gold-light); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: #FFFFFF; }

:focus-visible {
	outline: 2px solid var(--hp-gold);
	outline-offset: 2px;
	border-radius: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.hp-skip {
	position: absolute; left: -9999px;
	background: var(--hp-gold); color: #231a06;
	padding: 10px 16px; z-index: 999; font-weight: 700;
	border-radius: 0 0 var(--hp-radius) 0;
}
.hp-skip:focus { left: 0; top: 0; }

/* ==========================================================================
   3. Rámec stránky
   ========================================================================== */

.hp-page {
	max-width: var(--hp-wrap);
	margin: 0 auto;
	padding: 0 16px 48px;
}

@media (min-width: 900px) {
	.hp-page { padding: 24px 24px 56px; }
}

/* ==========================================================================
   4. Hlavička a menu
   ========================================================================== */

.hp-header {
	box-shadow: var(--hp-shadow);
	border-radius: var(--hp-radius) var(--hp-radius) 0 0;
	overflow: hidden;
}

.hp-header__banner { display: block; line-height: 0; }
.hp-header__banner img { width: 100%; height: auto; display: block; }

.hp-nav {
	background: linear-gradient(180deg, var(--hp-gold-light) 0%, var(--hp-gold) 55%, var(--hp-gold-dark) 100%);
	position: relative;
}

.hp-nav__toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: none;
	border: 0;
	padding: 12px 16px;
	font: inherit;
	font-weight: 700;
	color: #2a1f06;
	cursor: pointer;
}
.hp-nav__bars {
	width: 20px; height: 2px; background: #2a1f06;
	box-shadow: 0 6px 0 #2a1f06, 0 -6px 0 #2a1f06;
}

.hp-menu {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}
.hp-menu li { position: relative; }

.hp-menu a {
	display: block;
	padding: 11px 18px;
	color: #2a1f06;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}
.hp-menu a:hover,
.hp-menu a:focus {
	background: rgba(255, 255, 255, 0.22);
	color: #1a1304;
}
.hp-menu .current-menu-item > a,
.hp-menu .current_page_item > a,
.hp-menu .current_page_ancestor > a {
	background: rgba(0, 0, 0, 0.16);
	border-bottom-color: #3b2c08;
	color: #1a1304;
}

/* podmenu */
.hp-menu .children,
.hp-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	position: absolute;
	top: 100%; left: 0;
	min-width: 200px;
	background: var(--hp-panel-2);
	border: 1px solid var(--hp-line);
	border-radius: 0 0 var(--hp-radius) var(--hp-radius);
	box-shadow: var(--hp-shadow);
	display: none;
	z-index: 40;
}
.hp-menu li:hover > .children,
.hp-menu li:hover > .sub-menu,
.hp-menu li:focus-within > .children,
.hp-menu li:focus-within > .sub-menu { display: block; }

.hp-menu .children a,
.hp-menu .sub-menu a {
	color: var(--hp-parchment);
	border-bottom: 0;
	padding: 9px 16px;
	font-weight: 500;
}
.hp-menu .children a:hover,
.hp-menu .sub-menu a:hover { background: rgba(231, 155, 24, 0.18); color: #FFF; }

@media (max-width: 782px) {
	.hp-nav__toggle { display: flex; }
	.hp-menu { display: none; flex-direction: column; background: var(--hp-panel-2); }
	.hp-nav.is-open .hp-menu { display: flex; }
	.hp-menu a { color: var(--hp-parchment); border-bottom: 1px solid var(--hp-line); padding: 13px 18px; }
	.hp-menu .current-menu-item > a,
	.hp-menu .current_page_item > a { background: rgba(231, 155, 24, 0.2); color: #FFF; }
	.hp-menu .children,
	.hp-menu .sub-menu {
		position: static; display: block; border: 0; box-shadow: none;
		background: rgba(0, 0, 0, 0.22); padding: 0;
	}
	.hp-menu .children a,
	.hp-menu .sub-menu a { padding-left: 34px; }
}

/* ==========================================================================
   5. Rozloženie obsah + bočný panel
   ========================================================================== */

.hp-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--hp-gap);
	margin-top: var(--hp-gap);
}

@media (min-width: 900px) {
	.hp-layout { grid-template-columns: minmax(0, 1fr) 272px; }
	.hp-no-sidebar .hp-layout { grid-template-columns: minmax(0, 1fr); }
}

.hp-main { min-width: 0; }

/* ==========================================================================
   6. Panely obsahu
   ========================================================================== */

.hp-article,
.hp-card,
.hp-widget,
.hp-comments,
.hp-footer {
	background: var(--hp-panel);
	border: 1px solid var(--hp-line);
	border-radius: var(--hp-radius);
	box-shadow: var(--hp-shadow);
}

.hp-article {
	padding: 30px 32px 36px;
	margin-bottom: var(--hp-gap);
}
@media (max-width: 600px) {
	.hp-article { padding: 22px 18px 26px; }
}

.hp-article__title {
	font-family: var(--hp-serif);
	font-weight: 600;
	font-size: clamp(27px, 4.2vw, 38px);
	line-height: 1.2;
	color: var(--hp-heading);
	margin: 0 0 6px;
	letter-spacing: 0.01em;
}
.hp-article__title::after {
	content: "";
	display: block;
	width: 82px; height: 2px;
	margin-top: 14px;
	background: linear-gradient(90deg, var(--hp-gold), rgba(231, 155, 24, 0));
}

.hp-article__meta {
	font-size: 14px;
	color: var(--hp-parchment-2);
	margin: 0 0 18px;
}

.hp-article__thumb { margin: 0 0 22px; }

/* ==========================================================================
   7. Obsah stránok
   ========================================================================== */

.hp-prose { font-size: 16.5px; }

.hp-prose > :first-child { margin-top: 0; }
.hp-prose > :last-child { margin-bottom: 0; }

.hp-prose p { margin: 0 0 1.15em; }

.hp-prose h1, .hp-prose h2, .hp-prose h3,
.hp-prose h4, .hp-prose h5, .hp-prose h6 {
	font-family: var(--hp-serif);
	color: var(--hp-heading);
	line-height: 1.25;
	margin: 1.8em 0 0.6em;
	font-weight: 600;
}
.hp-prose h1 { font-size: 30px; }
.hp-prose h2 { font-size: 26px; }
.hp-prose h3 { font-size: 22px; }
.hp-prose h4 { font-size: 19px; }

.hp-prose ul, .hp-prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.hp-prose li { margin-bottom: 0.4em; }
.hp-prose ul { list-style: none; padding-left: 1.3em; }
.hp-prose ul li { position: relative; }
.hp-prose ul li::before {
	content: "";
	position: absolute; left: -1.05em; top: 0.72em;
	width: 6px; height: 6px;
	background: var(--hp-gold);
	transform: rotate(45deg);
}
.hp-prose ol { list-style: decimal; }
.hp-prose ol li::before { content: none; }

.hp-prose blockquote {
	margin: 1.4em 0;
	padding: 2px 0 2px 20px;
	border-left: 3px solid var(--hp-gold);
	color: var(--hp-parchment-2);
	font-style: italic;
}

.hp-prose hr {
	border: 0; height: 1px; margin: 2em 0;
	background: linear-gradient(90deg, rgba(231,155,24,0), var(--hp-gold), rgba(231,155,24,0));
}

.hp-prose img { border-radius: 3px; height: auto; }
.hp-prose figure { margin: 1.4em 0; }
.hp-prose figcaption { font-size: 14px; color: var(--hp-parchment-2); margin-top: 6px; }

/* Staršie stránky majú obsah vysádzaný tabuľkami a <center>.
   Nech sa zmestia aj na úzky displej. */
.hp-prose table {
	max-width: 100%;
	border-collapse: collapse;
	margin: 1.2em 0;
}
.hp-prose td, .hp-prose th { padding: 6px 10px; vertical-align: top; }
.hp-prose center { display: block; }

.hp-prose a { color: var(--hp-gold-light); }
.hp-prose a:hover { color: #FFF; }

.hp-button {
	display: inline-block;
	background: linear-gradient(180deg, var(--hp-gold-light), var(--hp-gold));
	color: #2a1f06 !important;
	font-weight: 700;
	padding: 10px 20px;
	border: 0;
	border-radius: var(--hp-radius);
	text-decoration: none;
	cursor: pointer;
}
.hp-button:hover { background: var(--hp-gold-light); color: #1a1304 !important; }

/* ==========================================================================
   8. Výpisy a karty
   ========================================================================== */

.hp-list { display: grid; gap: var(--hp-gap); }

.hp-card { padding: 22px 24px; display: grid; gap: 16px; }
@media (min-width: 640px) {
	.hp-card:has(.hp-card__thumb) { grid-template-columns: 210px minmax(0, 1fr); align-items: start; }
}
.hp-card__thumb img { border-radius: 4px; display: block; }
.hp-card__title { font-family: var(--hp-serif); font-size: 23px; margin: 0 0 4px; line-height: 1.25; }
.hp-card__title a { color: var(--hp-heading); text-decoration: none; }
.hp-card__title a:hover { color: var(--hp-gold-light); }
.hp-card__meta { font-size: 13.5px; color: var(--hp-parchment-2); margin: 0 0 10px; }
.hp-card__excerpt p { margin: 0; }

.hp-archive-head { margin-bottom: var(--hp-gap); }
.hp-archive-head .hp-article__title { margin-bottom: 0; }

.hp-empty { text-align: left; }

.hp-postnav {
	display: flex; justify-content: space-between; gap: 16px;
	margin-bottom: var(--hp-gap); font-size: 15px;
}
.hp-postnav a { text-decoration: none; }

/* stránkovanie */
.navigation.pagination { margin-bottom: var(--hp-gap); }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers {
	display: inline-block; padding: 7px 13px;
	background: var(--hp-panel-soft);
	border: 1px solid var(--hp-line);
	border-radius: 4px;
	text-decoration: none;
}
.page-numbers.current { background: var(--hp-gold); color: #2a1f06; font-weight: 700; }

/* ==========================================================================
   9. Bočný panel
   ========================================================================== */

.hp-sidebar { display: grid; gap: 20px; align-content: start; }

.hp-widget { padding: 18px 20px; }
.hp-widget__title {
	font-family: var(--hp-serif);
	font-size: 19px;
	color: var(--hp-heading);
	margin: 0 0 12px;
	padding-bottom: 9px;
	border-bottom: 1px solid var(--hp-line);
	font-weight: 600;
}
.hp-widget ul { list-style: none; margin: 0; padding: 0; }
.hp-widget li { padding: 5px 0; border-bottom: 1px solid rgba(231, 155, 24, 0.12); }
.hp-widget li:last-child { border-bottom: 0; }
.hp-widget a { text-decoration: none; }
.hp-widget a:hover { text-decoration: underline; }
.hp-widget img { border-radius: 3px; }
.hp-widget p { margin: 0 0 0.8em; }
.hp-widget p:last-child { margin-bottom: 0; }

/* hľadanie */
.hp-search { display: flex; gap: 6px; }
.hp-search__input {
	flex: 1 1 auto; min-width: 0;
	padding: 9px 11px;
	border: 1px solid var(--hp-line);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.28);
	color: var(--hp-parchment);
	font: inherit; font-size: 15px;
}
.hp-search__input::placeholder { color: rgba(230, 227, 180, 0.5); }
.hp-search__button {
	padding: 9px 15px; border: 0; border-radius: 4px;
	background: linear-gradient(180deg, var(--hp-gold-light), var(--hp-gold));
	color: #2a1f06; font: inherit; font-weight: 700; cursor: pointer;
}

/* ==========================================================================
   10. Galéria (NextGEN) — vzdušnejšia mriežka

   NextGEN si svoje rozloženie presadzuje cez !important a jeho štýly sa
   načítavajú až po téme. Preto sú selektory nižšie zámerne špecifickejšie
   (predradené .hp-main) — inak by ich NextGEN prebil.
   ========================================================================== */

.hp-main .ngg-galleryoverview,
.hp-main .ngg-albumoverview { margin: 1.4em 0 !important; overflow: visible !important; }

/* --- fotky v galérii --- */

.hp-main .ngg-galleryoverview {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
	gap: 14px;
}

.hp-main .ngg-gallery-thumbnail-box,
.hp-main .ngg-galleryoverview .ngg-gallery-thumbnail-box,
.hp-main .ngg-gallery-thumbnail,
.hp-main .ngg-galleryoverview .ngg-gallery-thumbnail {
	display: block !important;
	float: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	text-align: center;
}

.hp-main .ngg-gallery-thumbnail a { display: block; line-height: 0; }

.hp-main .ngg-gallery-thumbnail img {
	display: block;
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--hp-line) !important;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.3);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hp-main .ngg-gallery-thumbnail img:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
	border-color: var(--hp-gold) !important;
}

/* --- prehľad albumov ---
   Náhľady generuje NextGEN v rozmere 91x68. Roztiahnuté by boli
   rozmazané, preto sú dlaždice úzke a je ich v rade viac. */

.hp-main .ngg-albumoverview,
.hp-main .ngg-albumoverview.default-view {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
	gap: 14px;
}

.hp-main .ngg-albumoverview .ngg-album,
.hp-main .ngg-albumoverview.default-view .ngg-album-compact {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	background: var(--hp-panel-soft);
	border: 1px solid var(--hp-line);
	border-radius: var(--hp-radius);
	padding: 10px 8px 12px !important;
	margin: 0 !important;
	height: auto !important;
	width: auto !important;
	float: none !important;
	vertical-align: top;
	transition: border-color 0.18s ease, transform 0.18s ease;
}
.hp-main .ngg-albumoverview .ngg-album:hover,
.hp-main .ngg-albumoverview.default-view .ngg-album-compact:hover {
	border-color: var(--hp-gold);
	transform: translateY(-2px);
}

.hp-main .ngg-albumoverview .ngg-album-compactbox,
.hp-main .ngg-albumoverview .ngg-album-link {
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	line-height: 0;
}
.hp-main .ngg-albumoverview .ngg-album-compactbox img,
.hp-main .ngg-albumoverview .ngg-album-link img {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--hp-line) !important;
	border-radius: 3px;
}

.hp-main .ngg-albumoverview h4 {
	margin: 0 !important; line-height: 1.3;
	font-family: var(--hp-serif); font-size: 14.5px; font-weight: 600;
}
.hp-main .ngg-albumoverview h4 a {
	color: var(--hp-heading); text-decoration: none;
	max-width: none !important; display: inline-block;
}
.hp-main .ngg-albumoverview h4 a:hover { color: var(--hp-gold-light); }

.hp-main .ngg-albumoverview .ngg-album-gallery-image-counter,
.hp-main .ngg-albumoverview.default-view p.ngg-album-gallery-image-counter {
	display: block !important;
	font-size: 12.5px; color: var(--hp-parchment-2);
	margin: 0 !important; line-height: 1.3;
}

/* --- stránkovanie galérie --- */

.hp-main .ngg-navigation { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.hp-main .ngg-navigation a,
.hp-main .ngg-navigation span {
	padding: 6px 11px; border: 1px solid var(--hp-line);
	border-radius: 4px; text-decoration: none; background: var(--hp-panel-soft);
}
.hp-main .ngg-navigation .current { background: var(--hp-gold); color: #2a1f06; font-weight: 700; }

/* ==========================================================================
   11. Komentáre a bbPress
   ========================================================================== */

.hp-comments { padding: 24px 28px; margin-bottom: var(--hp-gap); }
.hp-comments__title { font-family: var(--hp-serif); font-size: 21px; color: var(--hp-heading); margin: 0 0 16px; }
.hp-comments__list, .hp-comments__list ol { list-style: none; margin: 0; padding: 0; }
.hp-comments__list .children { padding-left: 24px; }
.hp-comments__list li { border-bottom: 1px solid var(--hp-line); padding: 14px 0; }
.hp-comments input[type="text"],
.hp-comments input[type="email"],
.hp-comments input[type="url"],
.hp-comments textarea {
	width: 100%; padding: 9px 11px;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid var(--hp-line); border-radius: 4px;
	color: var(--hp-parchment); font: inherit;
}
.hp-comments .submit { margin-top: 10px; }

#bbpress-forums {
	font-size: 15.5px;
	color: var(--hp-parchment);
}
#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-topic-permalink { color: var(--hp-gold-light); }
#bbpress-forums div.bbp-forum-header,
#bbpress-forums div.bbp-topic-header,
#bbpress-forums div.bbp-reply-header,
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
	background: var(--hp-panel-soft) !important;
	border-color: var(--hp-line) !important;
	color: var(--hp-parchment) !important;
}
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-replies { border-color: var(--hp-line) !important; }

/* ==========================================================================
   12. Pätička
   ========================================================================== */

.hp-footer { margin-top: var(--hp-gap); padding: 20px 26px; }

.hp-footer__widgets { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 700px) {
	.hp-footer__widgets { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
.hp-footer__widgets .hp-widget { background: none; border: 0; box-shadow: none; padding: 0; }

.hp-footer__bar {
	display: flex; flex-wrap: wrap; gap: 8px 22px;
	justify-content: space-between; align-items: baseline;
}
.hp-footer__text, .hp-footer__meta { margin: 0; font-size: 14px; }
.hp-footer__meta { color: var(--hp-parchment-2); }
.hp-footer__updated { display: block; opacity: 0.85; }

/* ==========================================================================
   13. Zarovnanie z editora
   ========================================================================== */

.alignleft  { float: left;  margin: 0.3em 1.4em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.hp-prose::after { content: ""; display: table; clear: both; }

@media (max-width: 600px) {
	.alignleft, .alignright { float: none; display: block; margin: 1em auto; }
}

/* ==========================================================================
   14. Tlač
   ========================================================================== */

@media print {
	body { background: #fff; color: #000; }
	.hp-nav, .hp-sidebar, .hp-footer, .hp-skip { display: none; }
	.hp-article { border: 0; box-shadow: none; background: none; }
}

/* Otvorené podmenu na dotykových zariadeniach (rieši theme.js) */
.hp-menu li.is-open > .children,
.hp-menu li.is-open > .sub-menu { display: block; }
