/*
Theme Name: Zlatá priadka
Theme URI: https://uzlatejpriadky.sk
Author: Noxo
Description: Minimalistická, responzívna téma pre Dielničku u Zlatej priadky. Bielo-tyrkysová, s pevným hlavným menu.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: zlata-priadka
*/

/* ---------- Písmo (Fondamento, Astigmatic, SIL OFL 1.1; latin + latin-ext pre slovenčinu) ---------- */
@font-face {
	font-family: "Fondamento";
	src: url("assets/fonts/fondamento-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
	font-family: "Fondamento";
	src: url("assets/fonts/fondamento-latin-ext.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokeny ---------- */
:root {
	--zp-teal: #14a3a8;
	--zp-teal-dark: #0d7c81;
	--zp-teal-light: #e6f6f6;
	--zp-teal-tint: #f3fafa;
	--zp-gold: #d4a63a;
	--zp-gold-light: #efdca6;
	--zp-text: #1f2d33;
	--zp-muted: #5f7076;
	--zp-line: #e3ecec;
	--zp-white: #fff;
	--zp-radius: 4px;
	--zp-header-h: 76px;
	--zp-side: 300px;
	--zp-wrap: 1120px;
	--zp-narrow: 760px;
	--zp-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--zp-font-display: "Fondamento", "Iowan Old Style", Georgia, serif;
	/* Ornamenty (ľudový vzor: kosoštvorce v tyrkysovej a zlatej) */
	--zp-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10' viewBox='0 0 28 10'%3E%3Cpath d='M0 5 7 0l7 5-7 5z' fill='%2314a3a8'/%3E%3Cpath d='M14 5 21 0l7 5-7 5z' fill='%23d4a63a'/%3E%3Cpath d='M7 5 10 2.6 13 5 10 7.4zM21 5l3-2.4L27 5l-3 2.4z' fill='%23fff'/%3E%3C/svg%3E");
	--zp-orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='14' viewBox='0 0 64 14'%3E%3Cpath d='M32 0l7 7-7 7-7-7z' fill='%2314a3a8'/%3E%3Cpath d='M32 3.6 35.4 7 32 10.4 28.6 7z' fill='%23fff'/%3E%3Cpath d='M12 3l4 4-4 4-4-4zM52 3l4 4-4 4-4-4z' fill='%23d4a63a'/%3E%3Ccircle cx='2' cy='7' r='1.5' fill='%2314a3a8'/%3E%3Ccircle cx='62' cy='7' r='1.5' fill='%2314a3a8'/%3E%3C/svg%3E");
	--zp-shadow: 0 1px 2px rgba(15, 60, 65, .06), 0 6px 20px rgba(15, 60, 65, .06);
	/* Ikonka kalendára pri termínoch (kurzy, letné tábory). */
	--zp-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d7c81' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--zp-header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--zp-white);
	color: var(--zp-text);
	font-family: var(--zp-font);
	font-size: 18px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--zp-teal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s; }
a:hover { color: var(--zp-teal); }
:focus-visible { outline: 2px solid var(--zp-teal); outline-offset: 2px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--zp-font-display); line-height: 1.2; margin: 1.8em 0 .5em; font-weight: 400; letter-spacing: .01em; font-synthesis: none; }
h1 strong, h2 strong, h3 strong, h4 strong, h5 strong, h6 strong { font-weight: 400; }
h1 { font-size: clamp(2.3rem, 5vw, 3.3rem); margin-top: 0; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.35rem; }
p { margin: 0 0 1.2em; }
hr, .wp-block-separator {
	border: 0; height: 14px; margin: 2.6em 0; opacity: 1; color: transparent;
	background:
		var(--zp-orn) center / 64px 14px no-repeat,
		linear-gradient(var(--zp-gold-light), var(--zp-gold-light)) left center / calc(50% - 44px) 1px no-repeat,
		linear-gradient(var(--zp-gold-light), var(--zp-gold-light)) right center / calc(50% - 44px) 1px no-repeat;
}
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip-path: inset(50%); border: 0; white-space: nowrap;
}
.skip-link:focus {
	clip-path: none; width: auto; height: auto; margin: 0; padding: 12px 18px; background: var(--zp-teal);
	color: #fff; z-index: 1000; top: 8px; left: 8px; border-radius: 6px;
}
.zp-wrap { width: 100%; max-width: var(--zp-wrap); margin-inline: auto; padding-inline: 24px; }

/* ---------- Hlavička (pevná pri scrollovaní) ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	-webkit-backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--zp-line);
	transition: box-shadow .2s;
}
.site-header::before { content: ""; display: block; height: 10px; background: var(--zp-band) 0 0 / 28px 10px repeat-x; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
/* Logo a menu sa nedajú ťahať myšou. */
.site-header img, .site-header a { -webkit-user-drag: none; user-drag: none; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(15, 60, 65, .09); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--zp-header-h); }
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-branding .custom-logo-link { display: block; line-height: 0; }
.site-branding .custom-logo { height: 52px; width: auto; display: block; }
.site-title { margin: 0; font-family: var(--zp-font-display); font-size: 1.6rem; font-weight: 400; letter-spacing: .01em; line-height: 1.2; }
.site-title a { color: var(--zp-text); text-decoration: none; }
.site-description { margin: 0; font-size: .8rem; color: var(--zp-muted); }
.site-identity { min-width: 0; }

/* Menu */
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation .menu { display: flex; align-items: center; gap: 2px; }
.main-navigation a {
	display: block; padding: 8px 14px 6px; border-bottom: 2px solid transparent;
	color: var(--zp-text); text-decoration: none; font-family: var(--zp-font-display); font-size: 1.3rem; font-weight: 400; letter-spacing: .02em; white-space: nowrap;
	transition: color .15s, border-color .15s;
}
.main-navigation a:hover { color: var(--zp-teal-dark); border-bottom-color: var(--zp-gold-light); }
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a { color: var(--zp-teal-dark); border-bottom-color: var(--zp-gold); }
.main-navigation .menu-item-has-children { position: relative; }
.main-navigation .sub-menu {
	display: none; position: absolute; left: 0; top: 100%; min-width: 200px; padding: 8px;
	background: #fff; border: 1px solid var(--zp-line); border-radius: var(--zp-radius); box-shadow: var(--zp-shadow);
}
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu { display: block; }
.main-navigation .sub-menu a { white-space: normal; }

.menu-toggle {
	display: none; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--zp-line);
	border-radius: var(--zp-radius); padding: 8px 16px; font-family: var(--zp-font-display); font-size: 1.2rem; color: var(--zp-text); cursor: pointer;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
	display: block; width: 18px; height: 2px; background: var(--zp-teal-dark); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
	:root { --zp-header-h: 64px; }
	.site-description { display: none; }
	.site-branding .custom-logo { height: 42px; }
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--zp-line);
		box-shadow: 0 12px 24px rgba(15, 60, 65, .08); display: none; max-height: calc(100vh - var(--zp-header-h)); overflow-y: auto;
	}
	.main-navigation.is-open { display: block; }
	.main-navigation .menu { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 24px 20px; }
	.main-navigation a { padding: 12px 6px 10px; }
	.main-navigation .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; }
}

/* ---------- Ľavý panel (desktop od 961 px): logo, slogan a zvislé menu ostávajú viditeľné pri scrollovaní ---------- */
@media (min-width: 961px) {
	:root { --zp-header-h: 0px; }
	body { padding-left: var(--zp-side); }
	.site-header {
		position: fixed; top: 0; left: 0; bottom: 0; width: var(--zp-side); z-index: 100;
		display: flex; flex-direction: column; overflow-y: auto;
		background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
		border-bottom: 0; border-right: 1px solid var(--zp-gold-light);
	}
	.site-header::before { flex: none; }
	.site-header.is-scrolled { box-shadow: none; }
	.site-header__inner { flex: 1; flex-direction: column; justify-content: flex-start; align-items: center; gap: 28px; max-width: none; min-height: 0; padding: 36px 20px 32px; }
	.site-branding { flex-direction: column; text-align: center; gap: 10px; }
	.site-branding .custom-logo { height: auto; width: 170px; max-width: 100%; }
	.site-description { font-family: var(--zp-font-display); font-size: 1.2rem; color: var(--zp-teal-dark); }
	.site-title:not(.screen-reader-text) { font-size: 1.8rem; }
	.main-navigation { width: 100%; }
	.main-navigation .menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.main-navigation a { padding: 8px 10px 4px; border-bottom: 0; text-align: center; white-space: normal; }
	.main-navigation a::after { content: ""; display: block; width: 0; height: 2px; margin: 3px auto 0; background: var(--zp-gold); transition: width .2s; }
	.main-navigation a:hover::after,
	.main-navigation .current-menu-item > a::after,
	.main-navigation .current-menu-ancestor > a::after,
	.main-navigation .current_page_item > a::after { width: 36px; }
	.main-navigation .sub-menu { position: static; display: block; min-width: 0; padding: 0; border: 0; box-shadow: none; }
	.main-navigation .sub-menu a { font-size: 1.1rem; }
	/* Na celú šírku obsahu (mimo panela). */
	.alignfull { width: calc(100vw - var(--zp-side)); max-width: none; margin-inline: calc(50% - (100vw - var(--zp-side)) / 2); }
}

/* ---------- Obsah ---------- */
.site-content { padding-block: clamp(32px, 6vw, 72px); }
.site-content ::selection { background: var(--zp-teal-light); }
.content-area { max-width: var(--zp-narrow); margin-inline: auto; }
.entry-header { margin-bottom: 1.6em; padding-bottom: 1.2em; border-bottom: 1px solid var(--zp-line); position: relative; }
.entry-header::after { content: ""; position: absolute; left: 0; bottom: -7px; width: 64px; height: 14px; background: var(--zp-orn) 0 0 / 64px 14px no-repeat; }
.entry-header { border-bottom-color: var(--zp-gold-light); }
.entry-title { margin: 0; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--zp-teal-dark); }
.entry-meta { margin-top: .6em; font-size: .85rem; color: var(--zp-muted); }
.entry-meta a { color: inherit; }

.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--zp-gold); }
.entry-content img { border-radius: 2px; }
.entry-content figure img, .entry-content > img { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--zp-gold-light); margin: 5px; }
.entry-content .wp-block-gallery img { margin: 0; }
.entry-content blockquote, .wp-block-quote {
	margin: 1.8em 0; padding: 1em 1.4em; border-left: 3px solid var(--zp-gold); background: var(--zp-teal-tint); font-style: italic;
}
.entry-content table, .wp-block-table table { width: 100%; border-collapse: collapse; margin-bottom: 1.6em; font-size: .95rem; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--zp-line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--zp-teal-tint); font-family: var(--zp-font-display); font-weight: 400; font-size: 1.1rem; }
figure { margin: 0 0 1.4em; }
figcaption, .wp-caption-text { font-size: .85rem; color: var(--zp-muted); text-align: center; margin-top: .5em; }

/* Zarovnania obrázkov */
.alignleft { float: left; margin: .3em 1.6em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.6em; }
.aligncenter { display: block; margin-inline: auto; text-align: center; }
.entry-content::after { content: ""; display: table; clear: both; }
.alignwide { max-width: min(var(--zp-wrap), 100vw - 48px); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
@media (max-width: 600px) { .alignleft, .alignright { float: none; display: block; margin: 0 auto 1.2em; } }

/* Bloky */
.wp-block-gallery { gap: 12px; }
.wp-block-gallery img { border-radius: 2px; }
.wp-block-columns { gap: 32px; align-items: center; }
@media (max-width: 781px) { .wp-block-columns { flex-wrap: wrap !important; } .wp-block-column { flex-basis: 100% !important; } }
.wp-block-button__link, .button, input[type="submit"], button[type="submit"] {
	display: inline-block; background: var(--zp-teal); color: #fff !important; border: 0; border-radius: var(--zp-radius);
	padding: 9px 26px 8px; font-family: var(--zp-font-display); font-size: 1.25rem; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .15s;
}
.wp-block-button__link:hover, .button:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: var(--zp-teal-dark); }
.wp-block-image.is-style-rounded img { border-radius: 999px; }

/* Formuláre */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], textarea, select {
	width: 100%; padding: 11px 14px; border: 1px solid var(--zp-line); border-radius: var(--zp-radius);
	font: inherit; color: var(--zp-text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--zp-teal); box-shadow: 0 0 0 3px var(--zp-teal-light); outline: 0; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; margin: 0; }

/* Výpis príspevkov */
.post-list { display: grid; gap: 28px; }
.post-card { padding-bottom: 28px; border-bottom: 1px solid var(--zp-line); }
.post-card:last-child { border-bottom: 0; }
.post-card .entry-header { border: 0; padding: 0; margin-bottom: .8em; }
.post-card .entry-header::after { display: none; }
.post-card .entry-title { font-size: 2rem; }
.post-card__more { font-family: var(--zp-font-display); font-size: 1.25rem; text-decoration: none; }
.post-card__more::after { content: " →"; }
.pagination, .navigation.posts-navigation, .post-navigation { margin-top: 2.4em; }
.nav-links { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-numbers { display: inline-block; padding: 6px 14px; border-radius: var(--zp-radius); text-decoration: none; }
.page-numbers.current { background: var(--zp-teal); color: #fff; }
a.page-numbers:hover { background: var(--zp-teal-light); }
.archive-header { margin-bottom: 2em; }

/* Komentáre */
.comments-area { margin-top: 3.4em; padding-top: 2em; border-top: 1px solid var(--zp-line); }
.comments-title, .comment-reply-title { font-size: 1.8rem; margin-top: 0; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2em; }
.comment-list .children { list-style: none; padding-left: 1.6em; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--zp-line); font-size: .95rem; }
.comment-author { font-weight: 600; }
.comment-metadata { font-size: .8rem; color: var(--zp-muted); margin-bottom: .5em; }
.comment-metadata a { color: inherit; }
.avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }

/* ---------- Pätička ---------- */
.site-footer { background: var(--zp-teal-tint); margin-top: 24px; }
.site-footer::before { content: ""; display: block; height: 10px; background: var(--zp-band) 0 0 / 28px 10px repeat-x; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-flow: dense; align-content: start; column-gap: 48px; row-gap: 0; padding-block: 56px 32px; }
/* Menu v pätičke by duplikovalo hlavné menu v hlavičke. */
.footer-widgets .widget_nav_menu { display: none; }
.footer-widgets .widget_block { grid-column: 1; }
.footer-widgets .widget_block p, .footer-widgets .widget_block h2 { margin: 0 0 .5em; }
/* Galéria s miniatúrami v pätičke: majiteľka ju nechce (malé fotky). Widget ostáva v databáze, len sa nezobrazuje. */
.footer-widgets .ngg_images { display: none; }
.footer-widgets .widget { min-width: 0; }
.widget-title, .footer-widgets h2 { font-size: 1.6rem; color: var(--zp-teal-dark); margin: 0 0 .6em; }
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { padding: 4px 0; }
.footer-widgets a { text-decoration: none; }
.footer-widgets p { margin-bottom: .8em; }
.site-info { border-top: 1px solid var(--zp-gold-light); padding-block: 20px; font-size: .85rem; color: var(--zp-muted); }
.site-info__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-info a { color: inherit; }

/* Späť hore */
.to-top {
	position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: var(--zp-radius); border: 0; cursor: pointer;
	background: var(--zp-teal); color: #fff; box-shadow: var(--zp-shadow); font-size: 20px; line-height: 1;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--zp-teal-dark); }

/* ---------- Úvodná stránka ---------- */
.site-content--front { padding-block: 0; }
.hero { position: relative; height: 100vh; min-height: 420px; overflow: hidden; background: var(--zp-teal-tint); }
.hero__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 45%; }
.hero__down {
	position: absolute; left: 50%; bottom: 22px; width: 48px; height: 48px; margin-left: -24px; border-radius: 50%;
	background: rgba(255, 255, 255, .88); box-shadow: var(--zp-shadow); transition: background .15s, transform .15s;
}
.hero__down::before {
	content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -9px 0 0 -6px;
	border-right: 2px solid var(--zp-teal-dark); border-bottom: 2px solid var(--zp-teal-dark); transform: rotate(45deg);
}
.hero__down:hover { background: #fff; transform: translateY(2px); }
@media (max-width: 960px) { .hero { height: 62vh; height: 62svh; min-height: 300px; } }

.front-content { padding-block: clamp(40px, 7vw, 88px) 0; }
.front-content h2, .section-title { color: var(--zp-teal-dark); }
.front-content h2 { margin-top: 1.6em; }
.front-content h2:first-child { margin-top: 0; }
.front-content h2::after, .section-title::after {
	content: ""; display: block; width: 64px; height: 14px; margin-top: .35em; background: var(--zp-orn) 0 0 / 64px 14px no-repeat;
}
.photo-section { padding-block: clamp(40px, 7vw, 88px) clamp(24px, 4vw, 48px); }
.section-title { margin: 0 0 .9em; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.photo { position: relative; margin: 0; overflow: hidden; border-radius: 2px; aspect-ratio: 4 / 3; background: var(--zp-teal-tint); }
.photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.photo--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.photo--tall { grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 600px) {
	.photo-grid { grid-template-columns: 1fr; }
	.photo--wide { grid-column: auto; aspect-ratio: 4 / 3; }
	.photo--tall { grid-row: auto; aspect-ratio: 3 / 4; }
}

/* ---------- Kurzy: karty s veľkými fotkami ----------
   Štruktúra obsahu ostáva (skupina: h2, stĺpce fotka + zoznam termínov, odsek). Trieda .kurz sa pridáva vo functions.php. */
.content-area:has(.kurz) { max-width: min(1040px, 100%); }
.entry-content:has(.kurz) > .fsb-flexible-spacer { display: none; }
.entry-content:has(.kurz) > h2:first-child { margin-top: 0; color: var(--zp-teal-dark); }
.entry-content:has(.kurz) > p { max-width: none; font-size: 1.05rem; }
/* Adresa pod úvodom ako informačný panel. */
.entry-content:has(.kurz) > .wp-block-group.is-nowrap {
	flex-wrap: wrap; align-items: center; gap: 4px 28px; max-width: none; margin: 1.6em 0 2.6em; padding: 20px 28px;
	background: var(--zp-teal-tint); border-left: 3px solid var(--zp-gold); border-radius: 0 var(--zp-radius) var(--zp-radius) 0;
}
.entry-content:has(.kurz) > .wp-block-group.is-nowrap > * { margin: 0; }
.entry-content:has(.kurz) > .wp-block-group.is-nowrap .fsb-flexible-spacer { display: none; }

.kurz {
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto auto 1fr;
	grid-template-areas: "img title" "img dates" "img desc";
	margin: 0 0 32px; overflow: hidden; background: #fff;
	border: 1px solid var(--zp-gold-light); border-radius: var(--zp-radius); box-shadow: var(--zp-shadow);
}
.kurz--alt { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "title img" "dates img" "desc img"; }
/* Obaly (vnútorný kontajner skupiny, stĺpce) zmizli, ich obsah (nadpis, fotka, zoznam, odsek) sa stáva priamo bunkami mriežky karty. */
.kurz > .wp-block-group__inner-container, .kurz .wp-block-columns, .kurz .wp-block-column { display: contents; }
.entry-content .kurz figure { grid-area: img; position: relative; min-height: 360px; margin: 0; }
.entry-content .kurz figure img {
	position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; box-shadow: none;
	object-fit: cover; object-position: 50% 40%;
}
.entry-content .kurz h2 { grid-area: title; max-width: none; margin: 0 !important; padding: 28px 32px 6px; font-size: clamp(1.45rem, 2.4vw, 1.95rem); color: var(--zp-teal-dark); }
.entry-content .kurz ul { grid-area: dates; margin: 0; padding: 4px 32px 8px; list-style: none; }
.entry-content .kurz li { position: relative; margin: 0; padding: 9px 0 9px 34px; border-bottom: 1px dashed var(--zp-gold-light); }
.entry-content .kurz li:last-child { border-bottom: 0; }
.entry-content .kurz li::before {
	content: ""; position: absolute; left: 2px; top: 12px; width: 20px; height: 20px;
	background: var(--zp-cal) center / contain no-repeat;
}
.entry-content .kurz p { grid-area: desc; max-width: none; margin: 0 !important; padding: 8px 32px 28px; font-size: .98rem; }
@media (max-width: 760px) {
	.kurz, .kurz--alt { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "img" "title" "dates" "desc"; }
	.entry-content .kurz figure { min-height: 0; aspect-ratio: 4 / 3; }
	.entry-content .kurz h2 { padding: 22px 20px 4px; }
	.entry-content .kurz ul { padding: 4px 20px 6px; }
	.entry-content .kurz p { padding: 8px 20px 24px; }
}

/* ---------- Ostatné stránky s obsahom (O Dielničke, Letné tábory, Iné akcie, Novinky, Kontakt, Výročné správy) ----------
   Obsah v editore sa nemení; triedy zp-* pridáva zp_enhance_content() vo functions.php. */
.content-area { max-width: min(1040px, 100%); }
/* Text, oznamy a fotky majú rovnakú šírku: jeden ucelený blok, ktorý sa responzívne prispôsobí obrazovke. */
.entry-content > :is(p, ul, ol, h2, h3, h4, h5, h6, blockquote, table) { max-width: none; text-wrap: pretty; }
/* Fotky bez rámikov, jednotné zaoblenie. */
.entry-content figure img { margin: 0; box-shadow: none; border-radius: var(--zp-radius); }
/* Samostatná fotka: široký výrez 16:9, úvodná fotka stránky ako banner 21:9. */
.entry-content > figure.wp-block-image:not([class*="align"]) img:is([src*=".jpg" i], [src*=".jpeg" i]) {
	display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 35%;
}
.entry-content > figure.wp-block-image.zp-banner:not([class*="align"]) img:is([src*=".jpg" i], [src*=".jpeg" i]) { aspect-ratio: 21 / 9; }
.entry-content > figure.zp-banner { margin: 0 0 2em; }

/* Mriežka fotiek (2+ fotky za sebou). */
.zp-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 2em 0; }
.zp-photos--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zp-photos figure { margin: 0; }
.entry-content .zp-photos figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 640px) { .zp-photos, .zp-photos--3 { grid-template-columns: 1fr; } }
/* pás portrétov pod obsahom stránky (zp_page_photos): na výšku, na mobile dva stĺpce, prvá z troch cez celú šírku */
.entry-content .zp-photos--portrait figure img { aspect-ratio: 3 / 4; }
@media (max-width: 640px) {
	.zp-photos--portrait, .zp-photos--portrait.zp-photos--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.zp-photos--portrait.zp-photos--3 figure:first-child { grid-column: span 2; }
	.entry-content .zp-photos--portrait.zp-photos--3 figure:first-child img { aspect-ratio: 4 / 3; }
}

/* Karty udalostí (Iné akcie): fotka hore, titulok pod ňou. */
.zp-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 2em 0; }
.zp-event {
	display: flex; flex-direction: column-reverse; justify-content: flex-end; overflow: hidden; background: #fff;
	border: 1px solid var(--zp-gold-light); border-radius: var(--zp-radius); box-shadow: var(--zp-shadow);
}
.entry-content .zp-event figure { margin: 0; }
.entry-content .zp-event figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.entry-content .zp-event p { max-width: none; margin: 0; padding: 14px 16px 16px; font-family: var(--zp-font-display); font-size: 1.2rem; line-height: 1.3; color: var(--zp-teal-dark); }
@media (max-width: 1100px) { .zp-events { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .zp-events { grid-template-columns: 1fr; } }

/* Oznam (Novinky). */
.entry-content .wp-block-pullquote {
	max-width: none; margin: 0 0 2em; padding: 26px 30px; text-align: left; background: var(--zp-teal-tint);
	border: 1px solid var(--zp-gold-light); border-top: 3px solid var(--zp-gold); border-radius: var(--zp-radius);
}
.entry-content .wp-block-pullquote blockquote { margin: 0; padding: 0; border: 0; background: none; font-style: normal; }
.entry-content .wp-block-pullquote p { max-width: none; margin: 0 0 .5em; font-family: var(--zp-font-display); font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.55; }
.entry-content .wp-block-pullquote cite { display: block; margin-top: 1em; font-style: normal; font-family: var(--zp-font-display); font-size: 1.2rem; color: var(--zp-teal-dark); }

/* Zoznam termínov (Letné tábory): každý termín ako lístok s kalendárom. */
.entry-content > ul.zp-dates { display: grid; gap: 10px; margin: 1.4em 0 2em; padding: 0; list-style: none; }
.entry-content > ul.zp-dates li {
	position: relative; margin: 0; padding: 14px 18px 14px 60px; font-size: 1.05rem; background: var(--zp-teal-tint);
	border-left: 3px solid var(--zp-gold); border-radius: 0 var(--zp-radius) var(--zp-radius) 0;
}
.entry-content > ul.zp-dates li::before { content: ""; position: absolute; left: 20px; top: 50%; width: 24px; height: 24px; margin-top: -12px; background: var(--zp-cal) center / contain no-repeat; }

/* Dlhý zoznam (napr. kurzy v O Dielničke) do dvoch stĺpcov. */
.entry-content > ul:not(.zp-dates):has(li:nth-child(8)) { columns: 2; column-gap: 40px; }
.entry-content > ul:not(.zp-dates):has(li:nth-child(8)) li { break-inside: avoid; }
@media (max-width: 640px) { .entry-content > ul:not(.zp-dates):has(li:nth-child(8)) { columns: 1; } }

/* Logá partnerov (staré, vkladané obrázky): pokojný rad rovnako vysokých log namiesto rozhádzaných veľkostí. */
.entry-content > figure.aligncenter img { display: block; width: auto; max-width: 100%; max-height: 100px; margin-inline: auto; }
.entry-content > .wp-block-columns { align-items: center; gap: 24px 48px; margin: 1.6em 0 2.2em; }
.entry-content > .wp-block-columns .wp-block-column { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.entry-content > .wp-block-columns figure { margin: 0; text-align: center; }
.entry-content > .wp-block-columns figure img { display: block; width: auto !important; height: auto !important; max-width: 100%; max-height: 100px; margin-inline: auto; }

/* Súbory na stiahnutie (Výročné správy). */
.entry-content .wp-block-file {
	max-width: none; margin: 0 0 12px; background: #fff; border: 1px solid var(--zp-gold-light);
	border-radius: var(--zp-radius); box-shadow: var(--zp-shadow); transition: border-color .15s;
}
.entry-content .wp-block-file:hover { border-color: var(--zp-gold); }
.entry-content .wp-block-file > a:first-child {
	display: flex; align-items: center; gap: 16px; padding: 16px 20px; color: var(--zp-teal-dark);
	font-family: var(--zp-font-display); font-size: 1.35rem; text-decoration: none;
}
.entry-content .wp-block-file > a:first-child::before {
	content: "SÚBOR"; flex: none; padding: 4px 10px; border-radius: 3px; background: var(--zp-teal); color: #fff;
	font: 700 .72rem/1.2 system-ui, sans-serif; letter-spacing: .06em;
}
.entry-content .wp-block-file > a[href$=".pdf" i]:first-child::before { content: "PDF"; }
.entry-content .wp-block-file > a[href$=".docx" i]:first-child::before { content: "DOCX"; }
.entry-content .wp-block-file > a[href$=".doc" i]:first-child::before { content: "DOC"; }
.entry-content .wp-block-file > a:first-child::after { content: "Stiahnuť ↓"; margin-left: auto; font: 600 .9rem system-ui, sans-serif; color: var(--zp-muted); }
.entry-content .wp-block-file > a:first-child:hover::after { color: var(--zp-teal-dark); }

/* Kontakt: plagát cez celú šírku úplne hore, pod ním podmienky. Telefón, e-mail a adresa sú v pätičke. */
.page-slug-kontakt .entry-content > figure { margin: 0 0 24px; }
.page-slug-kontakt .entry-content > figure img { display: block; width: 100% !important; height: auto !important; aspect-ratio: auto !important; object-fit: contain !important; transform: none !important; }
.page-slug-kontakt .entry-content > p { max-width: none; margin: 0; padding: 20px 22px; background: var(--zp-teal-tint); border-left: 3px solid var(--zp-gold); border-radius: 0 var(--zp-radius) var(--zp-radius) 0; font-size: 1.1rem; }

/* Spolupráca: logá partnerov ako pokojné, rovnako vysoké dlaždice. Nie sú to odkazy a nič sa na nich nehýbe. */
.zp-partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 2.2em 0 .5em; }
.zp-partner { display: flex; flex-direction: column; margin: 0; background: #fff; border: 1px solid var(--zp-gold-light); border-radius: var(--zp-radius); box-shadow: var(--zp-shadow); overflow: hidden; }
.entry-content .zp-partner__logo { display: flex; align-items: center; justify-content: center; height: 150px; padding: 26px 30px; }
.entry-content .zp-partner__logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: 0; box-shadow: none; border-radius: 0; transform: none; transition: none; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.entry-content .zp-partner__name { display: flex; flex: 1; align-items: center; justify-content: center; margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--zp-gold-light); background: var(--zp-teal-tint); text-align: center; font-family: var(--zp-font-display); font-size: 1.1rem; line-height: 1.3; color: var(--zp-teal-dark); }

/* Prehliadač fotiek (Iné aktivity). */
.entry-content a.zp-lb { display: block; cursor: zoom-in; }
.zp-lb-open { overflow: hidden; }
.zp-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 56px 72px; background: rgba(8, 32, 36, .94); }
.zp-lightbox[hidden] { display: none; }
.zp-lightbox__fig { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; margin: 0; }
.zp-lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 2px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.zp-lightbox__img.is-loaded { opacity: 1; }
.zp-lightbox__cap { margin: 0; max-width: 60ch; color: #fff; font-family: var(--zp-font-display); font-size: 1.25rem; text-align: center; }
.zp-lightbox__count { position: absolute; top: 18px; left: 22px; color: rgba(255, 255, 255, .75); font: 600 .9rem system-ui, sans-serif; }
.zp-lightbox__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; padding: 0 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font: 400 2.2rem/1 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
.zp-lightbox__btn:hover, .zp-lightbox__btn:focus-visible { background: rgba(255, 255, 255, .3); }
.zp-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.zp-lightbox__close { top: 12px; right: 16px; font-size: 2rem; }
.zp-lightbox__prev, .zp-lightbox__next { top: 50%; margin-top: -26px; }
.zp-lightbox__prev { left: 12px; }
.zp-lightbox__next { right: 12px; }
@media (max-width: 640px) {
	.zp-lightbox { padding: 52px 8px 76px; }
	.zp-lightbox__prev, .zp-lightbox__next { top: auto; bottom: 14px; margin-top: 0; }
	.zp-lightbox__prev { left: 16px; }
	.zp-lightbox__next { right: 16px; }
}

/* ---------- Pohyb a jemné detaily ----------
   Všetko je striedme a vypína sa pri prefers-reduced-motion (viď koniec). Odhaľovanie pri scrolle riadi theme.js (.reveal / .is-in). */
::selection { background: var(--zp-teal-light); color: var(--zp-text); }
h1, h2, h3 { text-wrap: balance; }
.entry-content a { text-decoration-color: var(--zp-gold-light); text-decoration-thickness: 2px; transition: color .15s, text-decoration-color .2s; }
.entry-content a:hover { text-decoration-color: var(--zp-gold); }

/* Indikátor posunu stránky. */
.scroll-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; pointer-events: none;
	transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--zp-teal), var(--zp-gold));
}
@media (min-width: 961px) { .scroll-progress { left: var(--zp-side); } }

/* Úvodný záber: pomalé zjemnenie pri načítaní, tmavší spodok pre šípku a ornament na spodnej hrane. */
.hero__img { animation: zp-hero 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, rgba(10, 45, 50, .3), transparent); pointer-events: none; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 2; background: var(--zp-band) 0 0 / 28px 10px repeat-x; }
.hero__down { z-index: 3; }
.hero__down::before { animation: zp-bob 2.4s ease-in-out infinite; }
.photo-section { margin-top: clamp(32px, 6vw, 72px); background: linear-gradient(to bottom, var(--zp-teal-tint), #fff 70%); }

@keyframes zp-hero { from { scale: 1.08; opacity: .55; } to { scale: 1; opacity: 1; } }
@keyframes zp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }
@keyframes zp-in { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

/* Odhaľovanie prvkov pri scrollovaní (bez JS ostáva všetko viditeľné). */
.js .reveal:not(.is-in) { opacity: 0; translate: 0 22px; }
.js .reveal.is-in { animation: zp-in .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms) backwards; }

/* Karty: jemné nadvihnutie a pomalé priblíženie fotky. */
.kurz, .zp-event { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, border-color .35s; }
.kurz:hover, .zp-event:hover { transform: translateY(-4px); border-color: var(--zp-gold); box-shadow: 0 2px 4px rgba(15, 60, 65, .06), 0 16px 36px rgba(15, 60, 65, .12); }
.zp-photos figure, .entry-content > figure.wp-block-image:not([class*="align"]) { overflow: hidden; border-radius: var(--zp-radius); }
.entry-content .kurz figure img, .entry-content .zp-event figure img, .entry-content .zp-photos figure img, .photo img,
.entry-content > figure.wp-block-image:not([class*="align"]) img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.kurz:hover figure img, .zp-event:hover figure img, .zp-photos figure:hover img, .photo:hover img { transform: scale(1.05); }
.entry-content > figure.wp-block-image:not([class*="align"]):hover img { transform: scale(1.03); }

/* Tlačidlá a logo. */
.wp-block-button__link, .button, input[type="submit"], button[type="submit"] { transition: background .15s, transform .25s, box-shadow .25s; }
.wp-block-button__link:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(13, 124, 129, .28); }
.wp-block-button__link:active, .button:active { transform: none; box-shadow: none; }
.site-branding .custom-logo { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.site-branding .custom-logo-link:hover .custom-logo { transform: scale(1.05) rotate(-2deg); }

/* Plynulý prechod medzi stránkami (prehliadače s View Transitions; panel ostáva stáť, mení sa len obsah). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: zp-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

@media (prefers-reduced-motion: reduce) {
	@view-transition { navigation: none; }
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* 404 */
.error-404 { text-align: center; padding-block: 40px; }
.error-404 .search-form { max-width: 420px; margin: 24px auto 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .site-footer, .to-top { display: none; } }
