/* ==========================================================================
   Zarządca — motyw potomny Astry
   Kolorystyka oparta na logo (terakota/bordo) na jasnym, czystym tle.
   ========================================================================== */

:root {
	--zc-brand: #8a3324;          /* terakota / bordo z logo */
	--zc-brand-dark: #6d2619;
	--zc-brand-light: #f3e7e3;
	--zc-accent: #c0613f;
	--zc-link: #b0432e;          /* jaśniejszy terakotowy — kolor linków/akcentu */
	--zc-ink: #222;
	--zc-muted: #5d5d5d;
	--zc-bg: #fff;
	--zc-bg-soft: #faf7f5;
	--zc-line: #e4ddd9;
	--zc-radius: 12px;
	--zc-shadow: 0 2px 10px rgba(0, 0, 0, .06);
	--zc-shadow-hover: 0 8px 24px rgba(138, 51, 36, .14);
	--zc-maxw: 1180px;
}

/* Zmiana domyślnego akcentu Astry (niebieski) na markowy terakotowy —
   wpływa na linki, hover, menu i przyciski Astry. Selektor html:root ma
   wyższą swoistość niż :root Astry, więc nadpisanie jest pewne. */
html:root {
	--ast-global-color-0: var(--zc-link); /* jaśniejszy akcent / kolor linków */
	--ast-global-color-1: #8a3324;         /* hover — ciemniejszy (na jasnym tle) */
}

body {
	color: var(--zc-ink);
}

/* Logo zawiera już napis „Zarządca" — ukrywamy tekstowy tytuł obok niego.
   Dostępność zapewnia atrybut alt logo. */
.ast-site-identity .site-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.zc-container {
	max-width: var(--zc-maxw);
	margin-inline: auto;
	padding-inline: 20px;
}

/* --- Pasek awaryjny (globalny) -------------------------------------------- */
.zc-emergency {
	background: var(--zc-brand-dark);
	color: #fff;
	font-size: 14px;
}
.zc-emergency__inner {
	max-width: var(--zc-maxw);
	margin-inline: auto;
	padding: 8px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	justify-content: center;
}
.zc-emergency__label { font-weight: 700; }
.zc-emergency__tel {
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}
.zc-emergency__tel:hover { text-decoration: underline; color: #fff; }
.zc-emergency__tel strong { letter-spacing: .3px; }

/* --- Przyciski ------------------------------------------------------------ */
.zc-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.zc-btn--primary {
	background: var(--zc-brand);
	color: #fff;
}
.zc-btn--primary:hover {
	background: var(--zc-brand-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--zc-shadow-hover);
}
.zc-btn--ghost {
	background: transparent;
	color: var(--zc-brand);
	border: 2px solid var(--zc-brand);
}
.zc-btn--ghost:hover { background: var(--zc-brand); color: #fff; }

/* Główny przycisk-akcja (hero) — mocno wyeksponowany, biały na ciemnym tle. */
.zc-btn--cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 10px;
	background: #fff;
	color: var(--zc-brand);
	font-size: 1.05rem;
	font-weight: 700;
	padding: 13px 28px;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
	transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.zc-btn--cta .bi { font-size: 1.25em; }
.zc-btn--cta:hover {
	background: var(--zc-brand-light);
	color: var(--zc-brand-dark);
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}

.zc-link { color: var(--zc-link); font-weight: 600; text-decoration: none; }
.zc-link:hover { text-decoration: underline; }
.zc-link--pdf { color: var(--zc-accent); }

/* --- Hero ----------------------------------------------------------------- */
.zc-hero {
	background:
		linear-gradient(135deg, rgba(138, 51, 36, .92), rgba(109, 38, 25, .92));
	color: #fff;
	padding: 72px 0;
	text-align: center;
}
.zc-hero__title {
	font-size: clamp(1.8rem, 4vw, 3rem);
	line-height: 1.15;
	margin: 0 0 16px;
	color: #fff;
}
.zc-hero__subtitle {
	font-size: clamp(1rem, 2vw, 1.2rem);
	max-width: 720px;
	margin: 0 auto 28px;
	opacity: .95;
}
.zc-hero__actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}
.zc-hero .zc-btn--ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	border-color: #fff;
	font-size: 1.05rem;
	padding: 11px 26px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
	transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.zc-hero .zc-btn--ghost:hover {
	background: #fff;
	color: var(--zc-brand);
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}

/* --- Kafelki szybkich akcji ----------------------------------------------- */
.zc-tiles { padding: 48px 0; background: var(--zc-bg); margin-top: -36px; }
.zc-tiles__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}
.zc-tile {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 26px 22px;
	background: var(--zc-bg);
	border: 1px solid var(--zc-line);
	border-radius: var(--zc-radius);
	box-shadow: var(--zc-shadow);
	text-decoration: none;
	color: var(--zc-ink);
	transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.zc-tile:hover {
	transform: translateY(-3px);
	box-shadow: var(--zc-shadow-hover);
	border-color: var(--zc-brand);
}
.zc-tile__icon { font-size: 2rem; }
.zc-tile__title { font-weight: 700; font-size: 1.05rem; color: var(--zc-brand); }
.zc-tile__desc { font-size: .9rem; color: var(--zc-muted); }

/* --- Sekcje / nagłówki ---------------------------------------------------- */
.zc-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 2px solid var(--zc-line);
	padding-bottom: 10px;
	margin-bottom: 22px;
}
.zc-section-head h2 { margin: 0; font-size: 1.5rem; color: var(--zc-brand); }

/* --- Strumień: aktualności + sidebar -------------------------------------- */
.zc-feed { padding: 24px 0 64px; background: var(--zc-bg-soft); }
.zc-feed__layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
}

/* --- Karty (grid) --------------------------------------------------------- */
.zc-grid { display: grid; gap: 20px; }
.zc-grid--news,
.zc-grid--archive { grid-template-columns: repeat(2, 1fr); }
.zc-grid--admins,
.zc-grid--buildings { grid-template-columns: repeat(3, 1fr); }

.zc-card {
	background: var(--zc-bg);
	border: 1px solid var(--zc-line);
	border-radius: var(--zc-radius);
	padding: 22px;
	box-shadow: var(--zc-shadow);
}
.zc-card__title { margin: 0 0 6px; font-size: 1.15rem; }
.zc-card__title a { color: var(--zc-ink); text-decoration: none; }
.zc-card__title a:hover { color: var(--zc-brand); }
.zc-card__date { color: var(--zc-muted); font-size: .85rem; margin: 0 0 10px; }
.zc-card__termin { font-size: .9rem; margin: 0 0 8px; }
.zc-card__excerpt { color: var(--zc-ink); font-size: .95rem; }
.zc-card__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.zc-card__media img { border-radius: 8px; margin-bottom: 12px; }
.zc-card__meta { list-style: none; margin: 8px 0 0; padding: 0; font-size: .92rem; }
.zc-card__meta li { margin: 4px 0; }
.zc-card__streets { margin-top: 14px; border-top: 1px solid var(--zc-border, #e5e2dd); padding-top: 10px; }
.zc-card__streets-title { margin: 0 0 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--zc-brand-dark); }
.zc-card__streets-list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: .86rem;
	columns: 2;
	column-gap: 18px;
	max-height: 12.5em;
	overflow-y: auto;
}
.zc-card__streets-list li { margin: 2px 0; break-inside: avoid; }
@media (max-width: 480px) { .zc-card__streets-list { columns: 1; } }

.zc-badge {
	display: inline-block;
	background: var(--zc-brand-light);
	color: var(--zc-brand-dark);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: .75rem;
	font-weight: 700;
	margin-left: 8px;
}

/* --- Listy (sidebar) ------------------------------------------------------ */
.zc-widget { margin-bottom: 36px; }
.zc-list { list-style: none; margin: 0; padding: 0; }
.zc-list li {
	padding: 10px 0;
	border-bottom: 1px solid var(--zc-line);
	display: flex;
	flex-direction: column;
}
.zc-list li a { color: var(--zc-ink); text-decoration: none; font-weight: 600; }
.zc-list li a:hover { color: var(--zc-brand); }
.zc-list__meta { font-size: .8rem; color: var(--zc-muted); }

/* --- Archiwa i pojedyncze ------------------------------------------------- */
.zc-archive, .zc-single { padding: 48px 0; }
.zc-archive__head h1, .zc-single__head h1 { color: var(--zc-brand); }
.zc-single__main { max-width: 820px; margin-inline: auto; }
.zc-content { line-height: 1.7; }
.zc-content ul { padding-left: 1.3em; }
.zc-facts { list-style: none; padding: 0; margin: 0 0 24px; }
.zc-facts li {
	padding: 8px 0;
	border-bottom: 1px solid var(--zc-line);
}
.zc-callout {
	background: var(--zc-brand-light);
	border-left: 4px solid var(--zc-brand);
	padding: 16px 20px;
	border-radius: 8px;
	margin: 24px 0;
}
.zc-callout h2 { margin-top: 0; font-size: 1.2rem; color: var(--zc-brand-dark); }
.zc-admin-detail { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.zc-admin-detail__photo img { border-radius: var(--zc-radius); }
.zc-attachment { margin-top: 28px; }
.zc-pagination { margin-top: 32px; }

/* --- Stopka: dane firmy --------------------------------------------------- */
.zc-footer-info {
	background: var(--zc-brand-dark);
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
	padding: 22px 0;
}
.zc-footer-info__name {
	font-weight: 700;
	font-size: 15px;
	margin: 0 0 12px;
	color: #fff;
}
.zc-footer-info__cols {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 12px 40px;
}
.zc-footer-info__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.zc-footer-info__col li {
	margin: 3px 0;
	opacity: .92;
}
.zc-footer-info__col a {
	color: #fff;
	text-decoration: none;
}
.zc-footer-info__col a:hover { text-decoration: underline; color: #fff; }

.zc-footer-nav { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); }
.zc-footer-nav__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 6px 22px;
}
.zc-footer-nav__list a { color: #fff; text-decoration: none; opacity: .92; font-size: 13px; }
.zc-footer-nav__list a:hover { text-decoration: underline; opacity: 1; color: #fff; }

@media (max-width: 768px) {
	.zc-footer-info__cols { grid-template-columns: 1fr; gap: 14px; }
}

/* ==========================================================================
   Menu główne — animowane tło wokół linku po najechaniu
   ========================================================================== */
.main-header-menu .menu-link {
	position: relative;
	z-index: 0;
	border-radius: 6px;
	transition: color .2s ease;
}
.main-header-menu .menu-link::before {
	content: "";
	position: absolute;
	inset: 3px 4px;
	background: var(--zc-brand-light);
	border-radius: 6px;
	opacity: 0;
	transform: scale(.85);
	transition: opacity .25s ease, transform .25s ease;
	z-index: -1;
}
.main-header-menu .menu-item:hover > .menu-link::before,
.main-header-menu .menu-link:hover::before,
.main-header-menu .menu-link:focus-visible::before {
	opacity: 1;
	transform: scale(1);
}

/* ==========================================================================
   Dostępność (WCAG) + widżet „Ułatwienia dostępu"
   ========================================================================== */

/* Wyraźny fokus klawiatury na elementach interaktywnych. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.zc-tile:focus-visible,
.zc-btn:focus-visible {
	outline: 3px solid #1c5fd6 !important;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Ograniczenie ruchu dla osób z taką preferencją. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
	.zc-tile:hover, .zc-btn--primary:hover, .zc-card:hover { transform: none !important; }
}

/* Powiększanie tekstu (skala na <html> — wpływa na treść w rem/em). */
html.zc-fs-1 { font-size: 112.5%; }
html.zc-fs-2 { font-size: 125%; }

/* Podkreślanie odnośników. */
html.zc-underline a { text-decoration: underline !important; }

/* Tryb wysokiego kontrastu (opt-in). */
html.zc-contrast body { background: #000 !important; color: #fff !important; }
html.zc-contrast body *:not(svg):not(path) {
	background-color: transparent !important;
	color: #fff !important;
	border-color: #fff !important;
	box-shadow: none !important;
	text-shadow: none !important;
}
html.zc-contrast a, html.zc-contrast a * { color: #ff0 !important; text-decoration: underline !important; }
html.zc-contrast :is(input, select, textarea, button, .zc-btn) {
	background: #000 !important;
	color: #fff !important;
	border: 2px solid #fff !important;
}
html.zc-contrast :focus-visible { outline-color: #ff0 !important; }

/* --- Widżet „Ułatwienia dostępu" --- */
.zc-a11y { position: fixed; left: 16px; bottom: 16px; z-index: 99999; }
.zc-a11y__toggle {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--zc-brand); color: #fff; border: 2px solid #fff;
	border-radius: 999px; padding: 10px 16px; cursor: pointer;
	font-weight: 600; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.zc-a11y__toggle:hover { background: var(--zc-brand-dark); }
.zc-a11y__icon { font-size: 20px; line-height: 1; }
.zc-a11y__panel {
	position: absolute; bottom: calc(100% + 10px); left: 0;
	background: #fff; color: var(--zc-ink); border: 1px solid var(--zc-line);
	border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.2);
	padding: 14px; width: 240px;
}
.zc-a11y__head { margin: 0 0 6px; font-weight: 700; font-size: 13px; color: var(--zc-muted); }
.zc-a11y__row { display: flex; gap: 6px; margin-bottom: 10px; }
.zc-a11y__row button {
	flex: 1; padding: 8px 0; border: 1px solid var(--zc-line); background: #fff;
	border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--zc-ink);
}
.zc-a11y__row button:nth-child(2) { font-size: 17px; }
.zc-a11y__row button:nth-child(3) { font-size: 20px; }
.zc-a11y__opt, .zc-a11y__reset {
	display: block; width: 100%; text-align: left; padding: 9px 12px; margin-bottom: 6px;
	border: 1px solid var(--zc-line); background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px;
	color: var(--zc-ink);
}
.zc-a11y__reset { margin-bottom: 0; color: var(--zc-muted); }
/* Hover przycisków panelu — czytelny, markowy (nadpisuje domyślny styl przycisków Astry). */
.zc-a11y__row button:hover,
.zc-a11y__opt:hover,
.zc-a11y__reset:hover {
	background: var(--zc-brand-light);
	color: var(--zc-ink);
	border-color: var(--zc-brand);
}
.zc-a11y [aria-pressed="true"] { background: var(--zc-brand); color: #fff; border-color: var(--zc-brand); }
.zc-a11y [aria-pressed="true"]:hover { background: var(--zc-brand-dark); color: #fff; }
.zc-a11y__toggle[aria-expanded="true"] { background: var(--zc-brand-dark); }

@media (max-width: 640px) {
	.zc-a11y__label { display: none; }
	.zc-a11y__toggle { padding: 12px; }
}

/* --- Responsywność -------------------------------------------------------- */
@media (max-width: 980px) {
	.zc-feed__layout { grid-template-columns: 1fr; }
	.zc-tiles__grid { grid-template-columns: repeat(2, 1fr); }
	.zc-grid--admins, .zc-grid--buildings { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.zc-hero { padding: 48px 0; }
	.zc-tiles { margin-top: 0; padding: 32px 0; }
	.zc-tiles__grid { grid-template-columns: 1fr; }
	.zc-grid--news, .zc-grid--archive,
	.zc-grid--admins, .zc-grid--buildings { grid-template-columns: 1fr; }
	.zc-emergency__inner { font-size: 13px; }
}

/* --- Tabela administratorów (ulica → administrator) ----------------------- */
.zc-archive__subhead { margin: 48px 0 20px; color: var(--zc-brand); font-size: 1.5rem; }

.zc-admin-table { margin-bottom: 16px; }
.zc-admin-table__search {
	display: flex; align-items: center; gap: 10px;
	max-width: 420px; margin: 0 0 18px;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid var(--zc-line);
	border-radius: 999px;
}
.zc-admin-table__search:focus-within { border-color: var(--zc-brand); }
.zc-admin-table__search .bi { color: var(--zc-brand); font-size: 1.05rem; }
.zc-admin-table__search input {
	flex: 1; border: 0; outline: 0; background: transparent;
	font-size: 1rem; color: var(--zc-ink); padding: 2px 0;
}

.zc-table { width: 100%; border-collapse: collapse; background: #fff; }
.zc-table thead th {
	text-align: left; padding: 12px 14px;
	background: var(--zc-brand); color: #fff;
	font-size: .9rem; letter-spacing: .02em;
}
.zc-table thead th:first-child { border-top-left-radius: var(--zc-radius); }
.zc-table thead th:last-child { border-top-right-radius: var(--zc-radius); }
.zc-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--zc-line); }
.zc-table tbody tr:nth-child(even) { background: var(--zc-brand-light); }
.zc-table tbody tr:hover { background: #fbeee9; }
.zc-table--admins td:first-child { font-weight: 600; }
.zc-table--admins a { color: var(--zc-link); text-decoration: none; font-weight: 600; white-space: nowrap; }
.zc-table--admins a:hover { text-decoration: underline; }
.zc-table--admins .zc-ext { color: var(--zc-brand-dark); font-weight: 700; }
.zc-admin-table__empty { margin: 14px 2px; color: var(--zc-ink); font-style: italic; }

@media (max-width: 640px) {
	.zc-table--admins thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
	.zc-table--admins, .zc-table--admins tbody, .zc-table--admins tr, .zc-table--admins td { display: block; width: 100%; }
	.zc-table--admins tr {
		margin-bottom: 12px; border: 1px solid var(--zc-line);
		border-radius: var(--zc-radius); overflow: hidden;
	}
	.zc-table--admins tbody tr:nth-child(even) { background: #fff; }
	.zc-table--admins td { border-bottom: 1px solid var(--zc-line); display: flex; justify-content: space-between; gap: 14px; }
	.zc-table--admins td:last-child { border-bottom: 0; }
	.zc-table--admins td::before {
		content: attr(data-label); font-weight: 700; color: var(--zc-brand-dark);
	}
}

/* ==========================================================================
   Baner informacyjny o ciasteczkach
   ========================================================================== */
.zc-cookie {
	position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99998;
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	max-width: 720px; margin-inline: auto;
	background: #fff; color: #1a1a1a;
	border: 1px solid var(--zc-line); border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
	padding: 16px 20px;
}
.zc-cookie[hidden] { display: none; }
.zc-cookie__text { margin: 0; flex: 1 1 320px; font-size: 14px; line-height: 1.5; }
.zc-cookie__text a { color: var(--zc-brand); text-decoration: underline; }
.zc-cookie__accept {
	flex: 0 0 auto; cursor: pointer;
	background: var(--zc-brand); color: #fff; border: 2px solid transparent;
	border-radius: 999px; padding: 10px 22px; font-weight: 600;
}
.zc-cookie__accept:hover { background: var(--zc-brand-dark); }

/* Nie zasłaniaj się z widżetem dostępności (lewy dolny róg). */
@media (max-width: 600px) {
	.zc-cookie { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; }
}
