.pi-blog-wrapper {
  display: flex;
  gap: 30px;
  margin: 20px 0;
}

.pi-blog-sidebar-left {
  flex-direction: row-reverse;
}

.pi-blog-sidebar-none .pi-blog-sidebar {
  display: none;
}

.pi-blog-sidebar-none .pi-blog-main {
  width: 100%;
}

@media (max-width: 991px) {
  .pi-blog-wrapper {
    flex-direction: column !important;
  }
}

.pi-blog-main {
  flex: 1;
  min-width: 0;
}

.pi-blog-sidebar {
  width: 280px;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .pi-blog-sidebar {
    width: 100%;
  }
}

.pi-blog-widget {
  background: #fdfdfd;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.pi-blog-widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #24b9d7;
  padding-bottom: 8px;
}

.pi-blog-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pi-blog-category-list li {
  margin-bottom: 8px;
}

.pi-blog-category-list li a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pi-blog-category-list li.active a,
.pi-blog-category-list li a:hover {
  color: #24b9d7;
  font-weight: 600;
}

.pi-blog-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pi-blog-tag-item {
  background: #eef7f9;
  color: #24b9d7;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.pi-blog-tag-item:hover,
.pi-blog-tag-item.active {
  background: #24b9d7;
  color: #ffffff;
}

/* Post Cards & Grid */
.pi-blog-posts-container.pi-blog-layout-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 30px;
}

.pi-blog-posts-container.pi-blog-cols-2 {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.pi-blog-posts-container.pi-blog-cols-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.pi-blog-posts-container.pi-blog-cols-4 {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* List Layout */
.pi-blog-posts-container.pi-blog-layout-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.pi-blog-posts-container.pi-blog-layout-list .pi-blog-card {
  flex-direction: row;
}

.pi-blog-posts-container.pi-blog-layout-list .pi-blog-card-thumbnail {
  width: 280px;
  height: auto;
  min-height: 180px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pi-blog-posts-container.pi-blog-layout-list .pi-blog-card {
    flex-direction: column;
  }
  .pi-blog-posts-container.pi-blog-layout-list .pi-blog-card-thumbnail {
    width: 100%;
    height: 200px;
  }
}

.pi-blog-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.pi-blog-card-featured {
  border: 2px solid #24b9d7;
  position: relative;
}

.pi-blog-card-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.pi-blog-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.pi-blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pi-blog-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pi-blog-badge {
  display: inline-block;
  background: #eef7f9;
  color: #24b9d7;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.pi-blog-badge-featured {
  background: #24b9d7;
  color: #ffffff;
}

.pi-blog-card-title {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.pi-blog-card-title a {
  color: #232323;
  text-decoration: none;
}

.pi-blog-card-title a:hover {
  color: #24b9d7;
}

.pi-blog-card-meta {
  font-size: 0.85rem;
  color: #7a7a7a;
  margin-bottom: 12px;
}

.pi-blog-card-excerpt {
  color: #555555;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Single Post View */
.pi-blog-single-post {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.pi-blog-post-featured-image {
  margin-bottom: 25px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 450px;
}

.pi-blog-post-featured-image img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  display: block;
}

.pi-blog-post-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333333;
  padding: 15px;
  background-color: #f9f9f9;
  border-left: 4px solid #24b9d7;
  margin-bottom: 25px;
  border-radius: 4px;
}

.pi-blog-post-tags {
  margin: 20px 0;
  padding-top: 15px;
  border-top: 1px dashed #e0e0e0;
}

.pi-blog-tag-badge {
  background: #f0f0f0;
  color: #333;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 5px;
  text-decoration: none;
}

.pi-blog-share-buttons {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-facebook { background: #3b5998; color: #fff; }
.btn-twitter { background: #1da1f2; color: #fff; }
.btn-linkedin { background: #0077b5; color: #fff; }

.pi-blog-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e5e5;
  padding-bottom: 10px;
}

/* Related Products Grid */
.pi-blog-related-products {
  margin-top: 40px;
  padding: 25px;
  background-color: #fcfcfc;
  border: 1px solid #e9e9e9;
  border-radius: 8px;
}

.pi-blog-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.pi-blog-product-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pi-blog-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pi-blog-product-thumbnail {
  height: 160px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pi-blog-product-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pi-blog-product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pi-blog-product-title {
  font-size: 0.95rem;
  margin: 0 0 8px 0;
  font-weight: 600;
  line-height: 1.3;
}

.pi-blog-product-title a {
  color: #232323;
  text-decoration: none;
}

.pi-blog-product-price {
  font-weight: 700;
  color: #24b9d7;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.pi-blog-product-footer {
  margin-top: auto;
}

/* Comments Section */
.pi-blog-comments-section {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #f0f0f0;
}

.pi-blog-comment-item {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.pi-blog-comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.pi-blog-comment-date {
  color: #888;
  font-size: 0.8rem;
}

.pi-blog-add-comment {
  margin-top: 30px;
  background: #fafafa;
  padding: 20px;
  border-radius: 8px;
}

.pi-blog-related-posts {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #f0f0f0;
}

/* ==========================================================================
   displayHome — finalny, uporządkowany styl
   Tytuł wpisu zawsze u góry; kategoria + data zawsze przy dolnej krawędzi.
   ========================================================================== */

body .pi-blog-home-section {
    width: 100%;
    margin: 0;
    padding: 58px 0 28px;
    background: #fff;
}

body .pi-blog-home-section > .container {
    width: calc(100% - 100px) !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Nagłówek sekcji */
body .pi-blog-home-section .pi-blog-home-heading {
    display: block !important;
    margin: 0 0 44px !important;
    padding: 0 !important;
}

body .pi-blog-home-section .pi-blog-home-title,
body .pi-blog-home-section h2.pi-blog-home-title:not(#pi-a):not(#pi-b):not(#pi-c):not(#pi-d) {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;

    font-family: "Syne", sans-serif !important;
    font-size: clamp(40px, 3.15vw, 50px) !important;
    font-weight: 600 !important;
    line-height: 1.02 !important;
    letter-spacing: -.035em !important;

    color: #2a2a2a !important;
    text-align: left !important;
    text-transform: none !important;
}

body .pi-blog-home-section .pi-blog-home-title__first {
    display: block !important;
    font: inherit !important;
    line-height: inherit !important;
}

body .pi-blog-home-section .pi-blog-home-title__second {
    display: block !important;
    font: inherit !important;
    line-height: inherit !important;
}

body .pi-blog-home-section .pi-blog-home-title__accent {
    display: inline !important;
    color: #0874f9 !important;
    font: inherit !important;
}

body .pi-blog-home-section .pi-blog-home-title__normal {
    display: inline !important;
    color: #2a2a2a !important;
    font: inherit !important;
}

/* Dokładnie 2 kolumny na desktopie */
body .pi-blog-home-section .pi-blog-posts-container,
body .pi-blog-home-section .pi-blog-posts-container.pi-blog-layout-grid,
body .pi-blog-home-section .pi-blog-posts-container.pi-blog-cols-2,
body .pi-blog-home-section .pi-blog-posts-container.pi-blog-cols-3,
body .pi-blog-home-section .pi-blog-posts-container.pi-blog-cols-4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Karta */
body .pi-blog-home-section .pi-blog-card,
body .pi-blog-home-section article.pi-blog-card {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%) !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 230px !important;
    min-height: 230px !important;

    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;

    background: #fff !important;
    border: 1px solid #edf0f4 !important;
    border-radius: 20px !important;
    box-shadow: 0 9px 18px rgba(21, 36, 55, .10) !important;

    transform: none !important;
    transition: box-shadow .2s ease, transform .2s ease;
}

body .pi-blog-home-section .pi-blog-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 24px rgba(21, 36, 55, .13) !important;
}

/*
 * Lewa część:
 * grid z trzema rzędami powoduje, że tytuł jest fizycznie na górze,
 * a blok kategoria+data jest zawsze na samym dole.
 */
body .pi-blog-home-section .pi-blog-card-body {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 1 !important;

    display: grid !important;
    grid-template-rows: auto 1fr auto !important;

    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 100% !important;

    margin: 0 !important;
    padding: 21px 20px 17px !important;
}

/* Tytuł zawsze pierwszy */
body .pi-blog-home-section .pi-blog-card-title,
body .pi-blog-home-section h3.pi-blog-card-title:not(#pi-a):not(#pi-b):not(#pi-c):not(#pi-d) {
    grid-row: 1 !important;
    align-self: start !important;
    order: unset !important;

    display: -webkit-box !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;

    font-family: "Syne", sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.04 !important;
    letter-spacing: -.015em !important;

    color: #111 !important;
    text-align: left !important;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

body .pi-blog-home-section .pi-blog-card-title a,
body .pi-blog-home-section .pi-blog-card-title a:hover,
body .pi-blog-home-section .pi-blog-card-title a:focus {
    color: #111 !important;
    text-decoration: none !important;
}

/* Kategoria + data zawsze przy dolnej krawędzi */
body .pi-blog-home-section .pi-blog-card-bottom {
    grid-row: 3 !important;
    align-self: end !important;
    order: unset !important;

    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .pi-blog-home-section .pi-blog-card-category,
body .pi-blog-home-section .pi-blog-card-date {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;

    font-family: "Inter", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;

    color: #454545 !important;
    text-align: left !important;
}

body .pi-blog-home-section .pi-blog-card-category {
    margin-bottom: 1px !important;
}

/* Elementy starego układu nie mogą wpływać na kolejność */
body .pi-blog-home-section .pi-blog-card-badges,
body .pi-blog-home-section .pi-blog-card-meta,
body .pi-blog-home-section .pi-blog-card-excerpt,
body .pi-blog-home-section .pi-blog-card-footer {
    display: none !important;
}

/* Zdjęcie po prawej */
body .pi-blog-home-section .pi-blog-card-thumbnail {
    position: relative !important;
    grid-column: 2 !important;
    grid-row: 1 !important;

    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    overflow: hidden !important;

    background: #f4f4f4 !important;
    border-radius: 18px !important;
}

body .pi-blog-home-section .pi-blog-card-thumbnail > a {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

body .pi-blog-home-section .pi-blog-card-thumbnail img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border-radius: 18px !important;
    transform: none !important;
}

/* Strzałka na zdjęciu */
body .pi-blog-home-section .pi-blog-card-arrow {
    position: absolute !important;
    top: 18px !important;
    right: 14px !important;
    z-index: 2 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 56px !important;
    height: 56px !important;

    background-color: #0874f9 !important;
    background-image: url("data:image/svg+xml,%3Csvg width='25' height='25' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12.5H20' stroke='white' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M14.5 7L20 12.5L14.5 18' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 25px 25px !important;

    border-radius: 50% !important;
    transition: background-color .2s ease, transform .2s ease;
}

body .pi-blog-home-section .pi-blog-card-thumbnail > a:hover .pi-blog-card-arrow {
    background-color: #135bbd !important;
    transform: translateX(2px) !important;
}

/* CTA pod kartami */
body .pi-blog-home-section .blog-section-cta {
    display: flex !important;
    justify-content: center !important;

    width: 100% !important;
    margin: 36px auto 0 !important;
    padding: 0 !important;
}

body .pi-blog-home-section .blog-section-cta__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;

    min-width: 248px !important;
    min-height: 56px !important;

    margin: 0 !important;
    padding: 6px 7px 6px 28px !important;

    font-family: "Inter", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    color: #fff !important;
    background: #0874f9 !important;
    border: 1px solid #0874f9 !important;
    border-radius: 999px !important;

    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(0, 108, 255, .18) !important;

    transition:
        background-color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

body .pi-blog-home-section .blog-section-cta__text {
    white-space: nowrap !important;
}

body .pi-blog-home-section .blog-section-cta__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;

    background-color: rgba(255, 255, 255, .23) !important;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12H19' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M14 7L19 12L14 17' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 24px 24px !important;

    border-radius: 50% !important;
}

body .pi-blog-home-section .blog-section-cta__link:hover,
body .pi-blog-home-section .blog-section-cta__link:focus {
    color: #fff !important;
    background: #135bbd !important;
    border-color: #135bbd !important;
    transform: translateY(-2px) !important;
}

body .pi-blog-home-section .blog-section-cta__link:hover .blog-section-cta__icon,
body .pi-blog-home-section .blog-section-cta__link:focus .blog-section-cta__icon {
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12H19' stroke='%230874F9' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M14 7L19 12L14 17' stroke='%230874F9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    transform: translateX(2px) !important;
}

/* Tablet */
@media (max-width: 1199px) {
    body .pi-blog-home-section > .container {
        width: calc(100% - 48px) !important;
        max-width: 760px !important;
    }

    body .pi-blog-home-section .pi-blog-posts-container,
    body .pi-blog-home-section .pi-blog-posts-container.pi-blog-layout-grid,
    body .pi-blog-home-section .pi-blog-posts-container.pi-blog-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile */
@media (max-width: 575px) {
    body .pi-blog-home-section {
        padding: 38px 0 52px !important;
    }

    body .pi-blog-home-section > .container {
        width: calc(100% - 32px) !important;
        max-width: none !important;
    }

    body .pi-blog-home-section .pi-blog-home-heading {
        margin-bottom: 30px !important;
    }

    body .pi-blog-home-section .pi-blog-home-title,
    body .pi-blog-home-section h2.pi-blog-home-title:not(#pi-a):not(#pi-b):not(#pi-c):not(#pi-d) {
        font-size: clamp(36px, 11.5vw, 46px) !important;
    }

    body .pi-blog-home-section .pi-blog-card,
    body .pi-blog-home-section article.pi-blog-card {
        display: flex !important;
        flex-direction: column-reverse !important;

        height: auto !important;
        min-height: 0 !important;
    }

    body .pi-blog-home-section .pi-blog-card-thumbnail {
        width: 100% !important;
        height: 220px !important;
        min-height: 220px !important;
    }

    body .pi-blog-home-section .pi-blog-card-body {
        display: grid !important;
        grid-template-rows: auto 1fr auto !important;

        width: 100% !important;
        min-height: 185px !important;
        height: 185px !important;

        padding: 20px !important;
    }

    body .pi-blog-home-section .pi-blog-card-arrow {
        top: 14px !important;
        right: 14px !important;
        width: 52px !important;
        height: 52px !important;
    }

    body .pi-blog-home-section .blog-section-cta {
        margin-top: 28px !important;
    }
}


/* ==========================================================================
   Paginacja bloga
   ========================================================================== */

body .pi-blog-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    width: 100% !important;
    margin: 40px 0 !important;
    padding: 0 !important;
}

body .pi-blog-pagination .page-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}

body .pi-blog-pagination .page-list > li {
    display: block !important;
    float: none !important;

    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .pi-blog-pagination .page-list > li > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;

    font-family: "Inter", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    color: #222 !important;
    background: #fff !important;
    border: 1px solid #e4e9ef !important;
    border-radius: 999px !important;

    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(21, 36, 55, .06) !important;
}

body .pi-blog-pagination .page-list > li > a:hover,
body .pi-blog-pagination .page-list > li > a:focus,
body .pi-blog-pagination .page-list > li.current > a {
    color: #fff !important;
    background: #0874f9 !important;
    border-color: #0874f9 !important;
}

body .pi-blog-pagination .page-list > li.current > a {
    pointer-events: none !important;
}