/*
Theme Name: Twenty Twenty-Three Child
Template: twentytwentythree
Version: 1.3
Description: Motyw potomny strony Hanny Pasterny.
Text Domain: twentytwentythreechild
*/

/* Spokojna zieleń zamiast jaskrawej (przycisk Szukaj itp.) */
body {
	--wp--preset--color--primary: #d5e8d4;
	--wp--preset--color--secondary: #2f5d46;
	--hp-zielen: #2f5d46;
	--hp-tlo: #f3f8f2;
}

/* Jedna czcionka na całej stronie */
body, h1, h2, h3, h4, h5, h6, input, button, select, textarea,
.wp-block-navigation, .wp-block-site-title {
	font-family: var(--wp--preset--font-family--system-font);
}

/* Nagłówki nieco mniejsze niż w motywie (były bardzo duże) */
h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* Pasek nagłówka */
header.wp-block-template-part {
	background: var(--hp-tlo);
	border-bottom: 3px solid var(--hp-zielen);
	margin-bottom: 0;
}

/* Menu: wyraźne linki, zawijane do kolejnych wierszy */
.wp-block-navigation { font-size: 1rem; font-weight: 400; }
.wp-block-navigation .wp-block-navigation-item__content { text-decoration: underline; text-underline-offset: 0.2em; }
.wp-block-navigation .current-menu-item > a { font-weight: 700; text-decoration: none; }

/* Widoczny fokus z klawiatury */
a:focus-visible, button:focus-visible, input:focus-visible {
	outline: 3px solid var(--hp-zielen);
	outline-offset: 2px;
}

/* Linki w treści */
.wp-block-post-content a { color: var(--hp-zielen); }

/* Listy wpisów w kategoriach: same tytuły */
.hp-lista .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.hp-lista .wp-block-post-template > li {
	margin: 0;
	padding: 0.9rem 0;
	border-bottom: 1px solid #d9e2d8;
}
.hp-lista .wp-block-post-template > li:first-child { border-top: 1px solid #d9e2d8; }
.hp-lista .wp-block-post-title { font-size: 1.2rem; line-height: 1.4; margin: 0; font-weight: 400; }
.hp-lista .wp-block-post-title a { text-decoration: underline; text-underline-offset: 0.2em; color: inherit; }
.hp-lista .wp-block-post-title a:hover { color: var(--hp-zielen); }
.hp-zrodlo { font-size: 0.85em; color: #555; white-space: nowrap; }

/* Zdjęcia na stronie głównej: trzy w rzędzie, na telefonie jedno pod drugim */
.hp-zdjecia { gap: 1rem; }
.hp-zdjecia figure { margin: 0; }
.hp-zdjecia img { width: 100%; height: 260px; object-fit: cover; object-position: center 25%; border-radius: 4px; }
@media (max-width: 600px) { .hp-zdjecia img { height: auto; } }

/* Nawigacja pod wpisem */
.hp-nawigacja { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid #d9e2d8; }
.hp-nawigacja ul { list-style: none; padding: 0; }
.hp-nawigacja li { margin: 0.4rem 0; }

/* Przyciski dostępności w nagłówku */
.hp-dostepnosc { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hp-dostepnosc button {
	font: inherit; font-size: 0.95rem;
	padding: 0.4rem 0.8rem;
	background: #fff; color: #1e1e1e;
	border: 2px solid var(--hp-zielen); border-radius: 4px;
	cursor: pointer;
}
.hp-dostepnosc button:hover { background: var(--wp--preset--color--primary); }
.hp-dostepnosc button[aria-pressed="true"] { background: var(--hp-zielen); color: #fff; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* Odwrócone kolory: jasny tekst na czarnym tle, żółte linki. Zdjęcia bez zmian. */
html.hp-kontrast body,
html.hp-kontrast body :where(*:not(img, video, svg, path)) {
	background-color: #000 !important;
	color: #fff !important;
	border-color: #fff !important;
}
html.hp-kontrast body a, html.hp-kontrast body a * { color: #ffeb3b !important; }
html.hp-kontrast body button { border: 2px solid #fff !important; }
html.hp-kontrast .hp-dostepnosc button[aria-pressed="true"] { background: #ffeb3b !important; color: #000 !important; }
html.hp-kontrast input { background: #000 !important; color: #fff !important; }
html.hp-kontrast ::placeholder { color: #ccc !important; }
html.hp-kontrast a:focus-visible, html.hp-kontrast button:focus-visible, html.hp-kontrast input:focus-visible { outline-color: #ffeb3b !important; }
