/* Style dla treści z RTE w elementach TYPO3 (Resources/Private/ContentElements) - ładowane po style.css */

/* Lista z "ptaszkami" (jak .check-list) dla list w kafelkach typu "blok" */
.rd-checks ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rd-checks ul > li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2.25rem;
  border-bottom: 1px solid var(--rd-line);
}
.rd-checks ul > li:last-child {
  border-bottom: 0;
}
.rd-checks ul > li::before {
  content: "\f272";
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--rd-surface-2);
  color: #265D58;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
}

/* Pierwszy akapit tekstu obok tytułu wygląda jak .lead */
.rd-lead > p:first-child {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.6;
}
.rd-lead > p:last-child {
  margin-bottom: 0;
}

/* Karta kontaktowa (element Kafelki, wygląd "Karta kontaktowa"): listy i adresy e-mail jak w paczce HTML */
.rd-contact ul {
  padding-left: 1.1rem;
}
.rd-contact ul li {
  margin-bottom: 0.5rem;
}
.rd-contact ul li::marker {
  color: #265D58;
}
.rd-contact a[href^="mailto:"] {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem 0.7rem 0.8rem;
  border-radius: 50rem;
  background: var(--rd-surface-2);
  color: #252724;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
  transition: background 0.2s, color 0.2s;
}
.rd-contact a[href^="mailto:"]::before {
  content: "\f32f";
  font-family: "bootstrap-icons";
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #265D58;
  color: #F7F4EE;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rd-contact a[href^="mailto:"]:hover {
  background: #265D58;
  color: #F7F4EE;
}
.is-tint .rd-contact a[href^="mailto:"] {
  background: var(--rd-surface);
}

/* Numerowane kroki (jak .steps) dla list numerowanych w kolumnach tekstowych */
.rd-checks ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.rd-checks ol > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 2.25rem 4.25rem;
}
.rd-checks ol > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #265D58;
  color: #F7F4EE;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.85rem;
}
.rd-checks ol > li::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 3.4rem;
  bottom: 0.35rem;
  width: 1px;
  background: var(--rd-line);
}
.rd-checks ol > li:last-child {
  padding-bottom: 0;
}
.rd-checks ol > li:last-child::after {
  display: none;
}
.steps strong {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 400;
  display: block;
  margin-bottom: 0.25rem;
}
.steps p {
  color: #666B66;
  margin: 0;
}
.rd-checks ol > li strong {
  display: block;
}

/* Placówka: lista linków jako przyciski (jak .place-actions .btn.btn-ghost) */
.place-card .rd-place {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.rd-place > p:first-child {
  color: #666B66;
  margin-bottom: 1.25rem;
}
.rd-place ul {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rd-place ul a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.5;
  color: #252724;
  text-decoration: none;
  border: 1px solid var(--rd-line);
  border-radius: 50rem;
  transition: background 0.2s, border-color 0.2s;
}
.rd-place ul a:hover {
  background: var(--rd-surface-2);
  border-color: var(--rd-surface-2);
}
.rd-place ul a[href^="tel:"]::before {
  content: "\f5c1";
  font-family: "bootstrap-icons";
}
.rd-place ul a[href^="http"]::before {
  content: "\f3ef";
  font-family: "bootstrap-icons";
}

/* Wariant konsultacji, wskazówka i publikacje */
.rd-variant > p:last-child, .rd-info > p:last-child {
  margin-bottom: 0;
}

/* Tekst sekcji (RTE): cytat jak p.font-serif.fst-italic, listy z kropkami jak .dot-list */
.rd-body blockquote {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: calc(1.3rem + 0.6vw);
  line-height: 1.25;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}
@media (min-width: 1200px) {
  .rd-body blockquote {
    font-size: 1.75rem;
  }
}
.rd-body blockquote p {
  margin: 0;
}
.rd-body ul:not([class]) {
  padding-left: 1.1rem;
}
.rd-body ul:not([class]) li {
  margin-bottom: 0.5rem;
}
.rd-body ul:not([class]) li::marker {
  color: #265D58;
}

/* Łączenie sekcji z tłem w jedną ramkę (opcja "Połącz z poprzednią sekcją") */
.sheet:has(+ .sheet-join) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.sheet-join {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: 0;
}
.sheet-join.section-sm,
.sheet-join.section {
  padding-top: 0;
}

/* Tekst obok tytułu w nagłówku: drugi akapit stonowany */
.rd-lead > p + p {
  color: #666B66;
  font-size: 1rem;
  font-weight: 400;
}

/* Karty kontaktowe: etykiety pogrubione/drobne z akapitów */
.rd-contact small {
  color: #666B66;
  font-size: 0.875rem;
}

/* Nagłówek: kontakt w prawej kolumnie - etykieta drobna i adres e-mail jako pastylka */
.rd-lead > p:has(> small:only-child) {
  font-size: 0.875rem;
  font-weight: 400;
  color: #666B66;
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.rd-lead small {
  font-size: inherit;
}
.rd-lead a[href^="mailto:"] {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem 0.7rem 0.8rem;
  border-radius: 50rem;
  background: var(--rd-surface-2);
  color: #252724;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
  transition: background 0.2s, color 0.2s;
}
.rd-lead a[href^="mailto:"]::before {
  content: "\f32f";
  font-family: "bootstrap-icons";
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #265D58;
  color: #F7F4EE;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rd-lead a[href^="mailto:"]:hover {
  background: #265D58;
  color: #F7F4EE;
}

/* Wskazówka z przyciskiem Kopiuj: bez dolnego marginesu akapitu w tekście do skopiowania */
.info-box .font-serif p {
  margin-bottom: 0;
}
.info-box .font-serif p + p {
  margin-top: 0.75rem;
}

/* Nagłówek bez zdjęcia: odstęp od następnej sekcji (zdjęcie ma własny margines) */
.page-hero:not(:has(.page-hero-img)) {
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Kontakt w prawej kolumnie nagłówka (etykieta + e-mail) dosunięty do prawej krawędzi */
@media (min-width: 992px) {
  .rd-lead:has(> p > small):has(a[href^="mailto:"]) {
    text-align: right;
  }
}

/* Delikatne powiększenie zdjęć po najechaniu myszą (bez slidera na stronie głównej i bez kart wpisów, które mają własny efekt).
   Używamy właściwości "scale", więc działa razem z animacjami transform (paralaksa, odsłanianie). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .page-hero-img:not(.is-pair) img,
  .page-hero-img.is-pair .pair-cell img,
  .img-frame:not(.post-card .img-frame) img,
  .place-logo img {
    transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1), scale 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .page-hero-img:not(.is-pair):hover img,
  .page-hero-img.is-pair .pair-cell:hover img,
  .img-frame:not(.post-card .img-frame):hover img {
    scale: 1.045;
  }
  .place-card:hover .place-logo img {
    scale: 1.06;
  }
  .hero-bento img {
    scale: none !important;
  }
}

/* Kontakt dla mediów w nagłówku: jedna karta (ikona koperty + etykieta + adres), dosunięta do prawej */
.rd-lead:has(> p > small):has(a[href^="mailto:"]) {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  padding: 1rem 1.6rem 1rem 1rem;
  border-radius: 1.5rem;
  background: var(--rd-surface-2);
  text-align: left;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"])::before {
  content: "\f32f";
  font-family: "bootstrap-icons";
  grid-row: 1 / span 2;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #265D58;
  color: #F7F4EE;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"]) > p {
  grid-column: 2;
  margin: 0;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"]) > p:has(> small:only-child) {
  margin-bottom: 0.1rem;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"]) a[href^="mailto:"] {
  padding: 0;
  border-radius: 0;
  background: none;
  color: #252724;
  font-size: 1.05rem;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"]) a[href^="mailto:"]::before {
  display: none;
}
.rd-lead:has(> p > small):has(a[href^="mailto:"]) a[href^="mailto:"]:hover {
  background: none;
  color: #265D58;
  text-decoration: underline;
}
@media (max-width: 991.98px) {
  .rd-lead:has(> p > small):has(a[href^="mailto:"]) {
    margin-left: 0;
  }
}

/* ---------- Blog (EXT:news) ---------- */
/* Lista wpisów: data i zajawka w karcie (reszta: .post-card z paczki HTML) */
.post-card .post-meta > div {
  min-width: 0;
}
.post-card .post-date {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: #666B66;
}
.post-card .post-teaser {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  color: #666B66;
  line-height: 1.55;
}
.post-card .img-frame:empty {
  min-height: 12rem;
}

/* Paginacja listy */
.rd-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.rd-pagination a,
.rd-pagination .is-current {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--rd-line);
  border-radius: 50rem;
  color: #252724;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.rd-pagination a:hover {
  background: var(--rd-surface-2);
  border-color: var(--rd-surface-2);
}
.rd-pagination .is-current {
  background: #265D58;
  border-color: #265D58;
  color: #F7F4EE;
}

/* Wpis: data i autor pod zajawką */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  color: #666B66;
}
.article-meta .bi {
  margin-right: 0.35rem;
  color: #265D58;
}

/* Wpis: treść artykułu */
.rd-article {
  font-size: 1.125rem;
  line-height: 1.75;
}
.rd-article > :first-child {
  margin-top: 0;
}
.rd-article h2 {
  margin: 2.75rem 0 1rem;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}
.rd-article h3 {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}
.rd-article p,
.rd-article ul,
.rd-article ol {
  margin-bottom: 1.25rem;
}
.rd-article ul,
.rd-article ol {
  padding-left: 1.4rem;
}
.rd-article li {
  margin-bottom: 0.55rem;
}
.rd-article li::marker {
  color: #265D58;
}
.rd-article a {
  color: #265D58;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.rd-article blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid #265D58;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.45;
}
.rd-article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--rd-radius-xl);
}
.rd-article-related h2 {
  margin-bottom: 1rem;
}

/* Zdjęcie wpisu: ta sama szerokość co tekst, proporcje szerszego kadru */
.page-hero-img.is-article {
  aspect-ratio: 16 / 9;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* Wpis: mniejszy odstęp między zdjęciem a tekstem artykułu */
.section-sm.article-body {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* Lista wpisów: odstęp między zdjęciem w nagłówku a przyciskami kategorii */
.section-sm.blog-list {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

/* Sekcja pod zdjęciem w nagłówku podstrony: odstęp od zdjęcia */
.page-hero:has(.page-hero-img) + .section-sm.pt-0 {
  padding-top: clamp(2.5rem, 5vw, 4rem) !important;
}

/* Karty placówek: równiejsze odstępy wewnątrz karty */
.place-card {
  padding: 1.75rem;
}
.place-card .place-logo {
  margin-bottom: 1.75rem;
}
.place-card h3 {
  margin-bottom: 0.75rem;
}
.rd-place > p:first-child {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Dwie zwykłe sekcje obok siebie (np. karty + ramka „Ważna informacja”, obszary + CTA): jeden odstęp zamiast dwóch */
.section-sm:not(.sheet):has(+ .section-sm:not(.pt-0):not(.sheet)) {
  padding-bottom: 0;
}
