/* ==========================================================================
   MOTYW KOSARI - podstawa: reset, typografia tresci, pola, kontener strony.
   Kolory i fonty ida ze zmiennych ustawianych w Customizerze (wartosci po przecinku to zapas).

   WAZNE: reguly na golych znacznikach (h1, p, blockquote...) musza zostac NEUTRALNE - te same
   wartosci, na ktorych powstaly strony w KWT (sekcje .hc). Ozdobniki (kreska cytatu, mniejszy podpis)
   sa tylko w tresci zwyklych stron: .page-content. Inaczej wyciekaja do sekcji .hc.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg, #f6f2e8);
  color: var(--text, #311e17);
  font-family: var(--font-body, "Montserrat", Arial, Helvetica, sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: .5rem;
  margin-bottom: 1rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-top: 0; margin-bottom: .9rem; }
a { background-color: transparent; color: var(--brand, #895e1a); text-decoration: none; }
a:hover, a:active { color: var(--dark, #311e17); }

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

li, dd, dt { margin-top: 0; margin-bottom: 0; }
hr { box-sizing: content-box; height: 0; overflow: visible; }

table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; border-spacing: 0; }
th, td { padding: .6em .8em; border: 1px solid var(--border, #ddd0b8); text-align: left; vertical-align: top; }

/* --- pola formularzy poza komponentami wtyczek --- */
button, input, optgroup, select, textarea { margin: 0; font-family: inherit; font-size: 1rem; line-height: 1.5; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: .5rem 1rem;
  border: 1px solid var(--border, #ddd0b8);
  border-radius: var(--radius, 0);
  background: #fff;
  color: inherit;
}
textarea { resize: vertical; }
button, [type="submit"], [type="button"] { cursor: pointer; }
label { display: inline-block; }
:focus-visible { outline: 2px solid var(--brand, #895e1a); outline-offset: 3px; }

/* --- dostepnosc --- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; top: 8px; left: 8px; z-index: 100000;
  width: auto; height: auto; margin: 0; padding: 10px 16px; clip: auto;
  background: #fff; color: var(--dark, #311e17);
}

/* --- kontener stron z szablonow motywu (strony KWT Canvas maja wlasny uklad) --- */
.site-main { width: 100%; max-width: 1140px; margin-left: auto; margin-right: auto; padding: 48px 20px 72px; }
.page-header { margin: 0 0 28px; }
.page-header .entry-title { margin: 0; }
.page-content > *:last-child { margin-bottom: 0; }
.page-links { margin-top: 24px; }

/* --- ozdobniki tylko w tresci zwyklych stron i wpisow --- */
.page-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--border, #ddd0b8); }
.page-content blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1.2em;
  border-left: 2px solid var(--brand, #895e1a);
  font-family: var(--font-head, Georgia, serif);
  font-size: 1.15em;
  font-style: italic;
}
.wp-caption { max-width: 100%; }
.wp-caption-text, .page-content figcaption { font-size: .85em; color: var(--text-light, #5a463d); }

/* --- wyrownania z edytora --- */
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.alignwide { max-width: 1400px; margin-left: auto; margin-right: auto; }

/* --- lista wpisow w szablonie zapasowym i stronicowanie --- */
.mk-wpis { padding: 24px 0; border-bottom: 1px solid var(--border, #ddd0b8); }
.mk-wpis .entry-title { font-size: 24px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.page-numbers { display: inline-block; padding: 6px 12px; border: 1px solid var(--border, #ddd0b8); }
.page-numbers.current { background: var(--brand, #895e1a); border-color: var(--brand, #895e1a); color: #fff; }

@media (max-width: 760px) {
  .site-main { padding: 32px 16px 56px; }
}
