/* iletowazy-v2 — mobile-first, systemowe fonty, bez zależności. */

:root {
	--itw-red: #c10000;
	--itw-red-dark: #8f0000;
	--itw-ink: #1d1d1f;
	--itw-muted: #5c5c66;
	--itw-line: #e3e3e8;
	--itw-bg: #ffffff;
	--itw-soft: #f6f6f8;
	--itw-radius: 10px;
	--itw-gap: 16px;
	--itw-wrap: 1160px;
	--itw-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--itw-font);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--itw-ink);
	background: var(--itw-bg);
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--itw-red); text-underline-offset: 2px; }
a:hover { color: var(--itw-red-dark); }
:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem); margin-top: .3em; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, table, figure { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; background: #fff; border-radius: 6px; }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--itw-wrap); margin: 0 auto; padding: 0 var(--itw-gap); }

.button, button, input[type="submit"] {
	display: inline-block;
	font: inherit; font-weight: 600;
	padding: .65em 1.3em;
	border: 0; border-radius: 999px;
	background: var(--itw-red); color: #fff;
	cursor: pointer; text-decoration: none;
	min-height: 44px;
}
.button:hover, button:hover, input[type="submit"]:hover { background: var(--itw-red-dark); color: #fff; }

input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], select, textarea {
	font: inherit; width: 100%;
	padding: .6em .8em; min-height: 44px;
	border: 1px solid #b9b9c3; border-radius: 8px;
	background: #fff; color: var(--itw-ink);
}

/* ---------- Nagłówek ---------- */
.site-header { background: var(--itw-red); color: #fff; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 12px; padding-bottom: 12px; }
.site-brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.site-brand:hover { color: #fff; }
.site-brand__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.site-brand__tagline { font-size: .85rem; opacity: .85; }

.search-form { display: flex; gap: 6px; flex: 1 1 260px; max-width: 420px; }
.search-form__input { border-color: transparent; }
.site-header .search-form__btn { background: #fff; color: var(--itw-red); }
.site-header .search-form__btn:hover { background: #ffe5e5; color: var(--itw-red-dark); }

/* Menu: mobile = lista pionowa pod przyciskiem (z JS) lub w pełni rozwinięta (bez JS); desktop = poziomo + rozwijane podmenu. */
.site-nav { background: var(--itw-red-dark); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { position: relative; }
.site-nav a, .sub-toggle--label {
	display: block; padding: 11px 12px; color: #fff; text-decoration: none; font-size: .95rem;
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-cat > a { background: rgba(255, 255, 255, .15); color: #fff; }
.sub-toggle {
	font: inherit; color: #fff; background: transparent; border: 0; border-radius: 0;
	min-height: 44px; padding: 0 12px; cursor: pointer; font-weight: 400;
}
.sub-toggle:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.sub-toggle--label { width: 100%; text-align: left; }
.sub-toggle::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .5em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-25%) rotate(45deg); }
.sub-toggle[aria-expanded="true"]::after { transform: translateY(15%) rotate(-135deg); }
/* Klasa .js na <html> ustawiana w <head> przed renderem — brak przeskoku układu (CLS) przy starcie nav.js. */
.nav-toggle { display: none; width: 100%; text-align: left; border-radius: 0; background: transparent; padding: 12px 0; }
.nav-toggle::before { content: "☰"; margin-right: .5em; }
.nav-toggle[aria-expanded="true"]::before { content: "✕"; }

@media (max-width: 899px) {
	.site-nav .nav-list { padding-bottom: 8px; }
	.site-nav li { border-top: 1px solid rgba(255, 255, 255, .12); }
	.site-nav li.menu-item-has-children > a { display: inline-block; }
	.site-nav li.menu-item-has-children > .sub-toggle:not(.sub-toggle--label) { position: absolute; right: 0; top: 0; }
	.site-nav .sub-menu { padding-left: 16px; }
	/* Z JS: zwinięte do kliknięcia. */
	.js .nav-toggle { display: block; }
	.js .site-nav .nav-list { display: none; }
	.js .site-nav.is-open .nav-list { display: block; }
	.js .site-nav .sub-menu { display: none; }
	.js .site-nav li.is-open > .sub-menu { display: block; }
	html:not(.js) .site-nav .sub-toggle:not(.sub-toggle--label) { display: none; }
	html:not(.js) .site-nav .sub-toggle::after { display: none; }
}

@media (min-width: 900px) {
	.nav-toggle { display: none; }
	.site-nav .nav-list { display: flex; flex-wrap: wrap; }
	.site-nav .nav-list > li { display: flex; align-items: stretch; }
	.site-nav .nav-list > li > a, .site-nav .nav-list > li > .sub-toggle--label { white-space: nowrap; }
	.site-nav .nav-list > li > .sub-toggle:not(.sub-toggle--label) { padding: 0 8px 0 0; margin-left: -6px; }
	.site-nav .sub-menu {
		display: none; position: absolute; top: 100%; left: 0; z-index: 50;
		min-width: 260px; padding: 6px 0;
		background: #6d0000; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); border-radius: 0 0 8px 8px;
	}
	.site-nav .sub-menu .sub-menu { position: static; display: block; box-shadow: none; padding: 0 0 0 14px; min-width: 0; background: transparent; }
	.site-nav .sub-menu .sub-toggle:not(.sub-toggle--label) { display: none; }
	.site-nav .sub-menu li > a { display: block; }
	.site-nav li:hover > .sub-menu,
	.site-nav li:focus-within > .sub-menu,
	.site-nav li.is-open > .sub-menu { display: block; }
}

/* ---------- Układ ---------- */
.site-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 20px; padding-bottom: 40px; }
@media (min-width: 1000px) {
	.site-body { grid-template-columns: minmax(0, 1fr) 300px; }
}
.content { min-width: 0; }

.breadcrumbs { font-size: .9rem; color: var(--itw-muted); margin-bottom: 8px; }
.breadcrumbs a { color: var(--itw-muted); }

.page-header { margin-bottom: 16px; }
.archive-description { color: var(--itw-muted); }

/* ---------- Karty ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { border: 1px solid var(--itw-line); border-radius: var(--itw-radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.card__link { color: inherit; text-decoration: none; }
.card__link:hover .card__title { color: var(--itw-red); }
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--itw-soft); }
.card__title { font-size: 1.1rem; margin: 12px 14px 6px; }
.card__excerpt { font-size: .95rem; color: var(--itw-muted); margin: 0 14px 14px; }

.pagination, .navigation.pagination { margin-top: 28px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-block; min-width: 44px; padding: 10px 12px; text-align: center; border: 1px solid var(--itw-line); border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--itw-red); border-color: var(--itw-red); color: #fff; }

/* ---------- Wpis / strona ---------- */
.entry__meta { color: var(--itw-muted); font-size: .9rem; margin-top: -4px; }
.entry__hero { margin: 0 0 20px; }
.entry__hero-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--itw-radius); }
.entry__content { overflow-wrap: break-word; }
.entry__content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry__content th, .entry__content td { border: 1px solid var(--itw-line); padding: 6px 10px; text-align: left; }
.entry__content blockquote { margin: 1em 0; padding: .5em 1em; border-left: 4px solid var(--itw-red); background: var(--itw-soft); }
.entry__footer { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--itw-line); font-size: .95rem; color: var(--itw-muted); }

/* Klasy WordPressa w treści */
.alignleft { float: left; margin: .3em 1.2em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
@media (max-width: 599px) { .alignleft, .alignright { float: none; margin: 0 auto 1em; } }
.wp-caption, figure.wp-block-image { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--itw-muted); text-align: center; margin-top: 4px; }
.entry__content::after { content: ""; display: table; clear: both; }

/* Powiązane wpisy (Microkids) */
.related { margin: 28px 0; padding: 16px 18px; background: var(--itw-soft); border-radius: var(--itw-radius); }
.related h2, .related h3 { margin-top: 0; font-size: 1.2rem; }
.related ul { margin: 0; padding-left: 1.1em; }
.related li { margin: 4px 0; }

/* Wartości odżywcze (dawny szablon „kuchnia”) */
.facts { margin: 28px 0; padding: 18px; border: 1px solid var(--itw-line); border-radius: var(--itw-radius); }
.facts__title { margin-top: 0; }
.facts__list { display: grid; gap: 8px; margin-bottom: 16px; }
.facts__row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--itw-line); padding-bottom: 6px; }
.facts__row dt { color: var(--itw-muted); }
.facts__row dd { margin: 0; font-weight: 700; }
.facts__row--main dd { color: var(--itw-red); font-size: 1.25rem; }
.facts__table { width: 100%; border-collapse: collapse; }
.facts__table caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.facts__table th, .facts__table td { border: 1px solid var(--itw-line); padding: 6px 10px; text-align: left; }
.facts__table thead th { background: var(--itw-soft); }

/* ---------- Kalkulator (szablony przejściowe) ---------- */
.calc-lead { font-size: 1.15rem; }
.calc-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc-box { padding: 18px; border: 2px solid var(--itw-line); border-radius: var(--itw-radius); background: #fff; margin-bottom: 20px; }
.calc-box__title { font-size: 1.1rem; margin-top: 0; }
.calc-box__fields { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin-bottom: 4px; }
@media (min-width: 600px) { .calc-box__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calc-box__label { display: block; font-weight: 600; margin-bottom: 4px; }
.calc-box__input { font-size: 1.15rem; }
.calc-box__btn { margin-top: 12px; width: 100%; }
@media (min-width: 600px) { .calc-box__btn { width: auto; } }
.calc-box__result { margin: 14px 0 0; padding: 12px 14px; background: var(--itw-soft); border-radius: 8px; font-size: 1.1rem; min-height: 3.2em; }
.calc-box__result strong { color: var(--itw-red); font-size: 1.3em; white-space: nowrap; }
.calc-box__error { color: #a00000; font-weight: 600; }

/* ---------- Pasek boczny ---------- */
.sidebar { min-width: 0; }
.widget { margin-bottom: 28px; }
.widget-title { font-size: 1.1rem; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--itw-red); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--itw-line); }
.widget li a { text-decoration: none; }
.mini-list__item a { display: flex; align-items: center; gap: 10px; color: var(--itw-ink); }
.mini-list__item a:hover { color: var(--itw-red); }
.mini-list__img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 64px; }

/* ---------- Komentarze ---------- */
.comments { margin-top: 32px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-body { padding: 12px 0; border-bottom: 1px solid var(--itw-line); }
.comment-meta { font-size: .9rem; color: var(--itw-muted); }
.comment-author img { display: inline-block; vertical-align: middle; border-radius: 50%; margin-right: 6px; }
.comment-form label { display: block; font-weight: 600; }
.comment-form p { margin-bottom: 12px; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ---------- Stopka ---------- */
.site-footer { background: #24242a; color: #d7d7de; padding: 24px 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-menu { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-widgets { margin-bottom: 16px; }
.site-footer__copy { margin: 0; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
	.site-header, .site-nav, .sidebar, .site-footer, .comments, .related, .search-form { display: none !important; }
	.site-body { display: block; }
}
