/* ZST Mechanik — style uzupełniające theme.json */

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

.skip-link:focus { z-index: 100000; }

/* ---------- Nagłówek ---------- */
.zst-topbar { font-size: .875rem; }
.zst-topbar a { color: inherit; text-decoration: none; }
.zst-topbar a:hover { text-decoration: underline; }

.zst-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--wp--preset--color--border); }
.admin-bar .zst-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .zst-header { top: 0; position: relative; } }

.zst-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.zst-header .wp-block-navigation a { text-decoration: none; }
.zst-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.zst-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--primary-dark); }
.zst-header .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--border) !important; border-radius: 10px; box-shadow: var(--wp--preset--shadow--card); padding: .4rem 0; min-width: 240px !important; }
.zst-header .wp-block-navigation__submenu-container a { padding: .45rem 1rem !important; }

/* ---------- Slider (aktualności wyróżnione) ---------- */
.zst-slider { position: relative; }
.zst-slider .wp-block-post-template {
	display: grid !important; grid-auto-flow: column; grid-auto-columns: 100%;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	gap: 0 !important; margin: 0; padding: 0; border-radius: 16px;
}
.zst-slider .wp-block-post-template::-webkit-scrollbar { display: none; }
.zst-slider .wp-block-post-template > li { scroll-snap-align: start; margin: 0 !important; }
.zst-slider .wp-block-cover { border-radius: 16px; }
.zst-slider .wp-block-cover .wp-block-post-title a { color: #fff; text-decoration: none; }
.zst-slider .wp-block-cover .wp-block-post-title a:hover { text-decoration: underline; }
.zst-slider__nav { position: absolute; inset: auto 1rem 1rem auto; display: flex; gap: .5rem; z-index: 3; }
.zst-slider__nav button {
	width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.92); color: var(--wp--preset--color--ink); font-size: 1.25rem; line-height: 1;
}
.zst-slider__nav button:hover { background: var(--wp--preset--color--primary); }
.zst-slider__nav button:focus-visible { outline: 3px solid var(--wp--preset--color--primary); outline-offset: 2px; }

/* ---------- Karty i kafelki ---------- */
.is-style-card {
	background: #fff; border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px; box-shadow: var(--wp--preset--shadow--card);
}
.is-style-tile {
	position: relative; background: #fff; border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
	border-top: 4px solid var(--wp--preset--color--primary);
}
.is-style-tile:hover, .is-style-tile:focus-within { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--card); border-color: var(--wp--preset--color--primary); }
.is-style-tile a { text-decoration: none; color: var(--wp--preset--color--ink); }
/* cały kafelek klikalny — pierwszy link w nagłówku */
.is-style-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.is-style-tile h3 a:focus-visible { outline: none; }
.is-style-tile h3 a:focus-visible::after { outline: 3px solid var(--wp--preset--color--ink); outline-offset: 2px; }
.zst-tile-more { color: var(--wp--preset--color--primary-dark); font-weight: 700; }

/* Szybkie linki */
.zst-quick .is-style-tile { border-top-width: 1px; text-align: center; }
.zst-quick .is-style-tile h3 { font-size: 1rem; font-family: var(--wp--preset--font-family--montserrat); font-weight: 700; margin: 0; }

/* Karty wpisów */
.zst-posts .wp-block-post { display: flex; flex-direction: column; }
.zst-posts .wp-block-post-featured-image { aspect-ratio: 16/10; overflow: hidden; margin-bottom: .75rem; }
.zst-posts .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.zst-posts .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.zst-posts .wp-block-post-title { margin-top: .25rem; }

/* Przyciski */
.wp-block-button.is-style-dark .wp-block-button__link { background: var(--wp--preset--color--ink); color: #fff; }
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline .wp-block-button__link { border-width: 2px; }

/* Listy linków (stopka, boczne) */
.is-style-links { list-style: none; padding-left: 0; }
.is-style-links li { margin: .35rem 0; }
.is-style-links a { text-decoration: none; }
.is-style-links a:hover { text-decoration: underline; }

/* Stopka */
.zst-footer a { color: #fff; }
.zst-footer .is-style-links a { color: rgba(255,255,255,.88); }
.zst-footer .is-style-links a:hover { color: var(--wp--preset--color--primary); }

/* Paginacja */
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .7rem; border-radius: 8px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--ink); font-weight: 700; }

/* Treść wpisów — tabele i iframe (PDF, mapy) */
.wp-block-post-content iframe { max-width: 100%; }
.wp-block-post-content table { width: 100%; }

/* ---------- Mobile ---------- */
.zst-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 781px) {
	.zst-header-cta, .zst-tagline { display: none !important; }
	.zst-topbar p { margin: 0; }
	.zst-slider__nav { inset: 1rem 1rem auto auto; }
	.zst-slider .wp-block-post-excerpt { display: none; }
	.zst-slider .wp-block-cover { min-height: 340px !important; }
}

/* ---------- Menu główne (pasek pod logo) ---------- */
.zst-menubar { margin-top: .6rem !important; padding-top: .55rem; border-top: 1px solid var(--wp--preset--color--border); }
.zst-mainnav { width: 100%; }
.zst-mainnav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; font-weight: 700;
}
@media (max-width: 599px) { .zst-menubar { margin-top: 0 !important; padding-top: 0; border-top: 0; position: absolute; right: clamp(1rem,4vw,2rem); top: .9rem; width: auto; } .zst-header { position: relative; } .zst-header > .alignwide:first-child { padding-right: 2.5rem; } }

/* ---------- Skróty ikonowe ---------- */
.zst-shortcuts { display: flex; gap: .5rem; margin: 0; }
.zst-ico {
	display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px;
	background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink) !important;
	font-size: .85rem; font-weight: 700; text-decoration: none !important; border: 1px solid #f3d6ad;
}
.zst-ico:hover { background: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); }
.zst-ico::before {
	content: ""; width: 20px; height: 20px; flex: none; background: currentColor;
	-webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.zst-ico--dziennik { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20V3H6.5A2.5 2.5 0 0 0 4 5.5z'/%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 0 6.5 22H20v-5'/%3E%3Cpath d='M9 8h7M9 12h5'/%3E%3C/svg%3E"); }
.zst-ico--plan { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18M8 14h2M14 14h2M8 18h2M14 18h2'/%3E%3C/svg%3E"); }
.zst-ico--zastepstwa { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 2l4 4-4 4'/%3E%3Cpath d='M3 11V9a3 3 0 0 1 3-3h15'/%3E%3Cpath d='M7 22l-4-4 4-4'/%3E%3Cpath d='M21 13v2a3 3 0 0 1-3 3H3'/%3E%3C/svg%3E"); }
@media (max-width: 1100px) {
	.zst-ico { padding: .55rem; }
	.zst-ico span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Pasek formalny w stopce ---------- */
.zst-legalbar { background: rgba(0,0,0,.25); }
.zst-legal-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.zst-legal-links a { color: #fff; font-weight: 600; }

@media (max-width: 599px) { .zst-topbar p:last-child { display: none; } }
@media (max-width: 1240px) and (min-width: 600px) { .zst-mainnav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { font-size: .78rem; letter-spacing: .02em; } }
