/*
Theme Name: Syria 2008
Theme URI: http://syria.konkel.eu/
Author: Karol Konkel
Description: Motyw bloga podróżniczego „Syria 2008. Przez Turcję i Liban”. Nowa szata graficzna dla dotychczasowej treści – te same wpisy, strony, zdjęcia i widgety. Responsywny, z podglądem zdjęć (lightbox) i nawigacją między rozdziałami podróży.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: syria-2008
*/

/* ------------------------------------------------------------------
   1. Zmienne
------------------------------------------------------------------ */
:root {
	--piasek: #f5efe3;
	--piasek-2: #ebe2d0;
	--papier: #fffdf8;
	--atrament: #2a241d;
	--atrament-2: #5d5245;
	--terakota: #a94a24;
	--terakota-ciemna: #843817;
	--oliwka: #6f7a45;
	--linia: #dcd0b8;
	--cien: 0 1px 2px rgba(60, 40, 10, .06), 0 8px 24px rgba(60, 40, 10, .07);

	--szeryf: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--bezszeryf: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--szer-strony: 1140px;
	--szer-tresci: 700px;
	--odstep: clamp(16px, 4vw, 40px);
}

/* ------------------------------------------------------------------
   2. Podstawy
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--piasek);
	color: var(--atrament);
	font-family: var(--szeryf);
	font-size: 1.125rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img, iframe, video, embed, object { max-width: 100%; }
img { height: auto; }

a { color: var(--terakota); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover, a:focus { color: var(--terakota-ciemna); }
:focus-visible { outline: 2px solid var(--terakota); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; color: var(--atrament); }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--atrament); color: #fff; padding: 10px 16px; font-family: var(--bezszeryf);
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

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

/* ------------------------------------------------------------------
   3. Nagłówek z panoramą
------------------------------------------------------------------ */
.site-header {
	position: relative;
	min-height: clamp(240px, 36vw, 400px);
	display: flex;
	align-items: flex-end;
	background-color: #6b5a44;
	background-image:
		linear-gradient(180deg, rgba(20, 14, 6, .05) 0%, rgba(20, 14, 6, .15) 45%, rgba(20, 14, 6, .72) 100%),
		var(--naglowek, none);
	background-size: cover;
	background-position: center 40%;
	color: #fff;
}
.site-header__inner {
	width: 100%;
	max-width: var(--szer-strony);
	margin: 0 auto;
	padding: 48px var(--odstep) 32px;
}
.site-header__kicker {
	margin: 0 0 .5rem;
	font-family: var(--bezszeryf);
	font-size: .78rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	opacity: .9;
}
.site-title {
	margin: 0;
	font-size: clamp(1.9rem, 4.6vw, 3.2rem);
	font-weight: 600;
	line-height: 1.1;
	text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.site-title a { color: #fff; text-decoration: none; }
.site-title a:hover { color: #fff; }
.site-description {
	margin: .6rem 0 0;
	font-style: italic;
	font-size: clamp(1rem, 2vw, 1.2rem);
	opacity: .95;
	text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

/* ------------------------------------------------------------------
   4. Menu
------------------------------------------------------------------ */
.main-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--atrament);
	font-family: var(--bezszeryf);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.admin-bar .main-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .main-nav { top: 0; } }

.main-nav__inner {
	max-width: var(--szer-strony);
	margin: 0 auto;
	padding: 0 var(--odstep);
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav li { margin: 0; }
.main-nav a {
	display: block;
	padding: 14px 16px;
	color: #efe6d6;
	text-decoration: none;
	font-size: .95rem;
	letter-spacing: .02em;
	border-bottom: 3px solid transparent;
}
.main-nav li:first-child a { padding-left: 0; }
.main-nav a:hover, .main-nav a:focus { color: #fff; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
	color: #fff;
	border-bottom-color: var(--terakota);
}

.main-nav__toggle {
	display: none;
	align-items: center;
	gap: 10px;
	background: none;
	border: 0;
	color: #fff;
	font: inherit;
	font-size: 1rem;
	padding: 14px 0;
	cursor: pointer;
}
.main-nav__bars, .main-nav__bars::before, .main-nav__bars::after {
	display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
}
.main-nav__bars::before { position: absolute; top: -6px; }
.main-nav__bars::after { position: absolute; top: 6px; }

@media (max-width: 720px) {
	.main-nav__toggle { display: inline-flex; }
	.main-nav__list { display: none; padding-bottom: 8px; }
	.main-nav.is-open .main-nav__list { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav a, .main-nav li:first-child a { padding: 10px 0; border-bottom: 0; border-left: 3px solid transparent; }
	.main-nav .current-menu-item > a,
	.main-nav .current_page_item > a { border-left-color: var(--terakota); padding-left: 10px; }
}

/* ------------------------------------------------------------------
   5. Układ: treść + pasek boczny
------------------------------------------------------------------ */
.site-body {
	max-width: var(--szer-strony);
	margin: 0 auto;
	padding: clamp(24px, 5vw, 56px) var(--odstep);
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
}
@media (max-width: 960px) {
	.site-body { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------
   6. Wpisy i strony
------------------------------------------------------------------ */
.entry {
	background: var(--papier);
	border-radius: 6px;
	box-shadow: var(--cien);
	padding: clamp(22px, 5vw, 56px);
	margin-bottom: 32px;
}
.entry-header { margin-bottom: 1.6rem; }
.entry-date {
	margin: 0 0 .5rem;
	font-family: var(--bezszeryf);
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--oliwka);
	font-weight: 600;
}
.entry-title {
	margin: 0;
	font-size: clamp(1.65rem, 3.6vw, 2.35rem);
}
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--terakota); }

.entry-content { max-width: var(--szer-tresci); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.15em; hyphens: auto; }
.entry-content p:empty { display: none; }
.entry-content h2, .entry-content h3 { margin: 1.8em 0 .6em; }
.entry-content blockquote {
	margin: 1.5em 0; padding: .2em 0 .2em 1.2em;
	border-left: 3px solid var(--terakota); font-style: italic; color: var(--atrament-2);
}
.entry-content iframe { display: block; margin: 1em 0; border: 0; }
.entry-content small { font-size: .85rem; }

/* Na telefonach wyjustowany tekst tworzy „dziury” między słowami – wyrównujemy do lewej */
@media (max-width: 600px) {
	.entry-content [style*="justify"] { text-align: left !important; }
}

/* Stare akapity z Worda (class="MsoNormal") – bez dodatkowych marginesów */
.entry-content .MsoNormal { margin: 0 0 1.15em; }

/* Zdjęcia z podpisami ([caption]) – te same miejsca w tekście, co dotąd */
.entry-content .wp-caption,
.entry-content figure {
	max-width: 100%;
	margin: 1.8em auto;
}
.entry-content .wp-caption img,
.entry-content figure img {
	display: block;
	border-radius: 3px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.entry-content .wp-caption-text,
.entry-content figcaption,
.entry-content .wp-caption-dd {
	margin: .55em 0 0;
	font-family: var(--bezszeryf);
	font-size: .85rem;
	line-height: 1.45;
	color: var(--atrament-2);
	text-align: left;
}
/* stary zapis podpisów z TinyMCE (<dl class="wp-caption">) */
.entry-content dl.wp-caption { padding: 0; }
.entry-content .wp-caption-dt { margin: 0; }
.entry-content .wp-caption-dd { margin-left: 0; }

.entry-content img.aligncenter, .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.alignnone { margin-left: auto; margin-right: auto; }
.entry-content img.alignnone { display: inline-block; }
.entry-content::after { content: ""; display: table; clear: both; }

.entry-content a:has(> img) { display: inline-block; cursor: zoom-in; }

.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--linia);
	font-family: var(--bezszeryf);
	font-size: .88rem;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	color: var(--atrament-2);
}

.archive-header { margin-bottom: 24px; }
.archive-title { font-size: 1.5rem; margin: 0; }
.archive-title span { color: var(--terakota); }

/* ------------------------------------------------------------------
   7. Nawigacja między rozdziałami / wpisami
------------------------------------------------------------------ */
.chapter-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 0 0 32px;
}
.chapter-nav__link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	background: var(--papier);
	border-radius: 6px;
	box-shadow: var(--cien);
	text-decoration: none;
	color: var(--atrament);
	transition: transform .15s ease;
}
.chapter-nav__link:hover { transform: translateY(-2px); color: var(--atrament); }
.chapter-nav__link--next { text-align: right; }
.chapter-nav__label {
	font-family: var(--bezszeryf);
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--terakota);
	font-weight: 600;
}
.chapter-nav__title { font-size: 1.05rem; line-height: 1.35; }
@media (max-width: 560px) {
	.chapter-nav { grid-template-columns: 1fr; }
	.chapter-nav__link--next { text-align: left; }
}

.posts-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--bezszeryf);
	margin-bottom: 32px;
}
.posts-navigation .nav-next { order: -1; }
.posts-navigation a {
	display: inline-block;
	padding: 12px 20px;
	background: var(--atrament);
	color: #fff;
	border-radius: 999px;
	text-decoration: none;
	font-size: .92rem;
}
.posts-navigation a:hover { background: var(--terakota); color: #fff; }
.posts-navigation .nav-previous { margin-left: auto; }

/* ------------------------------------------------------------------
   8. Pasek boczny
------------------------------------------------------------------ */
.sidebar {
	font-family: var(--bezszeryf);
	font-size: .95rem;
	position: sticky;
	top: 72px;
}
@media (max-width: 960px) { .sidebar { position: static; } }

.widget {
	background: var(--papier);
	border-radius: 6px;
	box-shadow: var(--cien);
	padding: 22px 24px;
	margin-bottom: 20px;
}
.widget-title, .widget h2 {
	margin: 0 0 12px;
	font-family: var(--bezszeryf);
	font-size: .78rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--terakota);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--piasek-2); line-height: 1.4; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--atrament); text-decoration: none; }
.widget a:hover { color: var(--terakota); }
.widget .post-date { display: block; font-size: .8rem; color: var(--atrament-2); }

/* ------------------------------------------------------------------
   9. Wyszukiwarka, formularze, komentarze
------------------------------------------------------------------ */
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--linia);
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	color: var(--atrament);
}
button, input[type="submit"], .search-submit {
	padding: 10px 18px;
	border: 0;
	border-radius: 4px;
	background: var(--terakota);
	color: #fff;
	font-family: var(--bezszeryf);
	font-size: .95rem;
	cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: var(--terakota-ciemna); }
.main-nav__toggle:hover { background: none; }

.comments {
	background: var(--papier);
	border-radius: 6px;
	box-shadow: var(--cien);
	padding: clamp(22px, 5vw, 48px);
	margin-bottom: 32px;
	font-size: 1rem;
}
.comments-title, .comment-reply-title { font-size: 1.3rem; margin: 0 0 1rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--piasek-2); }
.comment-meta { font-family: var(--bezszeryf); font-size: .85rem; color: var(--atrament-2); }
.comment-meta a { color: var(--atrament-2); }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .fn { font-style: normal; font-weight: 600; color: var(--atrament); }
.comment-author .says { display: none; }
.reply { font-family: var(--bezszeryf); font-size: .85rem; }
.comment-form label { display: block; font-family: var(--bezszeryf); font-size: .88rem; margin-bottom: 4px; }
.comment-form p { margin: 0 0 14px; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; }

/* ------------------------------------------------------------------
   10. Stopka
------------------------------------------------------------------ */
.site-footer {
	background: var(--atrament);
	color: #cfc4b1;
	font-family: var(--bezszeryf);
	font-size: .88rem;
}
.site-footer__inner {
	max-width: var(--szer-strony);
	margin: 0 auto;
	padding: 32px var(--odstep);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
}
.site-footer p { margin: 0; }
.site-footer__name { font-family: var(--szeryf); font-size: 1.05rem; color: #fff; }
.site-footer a { color: #efe6d6; }
.site-footer a:hover { color: #fff; }

/* ------------------------------------------------------------------
   11. Podgląd zdjęć (lightbox)
------------------------------------------------------------------ */
.lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(15, 11, 6, .95);
	padding: 56px 16px 72px;
	font-family: var(--bezszeryf);
}
.lb.is-open { display: flex; }
.lb__figure { margin: 0; text-align: center; max-width: 100%; max-height: 100%; }
.lb__img {
	display: block;
	margin: 0 auto;
	max-width: min(1600px, calc(100vw - 32px));
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
	background: #222;
}
.lb__caption { color: #eee; margin-top: 12px; font-size: .92rem; }
.lb__btn {
	position: absolute;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: 0;
	border-radius: 999px;
	width: 48px;
	height: 48px;
	font-size: 1.4rem;
	line-height: 1;
	padding: 0;
	cursor: pointer;
}
.lb__btn:hover { background: rgba(255, 255, 255, .25); }
.lb__close { top: 12px; right: 12px; }
.lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; top: 24px; left: 20px; color: #bbb; font-size: .85rem; }
body.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.chapter-nav__link { transition: none; }
}

/* ------------------------------------------------------------------
   12. Druk
------------------------------------------------------------------ */
@media print {
	.main-nav, .sidebar, .chapter-nav, .posts-navigation, .comments, .site-footer { display: none; }
	.site-body { display: block; }
	.site-header { min-height: 0; background: none; color: #000; }
	.site-title a { color: #000; text-shadow: none; }
	.entry { box-shadow: none; padding: 0; }
}
