/*
Theme Name: Petr Štěpánek
Description: Šablona podle původního Joomla webu (mondrian1 / Artisteer), tři sloupce, responzivní.
Version: 1.0
Requires PHP: 8.1
Text Domain: petrstepanek
*/

:root {
	--ps-text: #212B31;
	--ps-muted: #666;
	--ps-link: #254F6F;
	--ps-link-hover: #326A95;
	--ps-title: #183449;
	--ps-title-bg: #D4E0E8;
	--ps-box-bg: #E8EEF2;
	--ps-box-border: #C9D6DF;
	--ps-inner-bg: #D9E4EB;
	--ps-inner-border: #AFC6D4;
	--ps-date: #E39C00;
	--ps-sheet-width: 980px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: #FEFEFE url('images/Page-BgSimpleGradient.jpg') repeat-x top left;
	color: var(--ps-text);
	font: 13px/1.45 Helvetica, Arial, sans-serif;
}

body::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 1153px;
	max-width: 100%;
	height: 182px;
	background: url('images/Page-BgGlare.png') no-repeat center top;
	z-index: -1;
}

a { color: var(--ps-link); text-decoration: none; }
a:hover { color: var(--ps-link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* Sheet */
.sheet {
	width: var(--ps-sheet-width);
	max-width: 100%;
	margin: 30px auto 0;
	background: #fff;
	box-shadow: 0 0 8px rgba(0, 0, 0, .12);
}

/* Header: logo a fotky jsou primo v obrazku */
.site-header a {
	display: block;
	aspect-ratio: 980 / 200;
	background: #12283A url('images/Header.jpg') no-repeat center / cover;
}

/* Layout */
.layout {
	display: grid;
	grid-template-columns: 195px minmax(0, 1fr) 195px;
	gap: 0 12px;
	padding: 8px 8px 0;
}
.layout > * { min-width: 0; }
.sidebar-left { grid-column: 1; grid-row: 1; }
.content { grid-column: 2; grid-row: 1; padding: 8px 6px 20px; }
.sidebar-right { grid-column: 3; grid-row: 1; }

/* Sidebar blocks */
.block {
	background: var(--ps-box-bg);
	border: 1px solid var(--ps-box-border);
	box-shadow: 1px 1px 3px rgba(0, 0, 0, .15);
	padding: 8px;
	margin-bottom: 12px;
}
.block-header {
	height: 30px;
	margin: 0 0 8px;
	background: url('images/BlockHeader.png') no-repeat left top;
	background-size: auto 30px;
	overflow: hidden;
	border-radius: 2px;
}
.block-header h2 {
	margin: 0;
	padding-left: 44px;
	background: url('images/BlockHeaderIcon.png') no-repeat 5px 0;
	color: #fff;
	font-size: 15px;
	font-weight: bold;
	line-height: 30px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.block .menu,
.block .textwidget,
.block .ps-random-photo {
	background: var(--ps-inner-bg);
	border: 1px solid var(--ps-inner-border);
	padding: 4px 6px;
}
.block .custom-html-widget > table { margin: 0 auto; }
.block ul.menu { list-style: none; margin: 0; }
.block ul.menu li {
	margin: .45em 0;
	padding-left: 18px;
	background: url('images/BlockContentBullets.png') no-repeat 2px 2px;
	line-height: 1.2em;
}
.block ul.menu a { font-weight: bold; font-size: 13px; }
.block ul.menu a:visited { color: #658395; }
.block .current-menu-item > a { color: #000; }
.block table img { display: block; }
.ps-random-photo { text-align: center; }
.ps-random-photo img { display: block; margin: 0 auto; }

/* Posledni aktuality (titulka) */
.latest-news { list-style: none; margin: 0 0 18px; padding: 0; }
.latest-news li {
	padding-left: 22px;
	margin-bottom: 6px;
	background: no-repeat 0 2px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23C9D6DF' stroke='%2337576D' stroke-width='1.6' d='M12 2l2.9 6.6 7.1.6-5.4 4.7 1.6 7-6.2-3.7-6.2 3.7 1.6-7L2 9.2l7.1-.6z'/%3E%3C/svg%3E");
}
.latest-news .date { display: block; color: var(--ps-date); font-size: 11px; font-weight: bold; }
.latest-news a { color: #10365A; font-weight: bold; font-size: 14px; }

.page-heading {
	display: inline-block;
	margin: 0 0 22px;
	padding: 3px 4px;
	background: var(--ps-title-bg);
	color: var(--ps-title);
	font-size: 17px;
}

/* Posts */
.post { margin-bottom: 30px; }
.post-title {
	margin: 0;
	padding: 5px 6px;
	background: var(--ps-title-bg);
	color: var(--ps-title);
	font-size: 18px;
	line-height: 1.3;
}
.post-title a { color: inherit; }
.post-meta { margin: 4px 6px 14px; color: var(--ps-muted); font-size: 12px; font-weight: bold; }
.post-meta a { color: inherit; }
.post-body { padding: 0 6px; text-align: justify; overflow-wrap: break-word; }
.post-body img { max-width: 100%; height: auto !important; }
.post-body iframe, .post-body video, .post-body embed, .post-body object { max-width: 100%; }
.post-body blockquote {
	margin: 1em 0;
	padding: 6px 10px 6px 40px;
	background: var(--ps-title-bg) url('images/PostQuote.png') no-repeat 4px 4px;
	border: 1px solid var(--ps-inner-border);
}
.post-body table { max-width: 100%; }
.read-more {
	display: inline-block;
	margin: 10px 6px 0;
	padding: 1px 3px;
	background: #C8C8C8;
	color: #555;
	font-size: 11px;
}
.read-more:hover { background: #B0B0B0; color: #222; text-decoration: none; }

.pagination { margin: 20px 6px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 2px 7px; margin: 0 1px; border: 1px solid var(--ps-inner-border); }
.pagination .current { background: var(--ps-title-bg); font-weight: bold; }

/* Footer */
.site-footer {
	margin-top: 10px;
	padding: 22px 10px;
	background: #12283A;
	color: #C3D4DF;
	font-size: 11px;
	text-align: center;
}
.site-footer p { margin: 0; }

/* Mobile: obsah nahoru, bocni sloupce pod nej */
@media (max-width: 1000px) {
	.sheet { margin-top: 0; }
	.layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px; }
	.post-body table, .post-body img, .post-body div, .post-body p { max-width: 100% !important; width: auto !important; }
	.post-body table { display: block; overflow-x: auto; }
	.content { grid-column: 1 / -1; grid-row: 1; padding: 8px 0 10px; }
	.sidebar-left { grid-column: 1; grid-row: 2; }
	.sidebar-right { grid-column: 2; grid-row: 2; }
}
@media (max-width: 600px) {
	body { font-size: 15px; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar-left, .sidebar-right { grid-column: 1; grid-row: auto; }
	.post-body { text-align: left; }
	/* inline velikosti z Joomla editoru (12px) jsou na mobilu necitelne */
	.post-body [style*="font-size"] { font-size: inherit !important; }
	.post-title { font-size: 19px; }
}
