/*
 * Long texts: posts (weekly announcements, events), the article style, and the elements of
 * the "O nas" pages (timeline, date list, cross list, table of contents, side panel, …).
 */

/* Article text (posts, long pages): bold phrases are highlighted automatically. */
.is-style-artykul strong {
	color: var(--wp--preset--color--accent);
}

/* Sans text inside serif articles (small cards). */
.tekst-sans {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	line-height: var(--wp--custom--line-height--body);
}

/* Weekly announcements
 ---------------------------------------------------------------------------- */

/* The hint "plan at the bottom" only shows when the post has an attached file. */
article:not(:has(.wp-block-file)) .ogloszenia-wskazowka {
	display: none;
}

.ogloszenia-wskazowka a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.ogloszenia-wskazowka strong {
	color: var(--wp--preset--color--accent);
}

/* The attached PDF (File block): preview in a card, link text and button below it. */
.wp-block-post-content .wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--medium);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
}

.wp-block-post-content .wp-block-file__embed {
	flex: 1 0 100%;
	margin: 0;
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: var(--wp--preset--border-radius--medium);
	background: var(--wp--preset--color--surface);
}

.wp-block-post-content .wp-block-file .wp-block-file__button {
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--large);
	border-radius: var(--wp--preset--border-radius--pill);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
}

/* "← Poprzednie" link under a post: small label above the title. */
.post-nav-previous {
	font-weight: 600;
}

.post-nav-previous .post-navigation-link__label {
	display: block;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

/* Long article with a side panel (Nasz Kościół Polski): on wider screens the
   panel sits on the right and the text flows around it; below the panel the
   text uses the full width. On phones the panel simply comes first.
 ---------------------------------------------------------------------------- */
.artykul-z-panelem {
	display: flow-root;
}

.panel-obok {
	color: var(--wp--preset--color--text-body);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	font-style: normal;
	line-height: var(--wp--custom--line-height--body);
}

@media (min-width: 782px) {
	.artykul-z-panelem > .panel-obok {
		float: right;
		width: 36%;
		margin: 0 0 var(--wp--preset--spacing--x-large) var(--wp--preset--spacing--xx-large);
	}

	/* Pictures and quotes next to the panel get narrower instead of sliding under it. */
	.artykul-z-panelem > .wp-block-image,
	.artykul-z-panelem > .wp-block-pullquote {
		display: flow-root;
	}
}

/* Date list (Kalendarium): year on the left, event on the right; on phones the year
   stands above its event, so long words never push the card wider than the screen. */
.kalendarium {
	margin: 0;
	padding: 0;
	list-style: none;
}

.kalendarium li {
	display: grid;
	grid-template-columns: 6rem minmax(0, 1fr);
	gap: var(--wp--preset--spacing--medium);
	padding-block: var(--wp--preset--spacing--medium);
	border-top: 1px solid var(--wp--custom--color--divider);
}

.kalendarium li:first-child {
	padding-top: 0;
	border-top: 0;
}

.kalendarium li:last-child {
	padding-bottom: 0;
}

.kalendarium strong {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

@media (max-width: 599px) {
	.kalendarium li {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--xx-small);
	}
}

/* Vertical timeline (Bogdan Jański). Each point: year, heading, text. */
.os-czasu__punkt {
	position: relative;
	margin-left: 5.5rem;
	padding: 0 0 var(--wp--preset--spacing--x-large) var(--wp--preset--spacing--x-large);
	border-left: 2px solid var(--wp--preset--color--border-light);
}

.os-czasu__punkt:last-child {
	padding-bottom: 0;
	border-left-color: transparent;
}

.os-czasu__punkt::before {
	content: "";
	position: absolute;
	top: 0.5rem;
	left: -0.5rem;
	width: 0.875rem;
	height: 0.875rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px var(--wp--preset--color--surface);
}

.os-czasu__punkt > .os-czasu__rok {
	position: absolute;
	top: 0;
	left: -5.5rem;
	width: 4.5rem;
	margin: 0;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	text-align: right;
}

/* Phones: the year moves above its heading, so the text gets the whole width
   (beside the line) instead of a narrow column next to the years. */
@media (max-width: 599px) {
	.os-czasu__punkt {
		margin-left: var(--wp--preset--spacing--xx-small);
		padding-left: var(--wp--preset--spacing--large);
	}

	.os-czasu__punkt > .os-czasu__rok {
		position: static;
		width: auto;
		line-height: var(--wp--custom--line-height--snug);
		text-align: left;
	}

	.os-czasu__punkt::before {
		top: 0.35rem;
	}
}

/* List with small crosses instead of dots (Charyzmat). */
.lista-krzyz {
	padding-left: 0;
	list-style: none;
}

.lista-krzyz li {
	position: relative;
	padding-left: var(--wp--preset--spacing--x-large);
}

.lista-krzyz li::before {
	content: "✝";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
}

/* Rows of the "Domy Zmartwychwstania" list (Galilea): name left, day + phone right. */
.dom-wiersz {
	padding-block: var(--wp--preset--spacing--small);
	border-bottom: 1px solid var(--wp--custom--color--divider);
	font-size: var(--wp--preset--font-size--small);
}

.dom-wiersz p {
	margin: 0;
}

.wp-block-details .dom-wiersz {
	margin-block: 0;
}

/* Round emblem images (Zmartwychwstańcy). */
.obraz-okragly img {
	padding: var(--wp--preset--spacing--small);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
}

/* Table of contents (Zmartwychwstańcy): the entries hang on a thin vertical line, like the
   timeline further down; the entry under the mouse (or keyboard focus) is marked in red.
   On wider screens the card stays in view while scrolling down the page. */
.spis-przyklejony > .is-style-etykieta + .spis-tresci {
	margin-top: var(--wp--preset--spacing--medium);
}

.spis-tresci {
	margin: 0;
	padding: 0;
	border-left: 2px solid var(--wp--preset--color--border-light);
	list-style: none;
}

.spis-tresci li {
	margin: 0;
	padding: 0;
}

.spis-tresci a {
	display: block;
	margin-left: -2px;
	padding: var(--wp--preset--spacing--x-small) 0 var(--wp--preset--spacing--x-small) var(--wp--preset--spacing--medium);
	border-left: 2px solid transparent;
	color: var(--wp--preset--color--ink);
	line-height: var(--wp--custom--line-height--snug);
	text-decoration: none;
}

.spis-tresci a:is(:hover, :focus-visible) {
	border-left-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

@media (min-width: 782px) {
	.spis-przyklejony {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--preset--spacing--large));
	}
}

/* Highlighted quote inside a long article (red, centred). */
.cytat-akcent {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--x-large);
	text-align: center;
}

/* Grave inscription (Bogdan Jański) */
.epitafium {
	padding: var(--wp--preset--spacing--medium) var(--wp--preset--spacing--large);
	border-radius: var(--wp--preset--border-radius--small);
	background: var(--wp--preset--color--dark);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.06em;
	text-align: center;
}

/* Prayer text (Modlitwa zmartwychwstańcza) */
.modlitwa {
	font-family: var(--wp--preset--font-family--article);
	font-size: var(--wp--preset--font-size--large);
	font-style: italic;
	line-height: var(--wp--custom--line-height--article);
}
