/* =========================================================
   STYL WPISÓW NA BLOGU (wesolowski.co)
   Wklej w: Wygląd > Edytor > Style > (trzy kropki) > Dodatkowy CSS
   albo:    wesolowski.co/wp-admin/customize.php > Dodatkowy CSS
   Działa tylko na pojedynczych wpisach (body.single-post),
   nie zmienia stron głównej, "Dla firm" itd.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

body.single-post {
  --mwp-blue: #1345B6;
  --mwp-ink: #1A1A1A;
  --mwp-body: #3D3D3D;
  --mwp-muted: #666666;
  --mwp-line: #EBEBE6;
  --mwp-soft: #F9F9F7;
  --mwp-text: 720px;   /* szerokość kolumny tekstu */
  --mwp-wide: 1080px;  /* szerokość galerii i zdjęcia głównego */

  /* szerokości, z których korzysta motyw blokowy */
  --wp--style--global--content-size: var(--mwp-text);
  --wp--style--global--wide-size: var(--mwp-wide);
  background: #fff;
}

/* ---------- TYPOGRAFIA ---------- */
body.single-post .wp-block-post-content,
body.single-post .wp-block-post-content p,
body.single-post .wp-block-post-content li {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-size: 18px !important;
  line-height: 1.8 !important;
  color: var(--mwp-body) !important;
}

body.single-post .wp-block-post-content p {
  text-align: left !important;
  margin-top: 0 !important;
  margin-bottom: 1.4em !important;
}

body.single-post .wp-block-post-content a {
  color: var(--mwp-blue) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

body.single-post .wp-block-post-content a:hover { color: var(--mwp-ink) !important; }

body.single-post .wp-block-post-content h2,
body.single-post .wp-block-post-content h3,
body.single-post .wp-block-post-content h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  color: var(--mwp-ink) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
  text-align: left !important;
  margin-top: 2.2em !important;
  margin-bottom: 0.7em !important;
}
body.single-post .wp-block-post-content h2 { font-size: clamp(26px, 3vw, 32px) !important; }
body.single-post .wp-block-post-content h3 { font-size: clamp(21px, 2.4vw, 24px) !important; }
body.single-post .wp-block-post-content h4 { font-size: 19px !important; }

body.single-post .wp-block-post-content ul,
body.single-post .wp-block-post-content ol { padding-left: 1.3em !important; margin-top: 0 !important; margin-bottom: 1.4em !important; }
body.single-post .wp-block-post-content li { margin-bottom: 0.4em !important; }

/* ---------- TYTUŁ I NAGŁÓWEK WPISU ---------- */
body.single-post .wp-block-post-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: clamp(34px, 5vw, 54px) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  color: var(--mwp-ink) !important;
  max-width: 900px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 56px !important;
  margin-bottom: 20px !important;
  text-align: left !important;
}

body.single-post .wp-block-post-date,
body.single-post .wp-block-post-terms {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--mwp-muted) !important;
}
body.single-post .wp-block-post-terms a { color: var(--mwp-blue) !important; text-decoration: none !important; }

/* Zdjęcie główne: szerokie, spokojne proporcje */
body.single-post .wp-block-post-featured-image {
  max-width: var(--mwp-wide) !important;
  margin: 32px auto 56px !important;
}
body.single-post .wp-block-post-featured-image img {
  width: 100% !important;
  height: auto !important;
  max-height: 620px !important;
  object-fit: cover !important;
}

/* ---------- ZDJĘCIA W TEKŚCIE (stare i nowe wpisy) ---------- */
body.single-post .wp-block-post-content img {
  max-width: 100% !important;
  height: auto !important;
}

/* bloki ze zdjęciem: szerokość kolumny tekstu, wyśrodkowane, bez opływania */
body.single-post .wp-block-post-content .wp-block-image,
body.single-post .wp-block-post-content .wp-caption {
  float: none !important;
  width: 100% !important;
  max-width: var(--mwp-text) !important;
  margin: 2em auto !important;
}
body.single-post .wp-block-post-content .wp-block-image img,
body.single-post .wp-block-post-content .wp-caption img {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

/* zdjęcia wstawione w akapit (stare wpisy): wyśrodkowane, pionowe nie zajmują całego ekranu */
body.single-post .wp-block-post-content p > img,
body.single-post .wp-block-post-content p > a > img,
body.single-post .wp-block-post-content img.alignnone,
body.single-post .wp-block-post-content img.aligncenter,
body.single-post .wp-block-post-content img.alignleft,
body.single-post .wp-block-post-content img.alignright {
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: 85vh !important;
  margin: 2em auto !important;
}

/* klasyczne podpisy mają wpisaną szerokość w pikselach: zdejmujemy ją */
body.single-post .wp-block-post-content .wp-caption { width: 100% !important; }

/* podpisy pod zdjęciami */
body.single-post .wp-block-post-content figcaption,
body.single-post .wp-block-post-content .wp-caption-text,
body.single-post .wp-block-post-content .wp-element-caption,
body.single-post .wp-block-post-content .gallery-caption {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: var(--mwp-muted) !important;
  text-align: left !important;
  margin: 10px 0 0 !important;
  font-style: normal !important;
}

/* ---------- GALERIE: jedna równa siatka dla wszystkich typów ---------- */
/* Wspólny kontener: szerszy niż tekst, zawsze wyśrodkowany */
body.single-post .wp-block-post-content .wp-block-gallery,
body.single-post .wp-block-post-content .gallery,
body.single-post .wp-block-post-content .tiled-gallery,
body.single-post .wp-block-post-content .wp-block-jetpack-tiled-gallery,
body.single-post .wp-block-post-content .alignwide {
  box-sizing: border-box !important;
  width: min(var(--mwp-wide), calc(100vw - 40px)) !important;
  max-width: none !important;
  margin-top: 2.5em !important;
  margin-bottom: 2.5em !important;
  margin-left: 50% !important;
  margin-right: 0 !important;
  transform: translateX(-50%) !important;
  float: none !important;
}

/* Układ: po 3 zdjęcia w rzędzie, niepełny ostatni rząd rozciąga się na całą szerokość */
body.single-post .wp-block-post-content .gallery,
body.single-post .wp-block-post-content .tiled-gallery,
body.single-post .wp-block-post-content .tiled-gallery__gallery {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  height: auto !important;
}
body.single-post .wp-block-post-content .gallery .gallery-item,
body.single-post .wp-block-post-content .tiled-gallery .tiled-gallery-item,
body.single-post .wp-block-post-content .tiled-gallery__item {
  flex: 1 1 calc(33.333% - 8px) !important;
  min-width: calc(33.333% - 8px) !important;
}

/* Jetpack (klasyczna galeria kafelkowa): rozpuszczamy wiersze i grupy liczone w pikselach */
body.single-post .wp-block-post-content .tiled-gallery .gallery-row,
body.single-post .wp-block-post-content .tiled-gallery .gallery-group,
body.single-post .wp-block-post-content .tiled-gallery__row,
body.single-post .wp-block-post-content .tiled-gallery__col {
  display: contents !important;
}
body.single-post .wp-block-post-content .tiled-gallery .tiled-gallery-item,
body.single-post .wp-block-post-content .tiled-gallery__item {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  overflow: hidden !important;
  position: relative !important;
}
body.single-post .wp-block-post-content .tiled-gallery .tiled-gallery-item a,
body.single-post .wp-block-post-content .tiled-gallery__item a { display: block !important; }
body.single-post .wp-block-post-content .tiled-gallery .tiled-gallery-caption { display: none !important; }

/* Klasyczna galeria [gallery] */
body.single-post .wp-block-post-content .gallery br { display: none !important; }
body.single-post .wp-block-post-content .gallery .gallery-item {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}
body.single-post .wp-block-post-content .gallery .gallery-icon,
body.single-post .wp-block-post-content .gallery dt { margin: 0 !important; padding: 0 !important; }

/* Zdjęcia w każdej galerii: równe kafelki 3:2, przycięte środkiem */
body.single-post .wp-block-post-content .gallery img,
body.single-post .wp-block-post-content .tiled-gallery img,
body.single-post .wp-block-post-content .tiled-gallery__item img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: cover !important;
  margin: 0 !important;
  border: 0 !important;
  transition: opacity .2s ease !important;
}
body.single-post .wp-block-post-content .gallery a:hover img,
body.single-post .wp-block-post-content .tiled-gallery a:hover img { opacity: .85 !important; }

/* Galeria blokowa WordPressa: tylko odstępy i wyśrodkowanie, układ zostaje jej własny */
body.single-post .wp-block-post-content .wp-block-gallery {
  gap: 8px !important;
  justify-content: center !important;
}
body.single-post .wp-block-post-content .wp-block-gallery figure.wp-block-image { margin: 0 !important; max-width: none !important; }
body.single-post .wp-block-post-content .wp-block-gallery img { max-height: none !important; }

/* ---------- CYTATY ---------- */
body.single-post .wp-block-post-content blockquote,
body.single-post .wp-block-post-content .wp-block-quote {
  border-left: 3px solid var(--mwp-blue) !important;
  padding: 4px 0 4px 24px !important;
  margin-top: 2em !important;
  margin-bottom: 2em !important;
  background: none !important;
  font-style: normal !important;
}
body.single-post .wp-block-post-content blockquote p {
  font-size: 20px !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  color: var(--mwp-ink) !important;
  margin-bottom: 0.6em !important;
}
body.single-post .wp-block-post-content blockquote p:last-child { margin-bottom: 0 !important; }
body.single-post .wp-block-post-content blockquote cite {
  display: block !important;
  font-size: 13px !important;
  font-style: normal !important;
  color: var(--mwp-muted) !important;
}

body.single-post .wp-block-post-content .wp-block-pullquote {
  border: 0 !important;
  border-top: 1px solid var(--mwp-line) !important;
  border-bottom: 1px solid var(--mwp-line) !important;
  padding: 1.5em 0 !important;
  text-align: left !important;
}

/* ---------- FILMY I OSADZENIA ---------- */
body.single-post .wp-block-post-content iframe,
body.single-post .wp-block-post-content .wp-block-embed { max-width: 100% !important; }
body.single-post .wp-block-post-content .wp-block-embed__wrapper iframe,
body.single-post .wp-block-post-content p > iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
}

/* ---------- TABELE ---------- */
body.single-post .wp-block-post-content table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 15px !important;
  margin-top: 2em !important;
  margin-bottom: 2em !important;
}
body.single-post .wp-block-post-content th,
body.single-post .wp-block-post-content td {
  border-bottom: 1px solid var(--mwp-line) !important;
  padding: 10px 8px !important;
  text-align: left !important;
}

/* ---------- PORZĄDKI: udostępnianie, komentarze ---------- */
/* udostępnianie Jetpack: spokojniej, bez nieaktualnego Twittera */
body.single-post .sharedaddy .sd-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  font-size: 11px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--mwp-muted) !important;
}
body.single-post .sharedaddy .share-twitter { display: none !important; }
body.single-post .sharedaddy .sd-button {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 1px solid var(--mwp-line) !important;
  background: #fff !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
}

/* komentarze w tym samym kroju i szerokości co tekst */
body.single-post .wp-block-comments,
body.single-post #comments,
body.single-post #respond {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
  max-width: var(--mwp-text) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.single-post .wp-block-comments h2,
body.single-post .wp-block-comments h3,
body.single-post #comments h2,
body.single-post #reply-title {
  font-size: 22px !important;
  letter-spacing: -0.01em !important;
}

/* ---------- TELEFON ---------- */
@media (max-width: 720px) {
  body.single-post .wp-block-post-content,
  body.single-post .wp-block-post-content p,
  body.single-post .wp-block-post-content li { font-size: 17px !important; }
  body.single-post .wp-block-post-title { margin-top: 32px !important; }
  body.single-post .wp-block-post-content .gallery .gallery-item,
  body.single-post .wp-block-post-content .tiled-gallery .tiled-gallery-item,
  body.single-post .wp-block-post-content .tiled-gallery__item { flex-basis: calc(50% - 8px) !important; min-width: calc(50% - 8px) !important; }
  body.single-post .wp-block-post-content blockquote p { font-size: 18px !important; }
}