/*
Theme Name: xRoman
Description: Motyw strony ksiadzroman.pl – wierne odwzorowanie motywu „xroman” z Drupala 6 (projekt graficzny: Anna Wesołowska).
Author: Tomasz Zaremba
Version: 1.2.1
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: xroman
*/

/* ------------------------------------------------------------------
   Układ i typografia – przeniesione 1:1 z sites/all/themes/xroman/style.css
   ------------------------------------------------------------------ */

body {
	text-align: center;
	font-family: Georgia, serif;
	font-size: 14px;
	color: black;
	background-color: #f3f2f1;
	margin: 8px;
}

img {
	margin: 0px;
	padding: 0px;
	max-width: 100%;
	height: auto;
}

#container {
	margin: 0px auto;
	width: 980px;
	background-color: white;
	margin-top: 50px;
}

#container::after {
	content: "";
	display: table;
	clear: both;
}

#sidebar {
	float: left;
	width: 300px;
	margin-top: 50px;
	margin-left: 70px;
	text-align: left;
}

#page_content {
	float: right;
	width: 540px;
	padding: 0px 50px 0px 20px;
	margin-top: 0px;
	text-align: left;
	min-height: 600px;
}

#footer {
	clear: both;
	font-size: 10px;
	text-align: left;
	padding: 60px 50px 20px 75px;
}

#footer p {
	margin: 1em 0 0;
}

#logo {
	width: 300px;
	margin-bottom: 50px;
}

#logo p {
	font-size: 10px;
	margin: 0;
	padding: 0;
}

#search_box {
	padding: 0;
	margin: 0;
}

#menu {
	margin-left: -6px;
}

#facebook {
	padding-top: 20px;
	min-height: 20px; /* miejsce po dawnym przycisku Facebooka – zachowuje odstęp nad menu */
	font-size: 12px;
}

#facebook a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #3b5998;
}

.content {
	margin: 0px;
	padding: 0px;
}

ul, ul li {
	display: block;
	list-style-type: none;
	padding: 0px;
	padding-bottom: 4px;
}

/* Listy numerowane w treści zachowują numerację (jak w Drupalu) */
.content ol li {
	display: list-item;
	list-style-type: decimal;
}

ul a:link, ul a:visited, ul a:hover {
	text-decoration: none;
	color: black;
}

a:link, a:visited, a:hover {
	text-decoration: none;
	color: black;
}

.submit_search {
	background-color: #000000;
	border: none;
	height: 22px;
	width: 65px;
	color: #fff;
	font-size: 13px;
	font-family: Arial, Helvetica, sans-serif;
	vertical-align: middle;
	margin-left: 1px;
	margin-top: -3px;
	cursor: pointer;
}

.bottom_line {
	background: url('images/bottom_bar.png') no-repeat;
	padding: 2.5px 0px;
}

.clear {
	clear: both;
}

.search_input {
	width: 162px;
	height: 18px;
	border: 1px solid #a7a9ac;
	background: url('images/search.png') no-repeat left top;
	font-family: Georgia, serif;
	vertical-align: middle;
	padding: 0 2px 0 20px;
	box-sizing: content-box;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

.search_input:focus,
.search_input.has-value {
	background: none;
	padding-left: 4px;
	width: 178px;
}

.breadcrumb {
	padding-bottom: 0.5em;
	width: 518px;
	max-width: 100%;
	font-weight: bold;
	border-bottom: 1px solid #a7a9ac;
}

.every_day_thought {
	font-size: 25px;
	font-weight: bold;
	padding: 270px 80px 270px 0px;
	width: 428px;
	font-style: italic;
	line-height: 1.4em;
}

.content_box {
	padding-top: 30px;
	line-height: 1.6em;
}

.h3_page {
	font-size: 15px;
	font-style: italic;
	padding-top: 50px;
}

.p_page {
	font-style: italic;
	text-indent: 20px;
}

#page_content p {
	font-style: italic;
	padding-right: 30px;
}

.friends a:link, .friends a:visited {
	text-decoration: underline;
}

.friends li {
	padding-bottom: 15px;
}

.friends {
	padding-top: 40px;
}

li a.active {
	font-weight: bold;
}

li.active-trail a.active {
	font-weight: bold;
}

#page_content .longer_text {
	line-height: 1.5em;
}

.volume_title {
	font-size: 40px;
	line-height: 1.2em;
}

.volume_desc {
	padding-left: 100px;
	font-size: 30px;
	line-height: 1.2em;
}

.under_logo {
	line-height: 1.2em;
	margin-top: -5px;
	margin-bottom: -10px;
}

.content_line {
	border-bottom: 1px solid #a7a9ac;
	padding: 0px 80px 0px 0px;
	width: 438px;
	max-width: 100%;
	clear: both;
}

.previous_next {
	width: 518px;
}

.press a {
	text-decoration: underline;
}

.press li {
	padding-bottom: 5px;
}

/* ------------------------------------------------------------------
   Elementy dawniej generowane przez moduły Drupala
   ------------------------------------------------------------------ */

/* Menu (system-menus.css) – zagnieżdżone poziomy z wcięciem */
#menu ul.menu {
	margin: 1em 0;
	padding: 0;
}

#menu ul.menu ul.menu {
	margin: 0;
}

#menu ul.menu li {
	margin: 0 0 0 0.5em;
	padding: 0.2em 0.5em 0 0;
}

/* Wiersze: <pre> z Drupala (tekst w <span> Georgia, wcięcia tabulatorem o szerokości
   8 znaków czcionki stałej – jak w oryginale) i blok „Wiersz” (core/verse) z WordPressa */
#page_content pre {
	font-family: monospace, monospace;
	font-size: 14px;
	white-space: pre; /* jak w oryginale: wers nie łamie się w połowie (na telefonie – patrz niżej) */
	background: none;
	border: 0;
	padding: 0;
	margin: 1em 0;
	tab-size: 8;
}

/* „Myśl na każdy tydzień” – duży tekst dziedziczony z .every_day_thought */
#page_content .every_day_thought pre {
	font-size: inherit;
	line-height: inherit;
	margin: 0;
}

#page_content pre.wp-block-verse,
#page_content pre.wp-block-preformatted {
	font-family: Georgia, serif;
	font-style: italic;
}

/* Nawigacja książki (book.css): poprzedni / w górę / następny */
.book-navigation .menu {
	border-top: 1px solid #888;
	padding: 1em 0 0 3em;
	margin: 1em 0 0;
}

.book-navigation .page-links {
	border-top: 1px solid #888;
	border-bottom: 1px solid #888;
	text-align: center;
	padding: 0.5em;
	margin-top: 1em;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 1em;
}

.page-previous {
	text-align: left;
}

.page-up {
	text-align: center;
}

.page-next {
	text-align: right;
}

/* Lista galerii (image_gallery.css) */
ul.galleries {
	margin: 0;
	padding: 0;
}

ul.galleries li {
	padding: 0 0 0 14px;
	margin: 0 0 40px;
	min-height: 100px;
}

ul.galleries li .image_thumbnail_gal {
	float: left;
	width: 100px;
	margin-right: 14px;
}

ul.galleries li .image_thumbnail_gal img {
	display: block;
	max-width: 100px;
	max-height: 100px;
	width: auto;
	height: auto;
}

ul.galleries li h3 {
	margin: 0 0 1em;
	font-size: 17px;
}

ul.galleries li::after {
	content: "";
	display: table;
	clear: both;
}

/* Galeria zdjęć (blok core/gallery): miniatury w siatce, podpis pod zdjęciem, powiększenie po kliknięciu */
#page_content .wp-block-gallery {
	margin: 1em 0;
}

#page_content .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex-direction: column;
	justify-content: flex-start;
}

#page_content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
#page_content .wp-block-image figcaption {
	position: static;
	background: none;
	color: #000;
	text-shadow: none;
	padding: 4px 0 0;
	max-height: none;
	overflow: visible;
	font-size: 11px;
	line-height: 1.3em;
	font-style: italic;
	text-align: left;
}

#page_content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption::before,
#page_content .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
	display: none;
}

/* Wyniki wyszukiwania */
.search-results li {
	padding-bottom: 1.2em;
}

.search-results h3 {
	margin: 0 0 0.3em;
	font-size: 15px;
}

.search-results .snippet {
	font-style: italic;
	font-size: 13px;
}

.pager {
	text-align: center;
	margin: 1em 0;
}

.pager .page-numbers {
	padding: 0 0.3em;
}

.pager .current {
	font-weight: bold;
}

/* Strona „Kontakt” – wstęp był w Drupalu zwykłym tekstem, nie kursywą */
#page_content .contact-intro p {
	font-style: normal;
}

/* Wyrównania z edytora WordPressa */
.alignleft {
	float: left;
	margin: 0 1em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

iframe {
	max-width: 100%;
}

#menu-toggle {
	display: none;
}

/* ------------------------------------------------------------------
   Telefony i tablety (oryginał miał stałą szerokość 980 px).
   Na komputerze wygląd pozostaje bez zmian.
   ------------------------------------------------------------------ */
@media (max-width: 1000px) {
	body {
		margin: 0;
	}

	#container {
		width: auto;
		margin-top: 0;
	}

	#sidebar,
	#page_content {
		float: none;
		width: auto;
		margin: 0;
		padding: 24px 16px 0;
		min-height: 0;
	}

	#logo {
		width: auto;
		margin-bottom: 24px;
	}

	#footer {
		padding: 40px 16px 20px;
	}

	.bottom_line {
		background-size: 100% 1px;
	}

	.breadcrumb,
	.content_line,
	.every_day_thought,
	.previous_next {
		width: auto;
	}

	.every_day_thought {
		padding: 60px 0;
		font-size: 22px;
	}

	#page_content p {
		padding-right: 0;
	}

	#page_content pre {
		white-space: pre-wrap;
	}

	.volume_title {
		font-size: 30px;
	}

	.volume_desc {
		padding-left: 30px;
		font-size: 22px;
	}

	#search-theme-form {
		display: flex;
		gap: 4px;
	}

	.search_input,
	.search_input:focus,
	.search_input.has-value {
		flex: 1;
		min-width: 0;
		width: auto;
		height: 28px;
	}

	.submit_search {
		height: 30px;
		margin: 0;
	}

	#menu-toggle {
		display: block;
		margin-top: 16px;
		width: 100%;
		padding: 8px 12px;
		background: #000;
		color: #fff;
		border: 0;
		font-family: Georgia, serif;
		font-size: 15px;
		text-align: left;
		cursor: pointer;
	}

	#menu-toggle::after {
		content: " ▾";
	}

	#menu-toggle[aria-expanded="true"]::after {
		content: " ▴";
	}

	.js #menu {
		display: none;
		margin-left: 0;
	}

	.js #menu.is-open {
		display: block;
	}

	#menu ul.menu li {
		padding-top: 0.45em;
	}

	#facebook:empty {
		display: none;
	}

	#page_content iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}
}
