/*
Theme Name: SerceTaty.pl
Theme URI: https://sercetaty.pl
Author: Eljasz
Description: Jasny, ciepły motyw blogowy w barwach czerwieni, terakoty i błękitu — baner nagłówka z opisem witryny, czytelna, gęsto złożona typografia, delikatnie wyróżnione wpisy z nagraniami audio/wideo oraz kompaktowy, jasny panel boczny.
Version: 2.0.0
Requires at least: 6.0
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: sercetaty
*/

:root {
	--bg: #ffffff;
	--bg-panel: #fcf3ea;
	--sidebar-font: "Merriweather", Georgia, serif;
	--bg-dark-2: #2a0f0c;
	--ink: #35201c;
	--muted: #8a6b61;
	--line: #f0d7cb;
	--red: #c8283c;
	--red-deep: #a01f30;
	--red-bright: #ff5d72;
	--terracotta: #c97a42;
	--terracotta-deep: #a35f30;
	--terracotta-bright: #f0a868;
	--blue: #3f6690;
	--blue-deep: #2c4b6b;
	--amber-hover: #ffc994;
	--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 1.05rem/1.6 var(--serif);
}
img, video, embed { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--red); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--terracotta-bright); outline-offset: 2px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 0.6rem 1rem; background: var(--bg-panel); color: var(--ink); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Baner nagłówka: obraz, kolorowa linia na dole i opis witryny */
.masthead {
	position: relative; display: flex; flex-direction: column; justify-content: space-between;
	min-height: clamp(260px, 32vw, 400px);
	background: var(--bg-dark-2) var(--banner-image, none) center / cover no-repeat;
}
.masthead::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to bottom,
		rgba(40,15,12,0.55) 0%, rgba(40,15,12,0) 28%,
		rgba(40,15,12,0) 58%, rgba(40,15,12,0.82) 100%);
}
.masthead::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2;
	background: linear-gradient(90deg, var(--red), var(--bg-panel) 55%, var(--amber-hover));
	box-shadow: 0 0 14px rgba(200,40,60,0.45), 0 0 14px rgba(255,201,148,0.4);
}
.masthead__home { position: absolute; inset: 0; z-index: 0; text-indent: -9999px; overflow: hidden; }
.masthead__home:focus-visible { outline-offset: -4px; }

.masthead__bar { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; width: 100%; padding-top: 0.5rem; }
.masthead__brand { position: absolute; top: 3.25rem; left: 0; right: 0; z-index: 1; }
.custom-logo { display: block; max-height: 72px; width: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5)); }
.site-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.masthead__desc { position: relative; z-index: 1; width: 100%; padding-bottom: 1.1rem; pointer-events: none; }
.site-description {
	margin: 0; max-width: 40rem; color: #fff3ec;
	font: italic 1.05rem/1.5 var(--serif);
	text-shadow: 0 1px 10px rgba(0,0,0,0.55);
}

.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
	display: block; padding: 0.85rem 0; color: #fff5ef; text-decoration: none;
	font: 500 1rem var(--sans); border-bottom: 2px solid transparent;
	text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { border-bottom-color: var(--terracotta-bright); color: #fff; }
.nav-toggle {
	display: none; margin-top: 0.6rem; background: rgba(40,15,12,0.5); color: #fff5ef; cursor: pointer;
	border: 1px solid rgba(255,245,239,0.5); border-radius: 999px; padding: 0.45rem 1.1rem; font: 600 0.95rem var(--sans);
}

/* Układ */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3.5rem; padding-top: 3.5rem; padding-bottom: 4.5rem; }
.archive-header { margin: 0 0 2.5rem; }
.archive-title { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.2rem)/1.2 var(--display); color: var(--red); }
.archive-description { margin: 0.5rem 0 0; color: var(--muted); }

/* Wpisy */
.post { margin: 0; }
.post + .post { margin-top: 2.75rem; }
.post--text + .post--text { padding-top: 2.75rem; border-top: 1px dotted var(--line); }
.post__meta { display: flex; flex-wrap: wrap; gap: 0.15rem 1.25rem; margin: 0 0 0.55rem; color: var(--muted); font: 0.88rem/1.5 var(--sans); }
.post__date time { cursor: help; border-bottom: 1px dotted var(--muted); }
.post__meta a { color: var(--red); }
.post__meta a:hover { color: var(--amber-hover); }
.post__title { margin: 0 0 0.65rem; font: 700 1.55rem/1.24 var(--display); letter-spacing: -0.01em; }
.post__title a { color: var(--ink); text-decoration: none; }
.post__title a:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; }
.post__more { font: 600 0.95rem var(--sans); color: var(--red); }
.post__more:hover { color: var(--amber-hover); }

/* Najnowszy wpis */
.post--lead .post__title { font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.16; letter-spacing: -0.015em; }
.post--lead .entry-content { font-size: 1.1rem; }

/* Nagrania: delikatnie wyróżnione, bez własnego tła */
.post--media {
	display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1.5rem;
	padding: 1.9rem clamp(1.25rem, 3vw, 0rem); background: transparent; color: var(--ink);
}
.post--media .post__meta, .post--media .post__meta a { color: var(--muted); }
.post--media .post__meta a:hover { color: var(--amber-hover); }
.post--media .post__title a { color: var(--ink); }
.post--media .post__title a:hover { color: var(--red); }
.post--media .entry-content { color: var(--ink); }
.post--media .entry-content a { color: var(--red); }
.post--media .entry-content h2, .post--media .entry-content h3, .post--media .entry-content h4 { color: var(--red); }
.post--media .entry-content blockquote { border-left-color: var(--red); color: var(--ink); }
.post--media .entry-content figcaption, .post--media .wp-caption-text { color: var(--muted); }
.post--media .entry-content th, .post--media .entry-content td { border-color: var(--line); }
.post--media .entry-content pre { background: #fff; border-color: var(--line); color: var(--ink); }
.post__icon { width: 60px; height: 60px; color: var(--red); filter: drop-shadow(0 0 4px rgba(200,40,60,0.25)); }
.post__kind {
	display: block; margin-bottom: 0.3rem; color: var(--red); font: 700 0.82rem var(--sans);
	text-transform: uppercase; letter-spacing: 0.08em;
}
.button {
	display: inline-block; padding: 0.55rem 1.25rem; color: #fff6f1; text-decoration: none;
	border-radius: 999px; font: 700 0.95rem var(--sans);
	background: linear-gradient(90deg, var(--red-bright), var(--blue));
	box-shadow: 0 0 16px rgba(255,93,114,0.28);
}
.button:hover { background: linear-gradient(90deg, var(--terracotta-bright), var(--blue)); box-shadow: 0 0 16px rgba(240,168,104,0.32); }

/* Pojedynczy wpis */
.entry { max-width: 100%; }
.entry__header { margin-bottom: 1.75rem; }
.entry__title { margin: 0 0 0.75rem; font: 700 clamp(1.8rem, 4.2vw, 2.6rem)/1.17 var(--display); letter-spacing: -0.015em; color: var(--ink); }
.entry__kind { display: block; margin-bottom: 0.35rem; color: var(--red); font: 700 0.85rem var(--sans); text-transform: uppercase; letter-spacing: 0.08em; }
.entry-content { font-size: 1.05rem; line-height: 1.6; }
.entry-content > * { max-width: 100%; }
.entry-content > .alignwide, .entry-content > .alignfull, .entry-content > figure,
.entry-content > .wp-block-embed, .entry-content > .wp-block-video, .entry-content > .wp-block-audio,
.entry-content > iframe, .entry-content > video, .entry-content > audio { max-width: 100%; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.9rem 0 0.6rem; font-family: var(--display); line-height: 1.28; color: var(--red); }
body.page .entry-content h2 { color: #000; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.05rem; }
.entry-content blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.25rem; border-left: 4px solid var(--red); font-style: italic; }
.entry-content a:hover { color: var(--amber-hover); }
.entry-content hr { margin: 2rem 0; border: 0; border-top: 2px solid var(--red); }
.entry-content figure { margin: 1.5rem 0; }
.entry-content img { border-radius: 10px; padding: 5px; background: #fff; box-sizing: border-box; box-shadow: inset 0 0 0 1px var(--line); }
.entry-content figcaption, .wp-caption-text { margin-top: 0.35rem; color: var(--muted); font: 0.87rem/1.4 var(--sans); }
.entry-content audio { display: block; width: 100%; margin: 1.25rem 0; }
.entry-content video { display: block; width: 100%; margin: 0 0 1rem; background: #000; }
.entry-content iframe { border: 0; }
.entry-content .wp-has-aspect-ratio iframe { width: 100%; }
.entry-content .wp-block-table { overflow-x: auto; margin: 0 0 1.3rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.3rem; font: 1rem/1.5 var(--serif); background: #fff; }
.entry-content .wp-block-table table { margin-bottom: 0; min-width: 100%; }
.entry-content th, .entry-content td { padding: 0.55rem 0.75rem; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--bg-panel); color: var(--ink); font-weight: 700; }
.entry-content tbody tr:nth-child(even) td { background: var(--bg-panel); }
.entry-content table caption { caption-side: bottom; padding-top: 0.5rem; font: 0.85rem var(--sans); color: var(--muted); text-align: left; }
.entry-content pre { overflow-x: auto; padding: 0.9rem; background: var(--bg-panel); border: 1px solid var(--line); font-size: 0.87rem; }

/* Przyciski i pola formularzy, jeśli pojawią się w treści wpisu */
.entry-content .wp-block-button__link,
.entry-content input[type="submit"],
.entry-content input[type="button"] {
	display: inline-block; padding: 0.55rem 1.25rem; border-radius: 999px; border: 0;
	background: var(--red); color: #fff6f1;
	font: 700 0.95rem var(--sans); text-decoration: none; cursor: pointer; line-height: 1.3;
}
.entry-content .wp-block-button__link:hover,
.entry-content input[type="submit"]:hover,
.entry-content input[type="button"]:hover {
	background: var(--amber-hover); color: #fff;
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: var(--red); border: 2px solid var(--red);
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--red); color: #fff; }
.entry-content input[type="text"], .entry-content input[type="email"], .entry-content input[type="url"],
.entry-content input[type="search"], .entry-content input[type="tel"], .entry-content input[type="number"],
.entry-content textarea, .entry-content select {
	width: 100%; max-width: 100%; padding: 0.6rem 0.75rem; background: #fff;
	border: 1px solid var(--line); border-radius: 6px; font: 1rem var(--sans); color: var(--ink);
}
.entry-content input:focus, .entry-content textarea:focus, .entry-content select:focus {
	outline: none;
}
.entry-content input[type="text"]:hover, .entry-content input[type="email"]:hover, .entry-content input[type="url"]:hover,
.entry-content input[type="search"]:hover, .entry-content input[type="tel"]:hover, .entry-content input[type="number"]:hover,
.entry-content textarea:hover, .entry-content select:hover,
.entry-content input[type="text"]:active, .entry-content input[type="email"]:active, .entry-content input[type="url"]:active,
.entry-content input[type="search"]:active, .entry-content input[type="tel"]:active, .entry-content input[type="number"]:active,
.entry-content textarea:active, .entry-content select:active {
	border-color: var(--line); background: #fff; border-width: 1px; font-weight: normal;
}
.alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-footer { margin-top: 2.25rem; padding-top: 1rem; border-top: 1px dotted var(--line); font: 0.92rem var(--sans); color: var(--muted); }
.entry-footer a { color: var(--red); }
.entry-footer a:hover { color: var(--amber-hover); }
.page-links { font-family: var(--sans); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2.75rem; padding-top: 1.4rem; border-top: 1px dotted var(--line); }
.post-nav a { display: block; color: var(--ink); text-decoration: none; font: 700 1.05rem/1.35 var(--display); }
.post-nav a:hover { color: var(--red); }
.post-nav small { display: block; margin-bottom: 0.2rem; color: var(--muted); font: 0.85rem var(--sans); }
.post-nav .next { grid-column: 2; text-align: right; }

/* Paginacja — wyśrodkowana */
.pagination { margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px dotted var(--line); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.5rem; height: 2.5rem; padding: 0 0.85rem;
	border-radius: 999px; background: var(--bg-panel); color: var(--ink);
	text-decoration: none; font: 600 0.95rem var(--sans);
}
.pagination a.page-numbers:hover { background: var(--amber-hover); color: #fff; }
.pagination .current { background: var(--red); color: #fff; font-weight: 700; }
.pagination .dots { background: transparent; color: var(--muted); min-width: auto; padding: 0 0.15rem; }
.pagination .prev, .pagination .next {
	padding: 0; width: 2.5rem; font-weight: 700; background: var(--bg-panel); border: 1px solid var(--line); color: var(--red);
}
.pagination .prev:hover, .pagination .next:hover { background: var(--amber-hover); color: #fff; border-color: transparent; }
.pagination .prev { margin-right: 0.25rem; }
.pagination .next { margin-left: 0.25rem; }
.pagination__arrow { font-size: 1.2em; line-height: 1; }

/* Panel boczny: jasny, kompaktowy */
.sidebar { align-self: start; padding: 1.5rem 1.5rem 0.25rem; background: var(--bg-panel); border-radius: 0 26px 0 26px; font: 0.88rem/1.46 var(--sidebar-font); box-shadow: inset 0 0 0 1px var(--line); }
.widget { margin: 0 0 1.1rem; padding-bottom: 1.1rem; }
.widget:last-child { padding-bottom: 0.5rem; }
.widget-title, .sidebar .wp-block-heading, .sidebar .wp-block-search__label {
	margin: 0 0 0.5rem; font: 700 0.8rem var(--sidebar-font); text-transform: uppercase; letter-spacing: 0.05em; color: var(--red);
}
.widget ul, .widget ol { margin: 0; padding: 0; list-style: none; }
.widget li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 0.6rem; padding: 0.32rem 0; border-bottom: 1px dotted var(--line); line-height: 1.4; }
.widget li:last-child { border-bottom: 0; }
.widget li > ul, .widget li > .children { flex-basis: 100%; padding-left: 0.85rem; }
.widget a { color: var(--ink); text-decoration: none; }
.widget a:hover { color: var(--red); text-decoration: underline; }
.widget a[aria-current="page"] { color: var(--red); font-weight: 700; }
.widget .post-date, .widget .wp-block-latest-posts__post-date { display: block; flex-basis: 100%; color: var(--muted); font-size: 0.76rem; }
.widget select { width: 100%; padding: 0.4rem; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font: inherit; }
.widget audio, .widget video { width: 100%; }
.wp-image-559,
.moje-logo {
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f9ede4;
	animation: sercetaty-heartbeat 1.8s ease-in-out infinite;
}
@keyframes sercetaty-heartbeat {
	0%, 100% { transform: scale(1); }
	20% { transform: scale(1.06); }
	35% { transform: scale(0.98); }
	50% { transform: scale(1.05); }
	65% { transform: scale(1); }
}
.widget p { margin: 0 0 0.5rem; color: var(--muted); }
.widget p:last-child { margin-bottom: 0; }
.tagcloud { line-height: 2.2; text-align: center; }
.tagcloud a { display: inline-block; margin: 0 0.3rem 0.9rem; padding: 0.12rem 0.55rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; font-size: 0.78rem !important; color: var(--red); }
.tagcloud a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.tagcloud a.tag-link-current { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }

/* Blokowy widget "Chmura tagów": zostawiamy naturalny wygląd WordPressa
   (różne rozmiary czcionek wg popularności tagu), oznaczamy tylko bieżący tag. */
.wp-block-tag-cloud { text-align: center; line-height: 33px; }
.wp-block-tag-cloud a.tag-link-current { color: var(--red); font-weight: 700; }
.widget_text .textwidget, .sidebar .wp-block-quote { font: italic 0.88rem/1.46 var(--sidebar-font); color: var(--muted); }

/* Formularze */
.widget_search .widget-title,
.sidebar .wp-block-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.search-form { display: flex; align-items: flex-end; gap: 0.6rem; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 0.4rem 0; background: transparent; border: 0; border-bottom: 2px solid var(--red); border-radius: 0; font: 0.92rem var(--sans); color: var(--ink); }
.sidebar .search-field { font-size: 0.88rem; }
.search-submit, .comment-form .submit, .sidebar .wp-block-search__button {
	padding: 0.4rem 0.9rem; color: #fff6f1; border: 0; border-radius: 999px; font: 600 0.83rem var(--sans); cursor: pointer;
	background: var(--red);
}
.search-submit:hover, .sidebar .wp-block-search__button:hover, .comment-form .submit:hover { background: var(--amber-hover); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 0.55rem 0.7rem; background: #fff; border: 1px solid var(--line); border-radius: 0; font: 0.98rem var(--sans); color: var(--ink);
}

/* Komentarze */
.comments-area { margin-top: 3rem; padding-top: 1.75rem; border-top: 2px solid var(--line); font: 0.97rem/1.55 var(--sans); }
.comments-title { margin: 0 0 1.1rem; font: 700 1.35rem var(--display); color: var(--red); }
.comment-list, .comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin-left: 1.5rem; padding-left: 1.25rem; border-left: 2px solid var(--line); }
.comment-body { padding: 0.9rem 0; border-bottom: 1px dotted var(--line); }
.comment-meta { color: var(--muted); font-size: 0.85rem; }
.comment-author .avatar { float: left; margin-right: 0.75rem; border-radius: 50%; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; margin-bottom: 0.25rem; font-weight: 600; }

.notice h1 { margin-top: 0; font-family: var(--display); color: var(--red); }

/* Stopka */
.site-footer { background: var(--bg-panel); color: var(--muted); font: 0.92rem/1.6 var(--sans); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.site-footer a { color: var(--red); }
.site-footer a:hover { color: var(--amber-hover); }

@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
	.sidebar { border-radius: 0 22px 0 22px; }
}
@media (max-width: 720px) {
	body { font-size: 1rem; }
	.nav-toggle { display: inline-block; }
	.primary-nav { position: absolute; top: 3.4rem; left: 1.25rem; right: 1.25rem; z-index: 5; display: none; padding: 0.5rem 1.25rem; background: rgba(40,15,12,0.95); border-radius: 0 18px 0 18px; }
	.primary-nav.is-open { display: block; }
	.primary-nav ul { flex-direction: column; }
	.primary-nav a { padding: 0.7rem 0.8rem; border-radius: 8px; }
	.primary-nav .current-menu-item > a, .primary-nav .current_page_item > a {
		background: var(--red-deep);
		color: #fff; border-bottom-color: transparent;
	}
	.primary-nav a:hover, .primary-nav a:focus-visible {
		background: var(--red);
		color: #fff; border-bottom-color: transparent;
	}
	.masthead__bar { justify-content: flex-end; }
	.masthead__desc { padding-bottom: 0.9rem; }
	.site-description { font-size: 0.95rem; }
	.post--media { grid-template-columns: 1fr; gap: 0.7rem; }
	.post__icon { width: 46px; height: 46px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .next { grid-column: 1; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	*:not(.wp-image-559):not(.moje-logo) { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
