/* ============================================================= */
/* jakubsawa.pl — style globalne                                  */
/* Kolory z palety Kadence: #f7941e (pomarańcz), #2b6cb0 (niebieski) */
/* ============================================================= */

/* ---------- 1. Reset + baza ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0 4rem;
}

/* ---------- 2. Buttony (unified) ---------- */
/* .btn — base, używany też w nav (.nav-link.btn-nav) */
.btn,
.nav-link.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.2s ease,
              transform 0.15s ease;
}
.btn:hover {
  box-shadow: 0 15px 25px -7px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

/* Primary — pomarańcz → niebieski na hover */
.btn-primary,
.nav-link.btn-nav {
  background-color: #f7941e;
  color: #222222;
  border-color: #f7941e;
}
.btn-primary:hover, .btn-primary:focus,
.nav-link.btn-nav:hover, .nav-link.btn-nav:focus {
  background-color: #2b6cb0;
  color: #ffffff;
  border-color: #2b6cb0;
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.25);
}

/* Outline — transparent → niebieski filled na hover */
.btn-outline {
  background-color: transparent;
  color: #222222;
  border-color: #e1e1e1;
}
.btn-outline:hover, .btn-outline:focus {
  background-color: #215387;
  color: #ffffff;
  border-color: #215387;
}

/* Nav-specific override (mniejszy padding w headerze) */
.nav-link.btn-nav {
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 1rem;
}

/* ---------- 3. Navigation ---------- */
.navbar {
  background-color: #011638; /* jak na produkcji: Kadence -> Header -> tło (#masthead), color.navy w design systemie */
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
}
.logo-image { height: 40px; width: auto; display: block; }

.mobile-menu-checkbox { display: none; }
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
}
.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.nav-menu { display: flex; gap: 1.5rem; align-items: center; }
.nav-link {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link:hover { color: #2b6cb0; } /* Kadence: hover menu = --global-palette1 */

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-toggle-checkbox { display: none; }
.dropdown-link { display: flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  display: inline-block;
}
/* Podmenu jak w Kadence: tło --global-palette3, tekst palette8, 12px, szer. 200px, hover palette4 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #222222;
  border-radius: 0;
  box-shadow: 0 2px 13px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.dropdown-toggle-checkbox:checked ~ .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
  display: block;
  padding: 1em 1.2em;
  color: #f7f7f7;
  text-decoration: none;
  font-size: 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.dropdown-menu a:hover {
  background-color: #3b3b3b;
  color: #ffffff;
}

/* Mobile nav - próg 1024px jak nagłówek mobilny Kadence (przy 769-1024 menu desktopowe się zawijało) */
.navbar .mobile-header-btn { display: none; } /* specyficzność jak .nav-link.btn-nav, inaczej wygrywa jego display */
@media (max-width: 1024px) {
  .mobile-menu-toggle { display: flex; }
  /* Przycisk w nagłówku między logo a hamburgerem, jak na produkcji; w szufladzie bez CTA */
  .navbar .mobile-header-btn { display: inline-flex; margin-left: auto; margin-right: 1.25rem; }
  .nav-menu > .btn-nav { display: none; }
  .nav-menu {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition: max-height 0.3s ease;
    margin-top: 0; /* odstęp tylko przy otwartym menu, inaczej zwinięte menu podwyższało nagłówek o 1rem */
  }
  /* Menu ma 7 usług w podmenu: wysokość do dołu ekranu + przewijanie zamiast sztywnych 500px (ucinało ostatnie pozycje) */
  .flex .mobile-menu-checkbox:checked ~ .nav-menu { max-height: calc(100vh - 80px); overflow-y: auto; margin-top: 1rem; }
  .nav-dropdown { width: 100%; }
  .dropdown-link { width: 100%; justify-content: space-between; }
  .dropdown-menu {
    position: static;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: max-height 0.3s ease;
  }
  .dropdown-toggle-checkbox:checked ~ .dropdown-menu { max-height: 400px; }
  .dropdown-toggle-checkbox:checked ~ .dropdown-link .dropdown-arrow { transform: rotate(180deg); }
  .dropdown-menu li { padding-left: 1rem; }
  .dropdown-menu a { color: #fff; padding: 0.5rem 1rem; }
  .dropdown-menu a:hover { background-color: rgba(255, 255, 255, 0.1); color: #f7941e; }
  /* Na dotyku :hover zostaje po stuknięciu, więc podmenu otwiera tylko checkbox (strzałka), nie hover.
     Strzałka z większym polem do stuknięcia, jak przycisk rozwijania w Kadence. */
  .dropdown-arrow { padding: 0.6rem 0.9rem; margin: -0.6rem -0.9rem -0.6rem 0; font-size: 0.8rem; }
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
  .flex .mobile-menu-checkbox:checked ~ .mobile-menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }
}

/* ---------- 4. Article (post) layout ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 0; /* odstęp od nagłówka daje już main (2rem), jak content-area w Kadence */
}
@media (max-width: 968px) {
  .article-layout { grid-template-columns: 1fr; }
}
/* Nagłówek posta jak Kadence (single): okruszki, H1 = globalne h1 (32px / 1.5, margin 0), meta 80% z kropką,
   header margin-bottom 1em, obrazek 16:9 (kadence-thumbnail-ratio-9-16) pod nagłówkiem, treść 2rem niżej */
.article-header { margin-bottom: 1em; }
.article-header .breadcrumbs { margin-top: 0; }
.article-title { font-size: 32px; line-height: 1.5; margin: 0; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 80%; color: var(--kad-palette5);
  margin: 1em 0;
}
.article-meta > *:not(:last-child)::after {
  content: ""; display: inline-block;
  width: 0.25rem; height: 0.25rem; border-radius: 9999px;
  background-color: currentColor; opacity: 0.8;
  margin: 0 0.5rem; vertical-align: 0.1875em;
}
.article-meta .meta-label { margin-right: 0.2rem; }
.article-meta a { color: inherit; text-decoration: none; }
.article-image { aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 2rem; }
.article-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-content { max-width: 100%; overflow-x: hidden; }
.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 100%;
  overflow-x: hidden;
}
.article-body h2 { margin-top: 2rem; margin-bottom: 1rem; }
.article-body h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin-left: 2rem; margin-bottom: 1rem; }

/* Article tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
}
.tags-label { font-weight: 600; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #2b6cb0;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  transition: background-color 0.3s ease;
}
.tag:hover { background-color: #215387; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}
.related-posts h2 { margin-bottom: 1.5rem; }

/* Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.sidebar-section {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}
.sidebar-section h3 { margin-bottom: 1rem; font-size: 1.25rem; }
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 0.5rem; }
.sidebar-list a { text-decoration: none; color: #333; transition: color 0.3s ease; }
.sidebar-list a:hover { color: #2b6cb0; }

/* ---------- 5. Posts list (blog / category / tag) ---------- */
/* Siatka jak archiwum Kadence: 1 kolumna, od 576px 2, od 1025px 3 */
.posts-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
@media (min-width: 576px) { .posts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1025px) { .posts-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fff;
  box-shadow: 0 15px 15px -10px rgba(0, 0, 0, 0.05); /* .loop-entry w Kadence */
  overflow: hidden;
}
.post-item-image {
  width: 100%;
  aspect-ratio: 16 / 9; /* jak Kadence na produkcji (kadence-thumbnail-ratio-9-16); 4:3 ucinało ok. 30% okładek 1200x630 */
  overflow: hidden;
}
.post-item-image img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.post-item-content {
  padding: 2rem; /* .loop-entry .entry-content-wrap: 2rem, na mobile 1.5rem */
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* Karta: kategorie (70%, wersaliki, pogrubione), tytuł h2 w kolorze nagłówków, meta 80% z kropkami */
.post-item-cats {
  font-size: 70%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1em;
  color: var(--kad-palette1);
}
.post-item-cats a { font-weight: 700; text-decoration: none; color: var(--kad-palette1); }
.post-item-cats a:hover { color: var(--kad-palette2); }
.post-item-cats-sep { margin: 0 0.1em; }
.post-item-title { margin: 0; }
@media (max-width: 767px) { .post-item-content { padding: 1.5rem; } }
.post-item-title a { color: var(--kad-palette3); text-decoration: none; }
.post-item-title a:hover { color: var(--kad-palette1); }
.post-item-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 80%; color: var(--kad-palette5);
  margin: 1em 0 0;
}
.post-item-meta > *:not(:last-child)::after {
  content: ""; display: inline-block;
  width: 0.25rem; height: 0.25rem; border-radius: 9999px;
  background-color: currentColor; opacity: 0.8;
  margin: 0 0.5rem; vertical-align: 0.1875em;
}

/* ---------- 6. Home page blog feed (custom) ---------- */
.home-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: var(--content-width);
  margin: 1.5rem auto 2.5rem;
  padding: 0 20px;
}
.home-posts-grid--beside {
  grid-template-columns: minmax(auto, 1000px);
  justify-content: center;
}
.home-post-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.home-post-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.home-post-card--beside { flex-direction: row; align-items: stretch; }
.home-post-card--beside .home-post-card-body { flex: 1; }
@media (max-width: 720px) {
  .home-post-card--beside { flex-direction: column; }
}
/* Proporcje jak w blokach kadence/posts na produkcji: siatka "inherit" (naturalne proporcje obrazka),
   wpis wyróżniony "9-16" (16:9). */
.home-post-card-image {
  display: block;
  overflow: hidden;
  background: #f3f4f6;
}
.home-post-card-image img {
  width: 100%; height: auto;
  display: block;
}
.home-post-card--beside .home-post-card-image { flex: 0 0 45%; aspect-ratio: 16 / 9; align-self: flex-start; }
.home-post-card--beside .home-post-card-image img { height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .home-post-card--beside .home-post-card-image { flex: none; align-self: stretch; }
}
.home-post-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
}
.home-post-card-cats {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #64748b;
}
.home-post-card-cat {
  color: #2b6cb0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.home-post-card-cat:hover { text-decoration: underline; }
.home-post-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
.home-posts-grid--beside .home-post-card-title { font-size: 1.5rem; }
.home-post-card-title a { color: #0f172a; text-decoration: none; }
.home-post-card-title a:hover { color: #2b6cb0; }
.home-post-card-meta {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0.25rem 0 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.home-post-card-meta .home-post-card-author + .home-post-card-date::before {
  content: "·";
  margin-right: 0.5rem;
  color: #cbd5e1;
}
.home-post-card-summary {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- 7. Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination-numbers { display: flex; gap: 0.5rem; }
.pagination-link {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.pagination-link:hover { background-color: #f5f5f5; }
.pagination-active {
  background-color: #2b6cb0;
  color: #fff;
  border-color: #2b6cb0;
}
.pagination-active:hover { background-color: #215387; }

/* ---------- 8. Authors ---------- */
.authors-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.author-card {
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
}
.author-image {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
}
.author-content h2 { margin-bottom: 0.5rem; }
.author-content h2 a { text-decoration: none; color: #333; }
.author-content h2 a:hover { color: #2b6cb0; }
.author-posts-count { color: #666; font-size: 0.875rem; margin-top: 0.5rem; }

/* ---------- 9. 404 ---------- */
.error-404 {
  text-align: center;
  padding: 4rem 2rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.error-404 h1 { font-size: 3rem; margin-bottom: 1rem; color: #333; }
.error-404 p { font-size: 1.125rem; color: #666; margin-bottom: 1rem; }
.error-404 a { color: #2b6cb0; text-decoration: none; font-weight: 500; }
.error-404 a:hover { text-decoration: underline; }

/* ---------- 10. Footer ---------- */
.footer {
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  color: #3b3b3b;
}
.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  align-items: start;
}
.footer-column--right { text-align: right; }
.footer-heading {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2b6cb0;
  margin-bottom: 0.75rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.footer-list a {
  color: #3b3b3b;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-list a:hover { color: #f7941e; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.875rem;
  color: #626262;
  flex-wrap: wrap;
}
.footer-copyright { margin: 0; }
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b3b3b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-social-link:hover { color: #2b6cb0; }
.footer-social-link svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; gap: 2rem; }
  .footer-column--right { text-align: left; }
  .footer-bottom { justify-content: flex-start; }
}

/* ============================================================= */
/* CONTENT BLOCKS — stylowanie dla importowanego HTML z Kadence   */
/* (posty z WXR, strony usług, HP) używają klas .wp-block-*       */
/* ============================================================= */

/* ---------- 11. Container wrap dla bezpośrednich dzieci <main> ---------- */
main > h1, main > h2, main > h3, main > h4, main > h5, main > h6,
main > p, main > ul, main > ol, main > figure,
main > .wp-block-columns, main > .wp-block-group,
main > .wp-block-kadence-column, main > .wp-block-kadence-iconlist,
main > .wp-block-kadence-spacer, main > .wp-block-kadence-advancedbtn,
main > .wp-block-kadence-accordion, main > .wp-block-kadence-advancedheading,
main > .wp-block-image, main > div[class*="wp-block"],
main > .contact-form /* formularz wstawiony bezpośrednio w treść (np. /kontakt/): w kolumnie treści, nie na całą szerokość ekranu */ {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* ---------- 12. Typography w content ---------- */
.wp-block-kadence-advancedheading {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 1.5rem 0;
  color: #0f172a;
}
.wp-block-heading {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}
h1.wp-block-heading { font-size: 2.5rem; }
h2.wp-block-heading { font-size: 2rem; }
h3.wp-block-heading { font-size: 1.375rem; }

/* Utility alignment + rozmiar fontu */
.has-text-align-center { text-align: center; }
.has-text-align-left    { text-align: left; }
.has-text-align-right   { text-align: right; }
.has-larger-font-size  { font-size: 2.25rem; line-height: 1.2; }
.has-large-font-size   { font-size: 1.375rem; line-height: 1.5; }
.has-medium-font-size  { font-size: 1.125rem; line-height: 1.6; }

/* ---------- 13. Columns / groups ---------- */
.wp-block-columns {
  display: flex;
  gap: 2.5rem;
  margin: 2rem auto;
  flex-wrap: wrap;
  align-items: flex-start;
}
.wp-block-column {
  flex: 1 1 280px;
  min-width: 0;
}
.wp-block-column.is-vertically-aligned-center { align-self: center; }

.wp-block-group { margin: 1.5rem auto; }
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  padding: 0 20px;
  max-width: var(--content-width);
}
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > h1,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > h2,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > h3,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > p,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > .wp-block-kadence-spacer,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > .wp-block-kadence-advancedbtn,
.wp-block-group:has(> .wp-block-kadence-column ~ .wp-block-kadence-column) > .wp-block-group {
  grid-column: 1 / -1;
}

.wp-block-group.has-background,
.wp-block-group[class*="has-background-color"] {
  padding: 2.5rem 2rem;
  border-radius: 16px;
  margin: 2.5rem auto;
}
.has-theme-palette-8-background-color { background-color: #f8fafc; }

/* Kadence rowlayout (wrapper generowany przez konwerter) */
.kadence-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem auto;
  padding: 0 20px;
  max-width: var(--content-width);
}
.kadence-row > h1,
.kadence-row > h2,
.kadence-row > h3,
.kadence-row > p,
.kadence-row > .wp-block-kadence-spacer {
  grid-column: 1 / -1;
}

/* ---------- 14. Karty (kt-inside-inner-col) ---------- */
.wp-block-kadence-column { min-width: 0; }
.kt-inside-inner-col {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  height: 100%;
  transition: box-shadow 0.2s ease;
}
.kt-inside-inner-col:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }
.kt-inside-inner-col h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #0f172a;
}
.kt-inside-inner-col p {
  color: #475569;
  font-size: 1rem;
  margin: 0.75rem 0;
}
.kt-inside-inner-col a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
}
.kt-inside-inner-col a:hover { text-decoration: underline; }

/* Puste kolumny (placeholdery z Kadence) — niewidoczne */
.kt-inside-inner-col:empty {
  padding: 0;
  background: transparent;
  border: none;
}
.wp-block-kadence-column:has(> .kt-inside-inner-col:empty) { display: none; }

/* ---------- 15. Spacer / divider ---------- */
.wp-block-kadence-spacer {
  margin: 2.5rem auto;
  display: flex;
  justify-content: center;
  max-width: var(--content-width);
}
.kt-block-spacer {
  display: flex;
  justify-content: center;
  width: 100%;
}
.kt-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  width: 80px;
  margin: 0;
}

/* ---------- 16. Images ---------- */
/* Każdy obrazek w treści mieści się w kolumnie (bloki Kadence, klasyczny edytor, gołe <img>) */
.article-body img,
.article-body video,
.article-body iframe { max-width: 100%; height: auto; }
.wp-block-image,
.wp-block-kadence-image { margin: 1.5rem auto; max-width: 100%; }
.wp-block-image img,
.wp-block-kadence-image img {
  max-width: 100%; height: auto;
  display: block;
  border-radius: 8px;
}
.wp-block-kadence-image figcaption { font-size: 0.9rem; color: #626262; text-align: center; margin-top: 0.5rem; }
.wp-block-image.is-style-rounded img,
.wp-block-image figure.is-style-rounded img {
  border-radius: 50%;
  max-width: 320px;
  margin: 0 auto;
}
.wp-block-image figure { margin: 0; }

/* ---------- 17. Icon list (checklisty) ---------- */
.wp-block-kadence-iconlist {
  margin: 1.5rem auto;
  max-width: var(--content-width);
}
.kt-svg-icon-list { list-style: none; padding: 0; margin: 0; }
.kt-svg-icon-list-items.kt-svg-icon-list-columns-2 .kt-svg-icon-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.25rem 2rem;
}
.kt-svg-icon-list-item-wrap {
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.kadence-dynamic-icon::before,
.kt-svg-icon-list-single::before {
  content: "\2713"; /* ✓ */
  color: #16a34a;
  font-weight: 700;
  font-size: 1.1em;
  flex-shrink: 0;
  display: inline-block;
  margin-top: 0.1em;
}
.kadence-dynamic-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.kt-svg-icon-list-text {
  flex: 1;
  color: #1f2937;
  line-height: 1.5;
}

/* ---------- 18. Accordion ---------- */
.wp-block-kadence-accordion {
  margin: 2rem auto;
  max-width: var(--content-width);
}
.kt-accordion-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.kt-accordion-pane,
.wp-block-kadence-pane { border-bottom: 1px solid #e5e7eb; }
.kt-accordion-pane:last-child,
.wp-block-kadence-pane:last-child { border-bottom: none; }
.kt-blocks-accordion-header {
  background: #f9fafb;
  padding: 1rem 1.25rem;
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  color: #1f2937;
}
.kt-blocks-accordion-header:hover { background: #f3f4f6; }
.kt-accordion-header-wrap { display: block; }
.kt-blocks-accordion-title-wrap { flex: 1; }
.kt-blocks-accordion-icon-trigger {
  width: 16px;
  height: 16px;
  position: relative;
  flex-shrink: 0;
}
.kt-blocks-accordion-icon-trigger::before,
.kt-blocks-accordion-icon-trigger::after {
  content: "";
  position: absolute;
  background: #4b5563;
  transition: transform 0.2s ease;
}
.kt-blocks-accordion-icon-trigger::before { top: 50%; left: 0; width: 100%; height: 2px; margin-top: -1px; }
.kt-blocks-accordion-icon-trigger::after  { left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px; }
.kt-accordion-panel-inner { padding: 1.25rem; background: #fff; }
.kt-accordion-pane:not(.kt-accordion-panel-active) .kt-accordion-panel,
.wp-block-kadence-pane:not(.kt-accordion-panel-active) .kt-accordion-panel {
  display: none;
}
.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger::after {
  transform: scaleY(0);
}

/* ---------- 19. Count-up (liczby statyczne, JS wstawia value) ---------- */
.wp-block-kadence-countup,
.kb-count-up {
  text-align: center;
  padding: 1.25rem 1rem;
}
.kb-count-up-process,
.kb-count-up-number {
  font-size: 3rem;
  font-weight: 800;
  color: #2b6cb0;
  line-height: 1;
  display: block;
}
.kb-count-up-title {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  color: #475569;
  line-height: 1.4;
}

/* ---------- 20. Buttons wrap (w imported content) ---------- */
.wp-block-kadence-advancedbtn.kb-buttons-wrap:empty { display: none; }
.wp-block-kadence-advancedbtn {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin: 2rem auto;
  flex-wrap: wrap;
  max-width: var(--content-width);
  padding: 0 20px;
}

/* Override: .btn w main nie ma underline */
main a.btn { text-decoration: none; }

@media (max-width: 520px) {
  .btn {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }
  .wp-block-kadence-advancedbtn { flex-direction: column; align-items: stretch; }
}

/* ---------- 21. Tabele w treści ---------- */
main > figure.wp-block-table,
.wp-block-table {
  margin: 1.5rem auto;
  overflow-x: auto;
}
.wp-block-table table,
main table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}
.wp-block-table th,
main th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid #e5e7eb;
}
.wp-block-table td,
main td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.wp-block-table tr:last-child td,
main tr:last-child td { border-bottom: none; }

/* ---------- 22. Paragrafy i linki w content ---------- */
main > p,
main .kt-inside-inner-col p,
.wp-block-column p {
  color: #334155;
  line-height: 1.7;
  margin-top: 1rem;
  margin-bottom: 1rem;
  /* margin-left/right zostaw auto (reguła kontenerowa wyżej) */
}

main a:not(.nav-link):not(.btn):not(.logo):not(.dropdown-link):not(.tag):not(.pagination-link):not(.post-item-image):not(.home-post-card-image):not(.card-link):not([href^="#"]) {
  color: #2b6cb0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
main a:not(.nav-link):not(.btn):not(.logo):not(.dropdown-link):not(.tag):not(.pagination-link):not(.post-item-image):not(.home-post-card-image):not(.card-link):not([href^="#"]):hover {
  color: #215387;
}

/* ---------- 23. Form placeholder (TODO Faza 3) ---------- */
.form-placeholder {
  display: block;
  padding: 2rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 560px;
  background: #fef3c7;
  border: 2px dashed #f59e0b;
  border-radius: 12px;
  text-align: center;
  color: #78350f;
  font-size: 0.95rem;
  line-height: 1.6;
}
.form-placeholder strong { font-size: 1.1rem; }
.form-placeholder em { color: #92400e; }

/* ---------- 24. Responsive tweaks dla content ---------- */
@media (max-width: 768px) {
  .wp-block-kadence-advancedheading { font-size: 2rem; }
  h1.wp-block-heading { font-size: 1.875rem; }
  h2.wp-block-heading { font-size: 1.5rem; }
  h3.wp-block-heading { font-size: 1.25rem; }
  .has-larger-font-size { font-size: 1.5rem; }
  .has-large-font-size  { font-size: 1.125rem; }
  .wp-block-columns { gap: 1.5rem; }
  main { padding: 1.5rem 0 3rem; }
  .kb-count-up-process, .kb-count-up-number { font-size: 2.25rem; }
}

/* Mobile tables w artykułach */
@media (max-width: 768px) {
  .article-content, .article-body {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .article-body > *:not(table):not(ul):not(ol) {
    max-width: 100%;
    overflow-x: hidden;
  }
  .article-body ul, .article-body ol {
    margin-left: 1.5rem;
    padding-left: 0.5rem;
  }
  .article-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article-body table thead,
  .article-body table tbody { display: table-header-group; }
  .article-body table tbody { display: table-row-group; }
  .article-body table tr { display: table-row; }
  .article-body table th,
  .article-body table td {
    display: table-cell;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* ============================================================= */
/* Typografia, szerokość i obszar tytułu jak Kadence na produkcji  */
/* (wartości z jakubsawa.pl, 2026-11-22: globalne ustawienia      */
/*  motywu + --global-font-size-* z global.min.css 1.4.5)          */
/* ============================================================= */
:root {
  --content-width: 1232px;            /* --global-content-width 1280px minus padding 2 x 1.5rem */
  --kad-palette1: #2b6cb0;
  --kad-palette2: #215387;
  --kad-palette3: #222222;
  --kad-palette4: #3b3b3b;
  --kad-palette5: #515151;
  --kad-palette6: #626262;
  --font-size-small: clamp(0.8rem, 0.73rem + 0.217vw, 0.9rem);
  --font-size-medium: clamp(1.1rem, 0.995rem + 0.326vw, 1.25rem);
  --font-size-large: clamp(1.75rem, 1.576rem + 0.543vw, 2rem);
  --font-size-larger: clamp(2rem, 1.6rem + 1vw, 2.5rem);
  --font-size-xxlarge: clamp(2.25rem, 1.728rem + 1.63vw, 3rem);
}
body {
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  color: var(--kad-palette4);
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.5; }
h1 { font-family: "Inter", sans-serif; font-size: 32px; color: var(--kad-palette3); }
h2 { font-size: 28px; color: var(--kad-palette3); }
h3 { font-size: 24px; color: var(--kad-palette3); }
h4 { font-size: 22px; color: var(--kad-palette4); }
h5 { font-size: 20px; color: var(--kad-palette4); }
.container { max-width: 1280px; padding: 0 1.5rem; }
.has-small-font-size { font-size: var(--font-size-small) !important; }
.has-medium-font-size { font-size: var(--font-size-medium) !important; }
.has-large-font-size { font-size: var(--font-size-large) !important; line-height: 1.5; }
.has-larger-font-size { font-size: var(--font-size-larger) !important; line-height: 1.5; }
.has-xxlarge-font-size { font-size: var(--font-size-xxlarge) !important; }
.article-body { font-size: 16px; }

/* Obszar tytułu (okruszki + H1) */
.page-title-area { margin-bottom: 1.5rem; }
.page-title-area .page-title { margin: 0.25rem 0 0; }
.breadcrumbs {
  font-size: 85%; /* .kadence-breadcrumbs */
  color: var(--kad-palette5);
  margin-bottom: 0.5rem;
}
.breadcrumbs a { color: var(--kad-palette5); text-decoration: underline; }
.breadcrumbs a:hover { color: var(--kad-palette1); }
.breadcrumbs .bc-delimiter { margin: 0 0.25rem; }

/* Wyrównanie obrazków z klasycznego edytora WP + [caption] -> figure.wp-caption */
.article-body .alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; }
.article-body .alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; }
.article-body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.article-body .wp-caption { margin-top: 0.25rem; margin-bottom: 1rem; }
.article-body .wp-caption.alignnone,
.article-body .wp-caption.aligncenter { margin: 1.5rem auto; }
.article-body .wp-caption img { display: block; max-width: 100%; height: auto; }
.article-body .wp-caption figcaption { font-size: 0.875rem; color: var(--kad-palette6); margin-top: 0.4rem; line-height: 1.4; }
@media (max-width: 600px) {
  .article-body .alignright,
  .article-body .alignleft { float: none; margin: 1rem auto; }
}

/* Treść posta jak .single-content w Kadence (pomiar z produkcji 2026-11-22, Playwright):
   akapit 16px / 1.6 z odstępem 2rem, nagłówki z globalnych rozmiarów (h2 28px / 1.5)
   z marginesem 1.5em nad i 0.5em pod, element po nagłówku bez górnego marginesu,
   listy z odstępem 2rem i wcięciem 2em */
.article-body { line-height: 1.6; }
.article-body p { margin: 0 0 2rem; }
.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6 { margin: 1.5em 0 0.5em; line-height: 1.5; }
.article-body h2 { font-size: 28px; }
.article-body h3 { font-size: 24px; }
.article-body h4 { font-size: 22px; }
.article-body h5 { font-size: 20px; }
.article-body h3:first-child, .article-body h4:first-child { margin-top: 0; }
.article-body h1 + *, .article-body h2 + *, .article-body h3 + *,
.article-body h4 + *, .article-body h5 + *, .article-body h6 + * { margin-top: 0; }
.article-body ul, .article-body ol { margin: 0 0 2rem; padding-left: 2em; }
.article-body li { line-height: 1.6; }

/* Formularze (Web3Forms, pola 1:1 z Ninja Forms na produkcji) */
.contact-form { width: 100%; }
.contact-form-title { font-size: 24px; margin: 0 0 1rem; }
.form-required-note { font-size: 0.875rem; color: var(--kad-palette5); margin: 0 0 1rem; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--kad-palette3); }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="tel"],
.form-field select, .form-field textarea {
  width: 100%; box-sizing: border-box;
  font: inherit; color: var(--kad-palette4);
  padding: 0.6rem 0.75rem;
  border: 1px solid #d1d5db; border-radius: 3px; background: #fff;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--kad-palette1); outline-offset: 1px; }
.form-field input:user-invalid, .form-field select:user-invalid, .form-field textarea:user-invalid { border-color: #b91c1c; }
.form-desc { font-size: 0.85rem; color: var(--kad-palette5); margin: 0.35rem 0 0; line-height: 1.5; }
.form-field--checkbox { display: flex; gap: 0.6rem; align-items: flex-start; }
.form-field--checkbox input { margin-top: 0.3rem; flex: none; }
.form-field--checkbox label { font-weight: 400; font-size: 0.875rem; line-height: 1.5; color: var(--kad-palette4); }
.form-field .req, .form-required-note .req { color: #b91c1c; }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-submit { margin-top: 0.5rem; cursor: pointer; border: 0; }
.form-submit[disabled] { opacity: 0.6; cursor: wait; }
.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status--success { color: #15803d; }
.form-status--error { color: #b91c1c; }
