/* ==========================================================================
   Strona autora (author.php)
   ========================================================================== */
.ibif-author-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    padding: 56px 0 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
    margin-top: 50px;
}

.ibif-author-avatar {
    flex: 0 0 auto;
}

.ibif-author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f4f6f4;
}

.ibif-author-details {
    flex: 1 1 auto;
    min-width: 220px;
}

.ibif-author-name {
    margin: 0 0 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 1.4;
    color: var(--ast-global-color-0, #439615);
}

.ibif-author-position {
    display: inline-block;
    margin: 0 0 14px;
    padding: 4px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background-color: var(--ast-global-color-1, #62ce3a);
    border-radius: 30px;
}

.ibif-author-linkedin-wrap {
    margin: 0 0 40px;
}

.ibif-author-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background-color: var(--ast-global-color-0, #439615);
    padding: 9px 18px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.ibif-author-linkedin svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.ibif-author-linkedin:hover,
.ibif-author-linkedin:focus {
    background-color: var(--ast-global-color-1, #62ce3a);
    color: #fff;
}

.ibif-author-about {
    margin-bottom: 40px;
}

.ibif-author-about h2,
.ibif-author-publications-title {
    margin: 0 0 16px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: var(--ast-global-color-0, #439615);
}

.ibif-author-about-content {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: var(--ast-global-color-2, #505050);
    line-height: 1.7;
}

.ibif-author-publications {
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.ibif-author-no-posts {
    font-family: 'Lato', sans-serif;
    color: var(--ast-global-color-2, #505050);
}

/* Siatka publikacji - dopasowana do kart z /blog/ (Essential Addons Post Grid) */
.ibif-pub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 24px;
}

.ibif-pub-grid article {
    padding: 0!important;
}

.ibif-pub-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.267);
    overflow: hidden;
}

.ibif-pub-thumb {
    display: block;
}

.ibif-pub-thumb img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.ibif-pub-body {
    padding: 24px;
}

.ibif-pub-title {
    margin: 0 0 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.3;
}

.ibif-pub-title a {
    color: var(--ast-global-color-0, #439615);
    text-decoration: none;
}

.ibif-pub-title a:hover {
    color: var(--ast-global-color-1, #62ce3a);
}

.ibif-pub-date {
    margin-bottom: 12px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: var(--ast-global-color-2, #505050);
}

.ibif-pub-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ibif-pub-meta .ibif-pub-date {
    margin-bottom: 0;
}

.ibif-pub-author {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.ibif-pub-author a {
    color: var(--ast-global-color-0, #439615);
    text-decoration: none;
}

.ibif-pub-author a:hover {
    color: var(--ast-global-color-1, #62ce3a);
    text-decoration: underline;
}

.ibif-pub-meta-sep {
    font-size: 14px;
    color: var(--ast-global-color-2, #505050);
    opacity: 0.5;
}

.ibif-pub-excerpt {
    margin-bottom: 12px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ast-global-color-2, #505050);
}

.ibif-pub-more {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ast-global-color-1, #62ce3a);
    text-decoration: none;
}

.ibif-pub-more:hover {
    color: var(--ast-global-color-0, #439615);
}

@media (max-width: 782px) {
    .ibif-pub-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Strona "Blog" (page-blog.php)
   ========================================================================== */
.ibif-blog-header {
    margin: 100px 0 24px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 32px 6px 0 0;
    padding: 0 10px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #e5e5e5;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ast-global-color-2, #505050);
    text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--ast-global-color-0, #439615);
    border-color: var(--ast-global-color-0, #439615);
    color: #fff;
}

@media (max-width: 600px) {
    .ibif-author-header {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
        margin-top: 24px;
    }

    .ibif-author-avatar img {
        width: 96px;
        height: 96px;
    }

    .ibif-blog-header {
        margin: 32px 0 16px;
    }

    .ibif-pub-grid {
        gap: 20px;
        margin-top: 16px;
    }

    .ibif-pub-body {
        padding: 18px;
    }

    .ibif-pub-thumb img {
        height: 180px;
    }

    .ibif-post-meta-bar {
        gap: 10px 16px;
        padding: 12px 16px;
        margin-bottom: 18px;
    }

    .ibif-post-toc {
        padding: 16px 18px;
        margin-bottom: 24px;
    }

    .ibif-post-author-box {
        padding: 18px;
        margin-top: 32px;
    }
}

/* ==========================================================================
   Belka meta (data / czas czytania / autor) - nad spisem treści na wpisie
   ========================================================================== */
.single-post .entry-header .entry-meta {
    display: none;
}

/* Ukrywamy box wtyczki Easy Table of Contents - mamy własny, ostylowany spis treści. */
#ez-toc-container {
    display: none !important;
}

.single-post .entry-content h2 {
    scroll-margin-top: 110px;
}

.ibif-post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    margin: 0 0 24px;
    padding: 14px 20px;
    background: #f4f6f4;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: var(--ast-global-color-2, #505050);
}

.ibif-post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ibif-post-meta-item svg {
    width: 16px;
    height: 16px;
    fill: var(--ast-global-color-0, #439615);
    flex-shrink: 0;
}

.ibif-post-meta-author a {
    color: var(--ast-global-color-0, #439615);
    text-decoration: none;
    font-weight: 600;
}

.ibif-post-meta-author a:hover {
    color: var(--ast-global-color-1, #62ce3a);
}

/* ==========================================================================
   Spis treści (automatyczny, generowany z nagłówków H2)
   ========================================================================== */
.ibif-post-toc {
    margin: 0 0 32px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.ibif-post-toc-title {
    margin: 0 0 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ast-global-color-0, #439615);
}

.ibif-post-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ibif-toc-counter;
}

.ibif-post-toc-list li {
    counter-increment: ibif-toc-counter;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 6px;
}

.ibif-post-toc-list li:last-child {
    margin-bottom: 0;
}

.ibif-post-toc-list li::before {
    content: counter(ibif-toc-counter) '.';
    flex: 0 0 auto;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--ast-global-color-1, #62ce3a);
}

.ibif-post-toc-list a {
    flex: 1 1 auto;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ast-global-color-2, #505050);
    text-decoration: none;
}

.ibif-post-toc-list a:hover {
    color: var(--ast-global-color-0, #439615);
}

/* ==========================================================================
   Tabele w treści wpisu (blok Gutenberga "Tabela")
   ========================================================================== */
.single-post .entry-content .wp-block-table {
    margin: 0 0 32px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow-x: auto;
}

.single-post .entry-content .wp-block-table table {
    width: 100%;
    min-width: 560px;
    margin: 0;
    border-collapse: collapse;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.single-post .entry-content .wp-block-table thead td,
.single-post .entry-content .wp-block-table th {
    background: var(--ast-global-color-0, #439615);
    color: #fff;
    text-align: left;
    padding: 14px 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: 0;
}

.single-post .entry-content .wp-block-table thead td strong,
.single-post .entry-content .wp-block-table th strong {
    color: inherit;
    font-weight: 600;
}

.single-post .entry-content .wp-block-table tbody td {
    padding: 14px 18px;
    vertical-align: top;
    line-height: 1.6;
    color: var(--ast-global-color-2, #505050);
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    overflow-wrap: break-word;
}

.single-post .entry-content .wp-block-table tbody tr:last-child td {
    border-bottom: 0;
}

.single-post .entry-content .wp-block-table tbody tr:nth-child(even) {
    background: #f4f6f4;
}

.single-post .entry-content .wp-block-table tbody td:first-child {
    color: var(--ast-global-color-0, #439615);
    font-weight: 600;
}

/* ==========================================================================
   FAQ (wtyczka SASWP) - rozwijany akordeon
   ========================================================================== */
.saswp-faq-block-section {
    margin: 32px 0;
}

.saswp-faq-block-section ol {
    margin: 0;
    padding: 0;
}

.saswp-faq-block-section li {
    list-style: none;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin: 0 0 12px;
    overflow: hidden;
}

.saswp-faq-block-section li:last-child {
    margin-bottom: 0;
}

.saswp-faq-block-section h3 {
    position: relative;
    margin: 0;
    padding: 16px 44px 16px 20px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ast-global-color-2, #505050);
    transition: color 0.2s ease;
}

.saswp-faq-block-section h3:hover {
    color: var(--ast-global-color-0, #439615);
}

.saswp-faq-block-section h3::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--ast-global-color-0, #439615);
    border-bottom: 2px solid var(--ast-global-color-0, #439615);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.25s ease;
}

.saswp-faq-block-section li.saswp-faq-open h3 {
    color: var(--ast-global-color-0, #439615);
}

.saswp-faq-block-section li.saswp-faq-open h3::after {
    transform: translateY(-50%) rotate(-135deg);
}

.saswp-faq-block-section .saswp-faq-answer-text {
    margin: 0;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ast-global-color-2, #505050);
    transition: max-height 0.3s ease;
}

/* ==========================================================================
   Box "O autorze" na końcu wpisu
   ========================================================================== */
.ibif-post-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 48px;
    padding: 24px;
    background: #f4f6f4;
    border-radius: 8px;
}

.ibif-post-author-avatar img {
    display: block;
    width: 150px;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
}

.ibif-post-author-body {
    flex: 1 1 auto;
    min-width: 0;
}

.ibif-post-author-label {
    display: block;
    margin-bottom: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ast-global-color-2, #505050);
    opacity: 0.7;
}

.ibif-post-author-name {
    margin: 0 0 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
}

.ibif-post-author-name a {
    color: var(--ast-global-color-0, #439615);
    text-decoration: none;
}

.ibif-post-author-position {
    margin: 0 0 10px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ast-global-color-2, #505050);
}

.ibif-post-author-about {
    margin: 0 0 12px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ast-global-color-2, #505050);
}

.ibif-post-author-about p {
    margin: 0;
}

.ibif-post-author-link {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background-color: var(--ast-global-color-0, #439615);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.ibif-post-author-link:hover,
.ibif-post-author-link:focus {
    background-color: var(--ast-global-color-1, #62ce3a);
    color: #fff;
}

@media (max-width: 600px) {
    .ibif-post-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ast-separate-container .ast-article-single {
        padding: 50px 20px!important;
    }
    .ast-separate-container .ast-article-single h2 {
        font-size: 28px!important;
    }
}
