/**
 * Blog — Styles (archiwum + single post)
 * Plik: assets/css/blog.css
 *
 * Kolor primary: #5e4394
 * Korzysta z globalnych fontów motywu — brak font-family overrides
 */

 /* ===================================
    BLOG HERO & POST HERO (Wspólne style naprawiające ucinanie)
    =================================== */
 .blog-hero,
 .post-hero {
   position: relative;
   /* ZAMIANA: Używamy min-height zamiast height. Jeśli tekst będzie długi, hero urośnie! */
   min-height: 420px;
   overflow: hidden;
   background-size: cover;
   background-position: center;
   background-color: #2a1a4a;

   /* NOWOŚĆ: Flexbox spycha zawartość na dół, ale respektuje górny margines */
   display: flex;
   flex-direction: column;
   justify-content: flex-end;

   /* NOWOŚĆ: Stały, bezpieczny odstęp od góry (zmień tę wartość na wysokość Twojego menu, np. 100px) */
   padding-top: 120px;
   box-sizing: border-box;
 }

 .blog-hero__content,
 .post-hero__content {
   /* ZAMIANA: Pozbywamy się position: absolute i bottom: 0 */
   position: relative;
   width: 100%;
   padding-bottom: 48px;
   z-index: 2;
   box-sizing: border-box;
 }

 .blog-hero__content {
   animation: blogFadeUp 0.7s ease-out;
 }

 .post-hero__content {
   animation: postFadeUp 0.7s ease-out;
 }
/* ===================================
   SEARCH (w hero)
   =================================== */
.blog-search {
  position: relative;
  max-width: 440px;
  margin-top: 28px;
}

.blog-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  pointer-events: none;
}

.blog-search__input {
  box-sizing: border-box; /* POPRAWKA: zapobiega rozpychaniu przez padding przy width 100% */
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.blog-search__input::placeholder {
  color: rgba(255,255,255,0.5);
  font-weight: 400;
}

.blog-search__input:focus {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08);
}


/* ===================================
   KATEGORIE (pills)
   =================================== */
.blog-cats {
  display: flex;
  gap: 8px;
  margin: 32px 0 40px;
  flex-wrap: wrap;
}

.blog-cat {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1.5px solid rgba(0,0,0,0.06);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: all 0.2s;
}

.blog-cat:hover,
.blog-cat.active {
  background: #5e4394;
  color: #fff;
  border-color: #5e4394;
}


/* ===================================
   AKTYWNY FILTR WYSZUKIWANIA
   =================================== */
.blog-active-filter {
  font-size: 14px;
  color: #374151;
  margin-bottom: 24px;
}

.blog-active-filter__clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5e4394;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  margin-left: 12px;
}

.blog-active-filter__clear:hover {
  text-decoration: underline;
}


/* ===================================
   WYRÓŻNIONY WPIS (featured)
   =================================== */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  margin-bottom: 48px;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s;
}

.blog-featured:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.blog-featured__img {
  aspect-ratio: 4/3;
  overflow: hidden;
}

.blog-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-featured:hover .blog-featured__img img {
  transform: scale(1.04);
}

.blog-featured__body {
  box-sizing: border-box;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-featured__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5e4394;
  background: #f3f0f9;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  width: fit-content;
}

.blog-featured__title {
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.blog-featured__excerpt {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-featured__meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 16px;
  align-items: center;
}

.blog-featured__meta i {
  font-size: 14px;
  opacity: 0.5;
}


/* ===================================
   BLOG GRID
   =================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}


/* ===================================
   BLOG CARD
   =================================== */
.blog-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.blog-card:hover {
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  border-color: rgba(94,67,148,0.16);
}

.blog-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f3f4f6;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.blog-card:hover .blog-card__img img {
  transform: scale(1.04);
}

.blog-card__body {
  box-sizing: border-box;
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__cat {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5e4394;
  margin-bottom: 8px;
}

.blog-card__title {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}

.blog-card__meta {
  font-size: 11px;
  color: #6b7280;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.blog-card__meta i {
  font-size: 13px;
  opacity: 0.4;
}


/* ===================================
   PAGINACJA
   =================================== */
.blog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* POPRAWKA: Paginacja na bardzo małych ekranach może się zawijać */
  gap: 6px;
  margin-bottom: 56px;
}

.blog-pagination a,
.blog-pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid rgba(0,0,0,0.06);
  color: #374151;
  transition: all 0.2s;
}

.blog-pagination a:hover {
  border-color: #5e4394;
  color: #5e4394;
}

.blog-pagination .current,
.blog-pagination span.current {
  background: #5e4394;
  color: #fff;
  border-color: #5e4394;
}

.blog-pagination .dots {
  border: none;
  color: #6b7280;
}


/* ===================================
   BRAK WYNIKÓW
   =================================== */
.blog-empty {
  text-align: center;
  padding: 64px 20px;
  margin-bottom: 56px;
}

.blog-empty h3 {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 16px 0 8px;
}

.blog-empty p {
  color: #6b7280;
  font-size: 15px;
}


/* ============================================================
   SINGLE POST
   ============================================================ */

/* Hero */
.post-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: #2a1a4a;
}

.post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(30,15,50,0.6) 100%);
}

.post-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 48px;
  padding-top: 48px;
  z-index: 2;
  animation: postFadeUp 0.7s ease-out;
}

@keyframes postFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-hero__breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}

.post-hero__breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.post-hero__breadcrumb a:hover {
  color: #fff;
}

.post-hero__breadcrumb span {
  color: rgba(255,255,255,0.9);
}

.post-hero__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #5e4394;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.post-hero__title {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 100%; /* POPRAWKA: było 700px, co może uciąć ekran na rozdzielczościach pośrednich */
}

.post-hero__meta {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  display: flex;
  gap: 20px;
  align-items: center;
}

.post-hero__meta i {
  font-size: 15px;
  opacity: 0.5;
}


/* ===================================
   POST LAYOUT
   =================================== */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding-top: 40px;
  margin-bottom: 64px;
}


/* ===================================
   POST CONTENT (artykuł)
   =================================== */
.post-content {
  max-width: 100%; /* POPRAWKA: Bezpieczniej użyć 100% z przełamywaniem wierszy zamiast 720px */
  overflow-wrap: break-word; /* POPRAWKA: Przełamywanie długich wyrazów i linków na mobile */
  word-wrap: break-word;
}

.post-content p {
  font-size: 16px;
  line-height: 1.85;
  color: #374151;
  margin-bottom: 20px;
}

.post-content h2 {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #111827;
  margin: 32px 0 12px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 20px;
}

.post-content li {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.post-content img {
  box-sizing: border-box; /* POPRAWKA: Ochrona przed paddingiem/ramkami */
  max-width: 100%; /* POPRAWKA: Zdjęcia nie wychodzą poza blok tekstu */
  height: auto; /* POPRAWKA: Zachowuje proporcje przy zmniejszaniu zdjęcia */
  border-radius: 12px;
  margin: 28px 0;
}

.post-content blockquote {
  box-sizing: border-box;
  border-left: 3px solid #5e4394;
  background: #f3f0f9;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
  font-size: 17px;
  color: #4a3576;
  font-style: italic;
  line-height: 1.7;
}

.post-content blockquote small {
  display: block;
  font-size: 13px;
  font-style: normal;
  color: #6b7280;
  margin-top: 8px;
}


/* ===================================
   POST TAGS
   =================================== */
.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.post-tag {
  font-size: 12px;
  font-weight: 600;
  color: #5e4394;
  background: #f3f0f9;
  padding: 5px 14px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s;
}

.post-tag:hover {
  background: #5e4394;
  color: #fff;
}


/* ===================================
   POST NAWIGACJA (prev/next)
   =================================== */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.post-nav__link {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-nav__link:hover {
  border-color: rgba(94,67,148,0.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.post-nav__link--next {
  text-align: right;
}

.post-nav__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5e4394;
}

.post-nav__label i {
  font-size: 12px;
}

.post-nav__title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ===================================
   SIDEBAR
   =================================== */
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  padding: 24px;
}

.sidebar-widget__title {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ===================================
   SIDEBAR CTA
   =================================== */
.sidebar-cta {
  box-sizing: border-box;
  background: #5e4394;
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  color: #fff;
}

.sidebar-cta__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.sidebar-cta__text {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 18px;
  line-height: 1.6;
}

.sidebar-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #5e4394;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sidebar-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  color: #5e4394;
}


/* ===================================
   SIDEBAR PRODUCTS (mini cards)
   =================================== */
.sidebar-product {
  display: block;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: opacity 0.2s;
}

.sidebar-product:last-child {
  border-bottom: none;
}

.sidebar-product:hover {
  opacity: 0.85;
}

.sidebar-product__img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.sidebar-product__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.sidebar-product:hover .sidebar-product__img img {
  transform: scale(1.04);
}

.sidebar-product__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-product__title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.sidebar-product__meta {
  font-size: 11px;
  color: #6b7280;
}

.sidebar-product__meta i {
  font-size: 12px;
  color: #5e4394;
  opacity: 0.6;
}

.sidebar-product__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.sidebar-product__price-old {
  font-size: 11px;
  font-weight: 400;
  color: #b0b5be;
}

.sidebar-product__price-current {
  font-size: 15px;
  font-weight: 900;
  color: #111827;
}

.sidebar-product__price--promo .sidebar-product__price-current {
  color: #dc3545;
}

/* ===================================
   SIDEBAR RELATED (artykuły)
   =================================== */
.sidebar-related {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-related-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sidebar-related-item:hover {
  opacity: 0.8;
}

.sidebar-related-item__img {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-related-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-related-item__body {
  flex: 1;
  min-width: 0;
}

.sidebar-related-item__cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #5e4394;
  margin-bottom: 2px;
}

.sidebar-related-item__title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ===================================
   RELATED SECTION (bottom)
   =================================== */
.related-section {
  margin-bottom: 64px;
}

.related-section__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #5e4394;
  margin-bottom: 24px;
}


/* ============================================================
   BLOG POST CONTENT — globalne style tresci wpisow
   Klasy uzywane w edytorze WP (bez inline CSS)
   ============================================================ */

/* LEAD */
.post-content .lead {
  font-size: 18px;
  line-height: 1.8;
  color: #111827;
  font-weight: 400;
}

/* CYTAT / QUOTE */
.andmore-quote {
  box-sizing: border-box;
  background: #f3f0f9;
  border-left: 4px solid #5e4394;
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 16px 16px 0;
  color: #4a3576;
  font-style: italic;
  line-height: 1.7;
  font-size: 15px;
}
.andmore-quote strong {
  display: block;
  margin-bottom: 8px;
  font-style: normal;
  font-size: 16px;
  color: #3b2a60;
}

/* HIGHLIGHT BOX */
.highlight-box {
  box-sizing: border-box;
  background: #f3f0f9;
  border-left: 4px solid #5e4394;
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 16px 16px 0;
}
.highlight-box h4 {
  margin-top: 0;
  margin-bottom: 8px;
  color: #4a3576;
  font-size: 15px;
  font-weight: 800;
}
.highlight-box p {
  margin-bottom: 0;
  color: #4a3576;
  font-size: 15px;
  line-height: 1.7;
}

/* TABELE — POPRAWKA: Wymuszony scroll na mobile, by nie ucinały strony */
.andmore-table,
.post-content table,
.comparison-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);

  /* Kluczowe dla mobile: */
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.andmore-table th,
.andmore-table td,
.post-content table th,
.post-content table td,
.comparison-table-wrapper table th,
.comparison-table-wrapper table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 14px;
  line-height: 1.5;
  white-space: normal; /* Pozwala zawijać tekst wewnątrz komórek, jeśli jest miejsce */
}

.andmore-table th,
.post-content table th,
.comparison-table-wrapper table th {
  background: #5e4394;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.andmore-table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even),
.comparison-table-wrapper table tbody tr:nth-child(even) {
  background: #faf9fc;
}
.andmore-table tbody tr:hover {
  background: #f3f0f9;
}
.andmore-table td:first-child {
  font-weight: 600;
  color: #111827;
}

/* Tabela porownawcza */
.andmore-table--compare td:first-child {
  color: #b91c1c;
}
.andmore-table--compare td:last-child {
  color: #15803d;
}

/* PROGRAM LIST */
.program-list {
  box-sizing: border-box;
  background: #faf9fc;
  border: 1px solid rgba(94,67,148,0.1);
  padding: 24px;
  border-radius: 16px;
  margin: 20px 0 32px;
  font-size: 14px;
  color: #374151;
  line-height: 1.7;
}
.program-list strong {
  display: block;
  color: #4a3576;
  font-size: 15px;
  margin-bottom: 8px;
}
.program-list ul {
  margin: 8px 0 12px 18px;
  padding: 0;
}
.program-list li {
  margin-bottom: 6px;
  font-size: 14px;
}
.program-list p {
  margin: 4px 0 12px;
  font-size: 14px;
}

/* CTA BOX */
.andmore-cta {
  box-sizing: border-box;
  background: #f3f0f9;
  border: 2px solid rgba(94,67,148,0.2);
  padding: 36px 32px;
  text-align: center;
  border-radius: 24px;
  margin: 48px 0 16px;
}
.andmore-cta h3 {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
}
.andmore-cta p {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* PRZYCISKI */
.andmore-btn {
  display: inline-block;
  background: #5e4394;
  color: #ffffff !important;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 12px;
  transition: background 0.2s, transform 0.2s;
}
.andmore-btn:hover {
  background: #4a3576;
  transform: translateY(-2px);
  color: #ffffff !important;
}
.andmore-btn-secondary {
  display: inline-block;
  background: transparent;
  color: #5e4394 !important;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 13px;
  margin-top: 10px;
  border: 2px solid #5e4394;
  transition: all 0.2s;
}
.andmore-btn-secondary:hover {
  background: #5e4394;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* SEKCJA AUTORA */
.post-author {
  box-sizing: border-box;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 24px;
  margin: 48px 0 0;
}
.post-author__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3f0f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-author__avatar-initials {
  font-size: 22px;
  font-weight: 800;
  color: #5e4394;
}
.post-author__body {
  flex: 1;
  min-width: 0;
}
.post-author__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5e4394;
  margin-bottom: 4px;
}
.post-author__name {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}
.post-author__bio {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* ===================================
   KOREKTY KOLORÓW (Hero i Linki)
   =================================== */

/* 1. Jasny tekst w Hero (naprawa szarego na fiolecie) */
.blog-hero__content,
.blog-hero__content p,
.post-hero__content p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* Wymuszenie czystej bieli dla nagłówków w Hero */
.blog-hero__title,
.post-hero__title {
  color: #ffffff;
}

/* 2. Twój fiolet dla wszystkich linków w treści wpisu (zamiast czarnych) */
.post-content a {
  color: #5e4394;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px; /* Ładniejszy, nowoczesny odstęp podkreślenia */
  transition: color 0.2s ease-in-out;
}

.post-content a:hover {
  color: #4a3576; /* Lekko ciemniejszy fiolet przy najechaniu (hover) */
}

/* 3. Zabezpieczenie: linki w samym Hero muszą być białe dla czytelności */
.blog-hero__content a,
.post-hero__content a:not(.post-hero__cat) {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.blog-hero__content a:hover,
.post-hero__content a:not(.post-hero__cat):hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ===================================
   NAPRAWA POZIOMEGO SCROLLA (OVERFLOW)
   =================================== */

/* 1. Zabezpieczenie głównych kontenerów */
.post-content,
.post-layout,
.blog-grid,
.blog-featured {
  max-width: 100vw; /* Zapobiega przekraczaniu szerokości ekranu */
  box-sizing: border-box;
}

/* 2. Wymuszenie border-box na wszystkich elementach wewnątrz wpisu
      (dzięki temu paddingi i ramki wliczają się w szerokość, a nie rozpychają jej) */
.post-content *,
.blog-card *,
.sidebar-widget * {
  box-sizing: border-box;
}

/* 3. Ujarzmienie multimediów (filmy YouTube, iframe, obiekty) */
.post-content iframe,
.post-content object,
.post-content embed,
.post-content video {
  max-width: 100%;
  width: 100%; /* Dopasowuje do szerokości okna */
  height: auto;
  aspect-ratio: 16/9; /* Zachowuje proporcje wideo */
}

/* 4. Naprawa długich bloków kodu i tekstów preformatowanych */
.post-content pre {
  max-width: 100%;
  overflow-x: auto; /* Pozwala przewijać sam kod, a nie całą stronę */
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* 5. Agresywne łamanie bardzo długich wyrazów i linków na mobile */
@media (max-width: 768px) {
  .post-content {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}
/* ===================================
   SIDEBAR CONTACT FORM 7
   =================================== */
.sidebar-widget--form {
  background: #f3f0f9; /* Delikatne fioletowe tło wyróżniające formularz */
  border: 2px solid rgba(94, 67, 148, 0.1);
}

.sidebar-form-container .wpcf7-form-control-wrap {
  display: block;
  margin-bottom: 12px;
}

/* Pola tekstowe, mail, telefon i textarea */
.sidebar-form-container input[type="text"],
.sidebar-form-container input[type="email"],
.sidebar-form-container input[type="tel"],
.sidebar-form-container textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-form-container input[type="text"]:focus,
.sidebar-form-container input[type="email"]:focus,
.sidebar-form-container input[type="tel"]:focus,
.sidebar-form-container textarea:focus {
  border-color: #5e4394;
}

/* Przycisk wyślij */
.sidebar-form-container input[type="submit"] {
  width: 100%;
  background: #5e4394;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.sidebar-form-container input[type="submit"]:hover {
  background: #4a3576;
  transform: translateY(-2px);
}

/* Komunikaty o błędach CF7 na małej przestrzeni */
.sidebar-form-container .wpcf7-not-valid-tip {
  font-size: 11px;
  margin-top: 4px;
}

.sidebar-form-container .wpcf7-response-output {
  font-size: 13px;
  margin: 12px 0 0 0;
  padding: 10px;
  border-radius: 8px;
}

/* Wygląd zgody RODO w sidebarze */
.sidebar-form-container .wpcf7-list-item {
  margin: 0 0 12px 0;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
}

.sidebar-form-container .wpcf7-list-item input {
  margin-right: 8px;
}
/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 992px) {
  .blog-hero,
  .post-hero {
    min-height: 380px;
    padding-top: 100px; /* Miejsce na menu tabletowe */
  }

  .blog-hero__content,
  .post-hero__content {
    padding-bottom: 32px;
  }

  /* Zmiana siatki bloga z 3 na 2 kolumny dla tabletów */
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Układ pojedynczego wpisu - sidebar spada pod artykuł */
  .post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  /* Wyróżniony wpis łamie się na jedną kolumnę (zdjęcie nad tekstem) */
  .blog-featured {
    grid-template-columns: 1fr;
  }

  /* Zmieniamy proporcje zdjęcia na bardziej horyzontalne dla mobile */
  .blog-featured__img {
    aspect-ratio: 16/9;
  }

  /* Mniejsze paddingi wewnątrz wyróżnionego wpisu */
  .blog-featured__body {
    padding: 32px 24px;
  }
}

@media (max-width: 576px) {
  .blog-hero,
  .post-hero {
    min-height: 360px;
    padding-top: 150px; /* Miejsce na menu mobilne */
  }

  .blog-hero__title {
    font-size: 28px;
  }

  .post-hero__title {
    font-size: 24px;
  }

  /* Zmiana siatki bloga z 2 na 1 kolumnę dla smartfonów */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Jeszcze mniejsze paddingi na bardzo małych ekranach */
  .blog-featured__body {
    padding: 24px 20px;
  }
}

/* ===================================
   TABELA NA MOBILE - KOREKTA WYGLĄDU
   =================================== */
@media (max-width: 768px) {
  /* 1. Cofamy agresywne łamanie słów na pojedyncze litery tylko wewnątrz tabel */
  .post-content table th,
  .post-content table td,
  .andmore-table th,
  .andmore-table td {
    word-break: normal !important;
    overflow-wrap: normal !important;

    /* 2. Zmniejszamy tekst, żeby lepiej pasował do małego ekranu */
    font-size: 13px !important;

    /* 3. Mniejsze odstępy (padding) wewnątrz komórek */
    padding: 10px 8px !important;

    /* 4. Kluczowe: wymuszamy minimalną szerokość kolumn.
       Zamiast zgniatać tekst do jednego słowa w rzędzie, tabela włączy poziomy suwak */
    min-width: 120px;
  }

  /* Jeszcze ciut mniejszy tekst dla nagłówków tabeli, żeby zyskać na przestrzeni */
  .andmore-table th,
  .post-content table th {
    font-size: 11px !important;
  }
}
