/*
 * The dark heading band at the top of every page (block style "Pas nagłówka" on a Group;
 * colours and the normal padding are in styles/blocks/pas-naglowka.json) and the photo
 * band of the home page (Cover block).
 */

/* Heading band: spacing depends on what is in it and what follows, so every page gets
   the same rhythm without padding typed into each page:
   - tabs (Informacje) or visible breadcrumbs above the title: less room at the top,
   - cards that overlap the band from below (group "nachodzi-na-hero"): more room at the bottom.
 ---------------------------------------------------------------------------- */
.is-style-pas-naglowka:has(.zakladki, .wp-block-breadcrumbs li + li) {
	padding-top: var(--wp--preset--spacing--x-large);
}

.is-style-pas-naglowka:has(+ .nachodzi-na-hero) {
	padding-bottom: var(--wp--preset--spacing--xxxx-large);
}

/* Cards right below the band overlap its bottom edge a little. */
.wp-block-post-content > .nachodzi-na-hero {
	position: relative;
	z-index: 1;
	margin-top: calc(var(--wp--preset--spacing--xxx-large) * -1);
}

.is-style-pas-naglowka .wp-block-breadcrumbs {
	color: var(--wp--custom--color--on-dark-muted);
}

.is-style-pas-naglowka .wp-block-breadcrumbs a {
	color: var(--wp--preset--color--accent-on-dark);
}

/* Breadcrumbs never start with "Strona główna" (as in the design: "O nas › Zmartwychwstańcy").
   On top-level pages that would leave only the page itself, which the title repeats right
   below: hide them there (and the gap they leave). */
.is-style-pas-naglowka .wp-block-breadcrumbs:not(:has(li + li)) {
	display: none;
}

.is-style-pas-naglowka .wp-block-breadcrumbs:not(:has(li + li)) + * {
	margin-block-start: 0;
}

/* Date and "Termin wydarzenia" of a post, under its title. */
.is-style-pas-naglowka .wpis-meta,
.is-style-pas-naglowka .wpis-meta .wp-block-post-date {
	color: var(--wp--custom--color--on-dark-muted);
}

/* Tabs above the Informacje pages (Page List of the "Informacje" sub-pages).
   The current page is highlighted automatically. */
.zakladki {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--x-small);
	margin: 0;
	padding: 0;
	list-style: none;
}

.zakladki a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 var(--wp--preset--spacing--medium);
	border: 1px solid var(--wp--custom--color--dark-border);
	border-radius: var(--wp--preset--border-radius--pill);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.zakladki a:hover {
	border-color: var(--wp--preset--color--accent-on-dark);
	color: var(--wp--preset--color--base);
}

.zakladki .current-menu-item > a {
	border-color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--dark);
}

/* Link chips inside the band (Wspólnoty). */
.is-style-pas-naglowka .is-style-chip > .wp-block-button__link {
	border-color: var(--wp--custom--color--dark-border);
	background: transparent;
	color: var(--wp--preset--color--base);
}

.is-style-pas-naglowka .is-style-chip > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--accent-on-dark);
	color: var(--wp--preset--color--base);
}

/* Photo band (Cover block)
 * Without a photo, the overlay turns into the solid dark background from the
 * design brief, so the band never looks washed out.
 ---------------------------------------------------------------------------- */
.wp-block-cover:not(:has(.wp-block-cover__image-background, .wp-block-cover__video-background)) > .wp-block-cover__background.has-background-dim[class*="has-background-dim-"] {
	opacity: 1;
}

/* Home page welcome band: never taller than the screen (phones held sideways would
   otherwise show only the heading, with the buttons below the edge). The 620px comes
   from the block as an inline style, hence !important. */
.wp-block-cover.hero-powitanie {
	min-height: min(620px, 100svh) !important;
}

/* Its photo stays bright: a light black overlay (50 %), and a dense shadow around the letters
   darkens the photo only right behind the text; the lead is semi-bold (owner's choice
   2026-10-26, variant "G" of a live comparison, on every screen width). The photo has dark
   (presbytery) and very bright parts (white columns), and the text may lie on either.
   Shadow layers: tight and dark at the letters, wide and fading further out, so it reads as a
   slightly darker area, not as an outline. Contrast measured at the letters for all widths:
   docs/PROJECT-NOTES.md. Measure again before making the overlay or the shadow lighter.
   The Cover block only offers steps of 10, so the exact overlay value is set here. */
.hero-powitanie:has(> .wp-block-cover__image-background) > .wp-block-cover__background.has-background-dim {
	opacity: 0.5;
}

.hero-powitanie:has(> .wp-block-cover__image-background) .wp-block-cover__inner-container :is(p, h1) {
	text-shadow:
		0 0 2px var(--wp--preset--color--black),
		0 0 6px var(--wp--preset--color--black),
		0 0 14px var(--wp--preset--color--black),
		0 0 28px var(--wp--preset--color--black),
		0 0 56px color-mix(in srgb, var(--wp--preset--color--black) 85%, transparent);
}

.hero-powitanie .wp-block-cover__inner-container p:not(.is-style-nadtytul) {
	font-weight: 500;
}
