/**
 * Semtak Builder - Frontend Styles
 *
 * @package SemtakBuilder
 * @version 0.0.1
 *
 * Ultra-lightweight CSS (~3KB) for semantic HTML output
 * Based on 12-column CSS Grid system
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --stb-gap: 2rem;
    --stb-gap-sm: 1rem;
    --stb-margin: 1.5rem;
    --stb-border-radius: 4px;
    --stb-transition: 0.2s ease;

    /* IGA Article Design System */
    --iga-accent: #b08d57;
    --iga-accent-2: #2f3a40;
    --iga-soft: #f6f2ec;
    --iga-text: #1e1f21;
    --iga-border: rgba(0, 0, 0, 0.08);
    --iga-radius: 14px;
    --iga-gap: 14px;
}

/* ==========================================================================
   Picture Element Reset (AVIF/WebP wrapper)
   Prevents inline baseline gap that causes colored lines under images.
   ========================================================================== */

.stb-picture {
    display: block;
    line-height: 0;
}

.stb-picture img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Content Container
   ========================================================================== */

.stb-content {
    display: block;
    max-width: 100%;
}

/* ==========================================================================
   Block Base Styles
   ========================================================================== */

.stb-block {
    margin-bottom: var(--stb-mb, var(--stb-margin));
    margin-top: var(--stb-mt, 0);
}

.stb-block:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Text Block
   ========================================================================== */

.stb-block--text {
    line-height: 1.7;
}

.stb-block--text p {
    margin: 0 0 1em;
}

.stb-block--text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Link Block
   ========================================================================== */

.stb-block--link {
    display: inline-block;
}

.stb-block--link:hover {
    text-decoration: underline;
}

/* Button style link */
.stb-button {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: var(--stb-button-bg, #2271b1);
    color: var(--stb-button-color, #fff);
    text-decoration: none;
    border-radius: var(--stb-border-radius);
    transition: background var(--stb-transition), transform var(--stb-transition);
}

.stb-button:hover {
    background: var(--stb-button-hover-bg, #135e96);
    text-decoration: none;
    transform: translateY(-1px);
}

.stb-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   Image Block
   ========================================================================== */

.stb-block--image {
    margin: 0 0 var(--stb-margin);
}

.stb-block__image {
    display: block;
    max-width: 100%;
    height: auto;
}

.stb-block__caption {
    margin-top: 0.5em;
    font-size: 0.875em;
    color: var(--stb-caption-color, #666);
    text-align: center;
}

/* ==========================================================================
   HTML Block
   ========================================================================== */

.stb-block--html {
    overflow: hidden;
}

/* ==========================================================================
   Alignment
   ========================================================================== */

.stb-align--left {
    text-align: left;
}

.stb-align--center {
    text-align: center;
}

.stb-align--right {
    text-align: right;
}

/* Image alignment — targets the <img> inside <figure> since img is display:block */
.stb-block--image.stb-align--center .stb-block__image {
    margin-left: auto;
    margin-right: auto;
}

.stb-block--image.stb-align--right .stb-block__image {
    margin-left: auto;
    margin-right: 0;
}

/* ==========================================================================
   Grid System (12-column)
   ========================================================================== */

.stb-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--stb-gap);
}

.stb-col-1 { grid-column: span 1; }
.stb-col-2 { grid-column: span 2; }
.stb-col-3 { grid-column: span 3; }
.stb-col-4 { grid-column: span 4; }
.stb-col-5 { grid-column: span 5; }
.stb-col-6 { grid-column: span 6; }
.stb-col-7 { grid-column: span 7; }
.stb-col-8 { grid-column: span 8; }
.stb-col-9 { grid-column: span 9; }
.stb-col-10 { grid-column: span 10; }
.stb-col-11 { grid-column: span 11; }
.stb-col-12 { grid-column: span 12; }

/* Responsive columns */
@media (max-width: 768px) {
    .stb-row {
        gap: var(--stb-gap-sm);
    }

    .stb-col-1,
    .stb-col-2,
    .stb-col-3,
    .stb-col-4,
    .stb-col-5,
    .stb-col-6,
    .stb-col-7,
    .stb-col-8,
    .stb-col-9,
    .stb-col-10,
    .stb-col-11,
    .stb-col-12 {
        grid-column: span 12;
    }
}

/* ==========================================================================
   Flex Layouts (5-6 equal columns)
   Uses flexbox instead of 12-column grid for non-standard column counts
   ========================================================================== */

.stb-row--flex-5,
.stb-row--flex-6 {
    display: flex;
    flex-wrap: wrap;
    gap: var(--stb-gap);
}

/* Flex column base */
.stb-col-flex {
    flex: 1 1 auto;
    min-width: 0; /* Allow shrinking below content width */
}

/* 5 columns: each 20% minus gap */
.stb-row--flex-5 > .stb-col-flex {
    flex: 0 0 calc((100% - 4 * var(--stb-gap)) / 5);
    max-width: calc((100% - 4 * var(--stb-gap)) / 5);
}

/* 6 columns: each 16.66% minus gap */
.stb-row--flex-6 > .stb-col-flex {
    flex: 0 0 calc((100% - 5 * var(--stb-gap)) / 6);
    max-width: calc((100% - 5 * var(--stb-gap)) / 6);
}

/* Responsive flex columns - tablet */
@media (max-width: 992px) {
    .stb-row--flex-5 > .stb-col-flex,
    .stb-row--flex-6 > .stb-col-flex {
        flex: 0 0 calc((100% - 2 * var(--stb-gap)) / 3);
        max-width: calc((100% - 2 * var(--stb-gap)) / 3);
    }
}

/* Responsive flex columns - mobile */
@media (max-width: 768px) {
    .stb-row--flex-5,
    .stb-row--flex-6 {
        gap: var(--stb-gap-sm);
    }

    .stb-row--flex-5 > .stb-col-flex,
    .stb-row--flex-6 > .stb-col-flex {
        flex: 0 0 calc((100% - var(--stb-gap-sm)) / 2);
        max-width: calc((100% - var(--stb-gap-sm)) / 2);
    }
}

/* Responsive flex columns - small mobile */
@media (max-width: 480px) {
    .stb-row--flex-5 > .stb-col-flex,
    .stb-row--flex-6 > .stb-col-flex {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   Separator
   ========================================================================== */

.stb-separator {
    border: 0;
    border-top: 1px solid var(--stb-separator-color, #ddd);
    margin: var(--stb-margin) 0;
}

.stb-separator--wide {
    width: 100%;
    max-width: none;
}

.stb-separator--dots {
    border-style: dotted;
    border-top-width: 3px;
}

/* ==========================================================================
   Spacer
   ========================================================================== */

.stb-spacer {
    display: block;
}

/* ==========================================================================
   Video Wrapper (responsive 16:9)
   ========================================================================== */

.stb-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.stb-video-wrapper iframe,
.stb-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Accordion (native details/summary)
   ========================================================================== */

.stb-accordion {
    border: none;
}

.stb-accordion__item {
    border: 1px solid var(--stb-accordion-border, #ddd);
    border-bottom: none;
}

.stb-accordion__item:first-of-type {
    border-top-left-radius: var(--stb-border-radius);
    border-top-right-radius: var(--stb-border-radius);
}

.stb-accordion__item:last-child {
    border-bottom: 1px solid var(--stb-accordion-border, #ddd);
    border-bottom-left-radius: var(--stb-border-radius);
    border-bottom-right-radius: var(--stb-border-radius);
}

.stb-accordion__title {
    display: block;
    padding: 1em;
    cursor: pointer;
    font-weight: 600;
    background: var(--stb-accordion-header-bg, #f9f9f9);
    transition: background var(--stb-transition);
}

.stb-accordion__title:hover {
    background: var(--stb-accordion-header-hover-bg, #f0f0f0);
}

.stb-accordion__content {
    padding: 1em;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.stb-block--html table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.stb-block--html th,
.stb-block--html td {
    padding: 0.75em;
    border: 1px solid var(--stb-table-border, #ddd);
    text-align: left;
}

.stb-block--html th {
    background: var(--stb-table-header-bg, #f9f9f9);
    font-weight: 600;
}

/* ==========================================================================
   Lists
   ========================================================================== */

.stb-block--html ul,
.stb-block--html ol {
    margin: 0 0 1em;
    padding-left: 1.5em;
}

.stb-block--html li {
    margin-bottom: 0.25em;
}

/* ==========================================================================
   Blockquote
   ========================================================================== */

.stb-block--html blockquote {
    margin: 1em 0;
    padding: 1em 1.5em;
    border-left: 4px solid var(--stb-blockquote-border, #2271b1);
    background: var(--stb-blockquote-bg, #f9f9f9);
    font-style: italic;
}

.stb-block--html blockquote cite {
    display: block;
    margin-top: 0.5em;
    font-size: 0.875em;
    font-style: normal;
    color: var(--stb-caption-color, #666);
}

/* ==========================================================================
   Code
   ========================================================================== */

.stb-block--html code {
    padding: 0.125em 0.375em;
    background: var(--stb-code-bg, #f5f5f5);
    border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
}

.stb-block--html pre {
    margin: 1em 0;
    padding: 1em;
    background: var(--stb-code-bg, #f5f5f5);
    border-radius: var(--stb-border-radius);
    overflow-x: auto;
}

.stb-block--html pre code {
    padding: 0;
    background: none;
}

/* ==========================================================================
   Products Grid (WooCommerce)
   ========================================================================== */

.stb-products {
    display: grid;
    gap: var(--stb-gap);
    margin-bottom: var(--stb-margin);
}

.stb-products--cols-1 { grid-template-columns: 1fr; }
.stb-products--cols-2 { grid-template-columns: repeat(2, 1fr); }
.stb-products--cols-3 { grid-template-columns: repeat(3, 1fr); }
.stb-products--cols-4 { grid-template-columns: repeat(4, 1fr); }

.stb-product {
    background: var(--stb-product-bg, #fff);
    border: 1px solid var(--stb-product-border, #e0e0e0);
    border-radius: var(--stb-border-radius);
    overflow: hidden;
    transition: box-shadow var(--stb-transition), transform var(--stb-transition);
}

.stb-product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.stb-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.stb-product__link:hover {
    text-decoration: none;
}

.stb-product__image {
    position: relative;
    aspect-ratio: 1;
    background: var(--stb-product-image-bg, #f5f5f5);
    overflow: hidden;
}


.stb-product__image .stb-picture {
    display: block;
    width: 100%;
    height: 100%;
}
.stb-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--stb-transition);
}

.stb-product:hover .stb-product__image img {
    transform: scale(1.05);
}

.stb-product__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stb-product__image--placeholder::after {
    content: "📷";
    font-size: 2rem;
    opacity: 0.3;
}

.stb-product__title {
    margin: 0;
    padding: 0.75rem 1rem 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.stb-product__price {
    padding: 0.25rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stb-product-price-color, #2271b1);
}

.stb-product__price del {
    opacity: 0.6;
    font-weight: 400;
}

.stb-product__price ins {
    text-decoration: none;
    color: var(--stb-product-sale-color, #c00);
}

.stb-product__sku {
    padding: 0.5rem 1rem 0.75rem;
    font-size: 0.75rem;
    color: var(--stb-caption-color, #666);
}

/* Responsive products */
@media (max-width: 768px) {
    .stb-products--cols-3,
    .stb-products--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stb-products--cols-2,
    .stb-products--cols-3,
    .stb-products--cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   IGA ARTICLE DESIGN SYSTEM
   Full styling for IGA article components rendered by SEMTAK Builder.
   Matches Content Bridge iga-article.css so compiled posts look identical.
   ========================================================================== */

/* ---------- Typography (within SEMTAK Builder content) ---------- */
.stb-content {
    color: var(--iga-text);
    line-height: 1.78;
}
.stb-content h2 {
    margin: 1.6em 0 0.6em;
    font-size: 1.45em;
    color: var(--iga-accent-2);
}
.stb-content h3 {
    margin: 1.2em 0 0.4em;
    font-size: 1.15em;
}
.stb-content p {
    margin: 0.7em 0;
}
.stb-content a {
    color: var(--iga-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.stb-content a:hover {
    color: var(--iga-accent-2);
}

/* Scroll offset for sticky header */
.stb-content h2[id] {
    scroll-margin-top: 80px;
}
@media (min-width: 768px) {
    .stb-content h2[id] {
        scroll-margin-top: 110px;
    }
}

/* ---------- SPIS TREŚCI (TOC) ---------- */
.iga-toc {
    background: #F4F9FC;
    border: 1px solid #dce8f0;
    border-left: 5px solid #293292;
    padding: 16px 20px;
    border-radius: var(--iga-radius);
    margin: 10px 0;
}
.iga-toc strong,
.iga-toc b {
    display: block;
    margin-bottom: 6px;
    font-size: 1.05em;
}
.iga-toc ul {
    margin: 0.4em 0 0;
    padding-left: 18px;
    list-style: none;
}
.iga-toc li {
    margin: 0.3em 0;
    position: relative;
    padding-left: 20px;
}
.iga-toc li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #293292;
    font-size: 0.85em;
}
.iga-toc a {
    text-decoration: none;
    color: var(--iga-accent-2);
}
.iga-toc a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    color: #293292;
}

/* ---------- CALLOUTY ---------- */
.iga-callout {
    background: #fff;
    padding: 18px 20px 18px 50px;
    border-radius: 12px;
    margin: 24px 0;
    position: relative;
    border: 1.5px solid var(--iga-border);
}
.iga-callout::before {
    position: absolute;
    left: 16px;
    top: 18px;
    font-size: 1.2em;
    line-height: 1;
}
.iga-callout strong:first-child,
.iga-callout b:first-child,
.iga-callout > h3:first-child {
    display: block;
    margin: 0 0 4px 0;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.iga-callout h3 {
    margin-top: 0;
    font-size: 0.95em;
}
.iga-callout ul,
.iga-callout ol {
    margin: 0.4em 0 0;
    padding-left: 1.2em;
}
.iga-callout p:last-child {
    margin-bottom: 0;
}

/* Wskazówka — żółty/amber */
.iga-callout--tip {
    border-color: #e5a90a;
    background: #fffbeb;
}
.iga-callout--tip::before {
    content: "💡";
}
.iga-callout--tip strong:first-child,
.iga-callout--tip b:first-child,
.iga-callout--tip > h3:first-child {
    color: #92610a;
}

/* Uwaga / Ostrzeżenie — czerwony */
.iga-callout--warn {
    border-color: #e04545;
    background: #fef2f2;
}
.iga-callout--warn::before {
    content: "⚠️";
}
.iga-callout--warn strong:first-child,
.iga-callout--warn b:first-child,
.iga-callout--warn > h3:first-child {
    color: #991b1b;
}

/* Inspiracja — zielony */
.iga-callout--inspiration {
    border-color: #16a34a;
    background: #f0fdf4;
}
.iga-callout--inspiration::before {
    content: "🌿";
}
.iga-callout--inspiration strong:first-child,
.iga-callout--inspiration b:first-child,
.iga-callout--inspiration > h3:first-child {
    color: #166534;
}

/* Pro / Porada — akcentowy */
.iga-callout--pro {
    border-color: #2a7;
    background: rgba(34, 170, 119, 0.06);
}
.iga-callout--pro::before {
    content: "✅";
}

/* Fakt / Ciekawostka — kolory jak spis treści */
.iga-callout--fact {
    border-color: #293292;
    background: #F4F9FC;
}
.iga-callout--fact::before {
    content: "ℹ️";
}
.iga-callout--fact strong:first-child,
.iga-callout--fact b:first-child,
.iga-callout--fact > h3:first-child {
    color: #293292;
}

/* Informacja — niebieski (breadcrumbs) */
.iga-callout--info {
    border-color: #293292;
    background: #F4F9FC;
}
.iga-callout--info::before {
    content: "ℹ️";
}
.iga-callout--info strong:first-child,
.iga-callout--info b:first-child,
.iga-callout--info > h3:first-child {
    color: #293292;
}

/* ---------- CHECKLIST ---------- */
.iga-checklist {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--iga-border);
    padding: 14px 16px;
    border-radius: var(--iga-radius);
    margin: var(--iga-gap) 0;
}
.iga-checklist ul {
    margin: 0.2em 0;
    padding-left: 0;
    list-style: none;
}
.iga-checklist li {
    margin: 0.4em 0;
    padding-left: 24px;
    position: relative;
}
.iga-checklist li::before {
    content: "☑";
    position: absolute;
    left: 0;
    color: var(--iga-accent);
    font-size: 1.1em;
}

/* ---------- TABELA ---------- */
.iga-table {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: var(--iga-radius);
    margin: var(--iga-gap) 0;
    -webkit-overflow-scrolling: touch;
}
.iga-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
    background: #fff;
}
.iga-table th {
    text-align: left;
    background: #fff;
    border-bottom: 2px solid var(--iga-accent);
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.92em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--iga-accent-2);
}
.iga-table td {
    border-bottom: 1px solid #c8cdd5;
    padding: 12px 14px;
    vertical-align: top;
}
.iga-table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}
.iga-table tr:last-child td {
    border-bottom: 0;
}
.iga-table tr:hover td {
    background: rgba(176, 141, 87, 0.06);
}

/* Tabele bez wrappera (bezpośrednio w stb-content) */
.stb-content > table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: var(--iga-gap) 0;
    border: 1px solid #e5e7eb;
    border-radius: var(--iga-radius);
    overflow: hidden;
}
.stb-content > table th {
    text-align: left;
    background: #fff;
    border-bottom: 2px solid var(--iga-accent);
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.92em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--iga-accent-2);
}
.stb-content > table td {
    border-bottom: 1px solid #c8cdd5;
    padding: 12px 14px;
    vertical-align: top;
}
.stb-content > table tbody tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.02);
}
.stb-content > table tr:last-child td {
    border-bottom: 0;
}
.stb-content > table tr:hover td {
    background: rgba(176, 141, 87, 0.06);
}

/* Tabela: mobile card layout */
@media (max-width: 700px) {
    .iga-table table {
        min-width: 0;
    }
    .iga-table table,
    .iga-table thead,
    .iga-table tbody,
    .iga-table th,
    .iga-table td,
    .iga-table tr {
        display: block;
    }
    .iga-table thead {
        display: none;
    }
    .iga-table tr {
        border-bottom: 1px solid var(--iga-border);
        padding: 12px 14px;
        margin-bottom: 8px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .iga-table td {
        border: 0;
        padding: 6px 0;
    }
    .iga-table td::before {
        content: attr(data-label) ": ";
        font-weight: 700;
        color: var(--iga-accent-2);
        display: inline;
    }
}

/* ---------- KPI GRID ---------- */
.iga-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: var(--iga-gap) 0;
}
.iga-kpi {
    border: 1px solid var(--iga-border);
    border-radius: var(--iga-radius);
    padding: 14px 16px;
    background: #fff;
    text-align: center;
}
.iga-kpi strong {
    display: block;
    font-size: 1.3em;
    color: var(--iga-accent);
    margin-bottom: 4px;
}
.iga-kpi span {
    font-size: 0.88em;
    color: #666;
}
@media (max-width: 700px) {
    .iga-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- FAQ (accordion: <details>/<summary>) ---------- */
.iga-faq {
    border: 1px solid #dce8f0;
    border-radius: var(--iga-radius);
    background: #fff;
    padding: 0;
    margin: 28px 0 var(--iga-gap);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(41, 50, 146, 0.06);
}
.iga-faq > h2,
.iga-faq > h3 {
    background: linear-gradient(135deg, #F4F9FC 0%, #eef3fa 100%);
    margin: 0;
    padding: 18px 24px;
    font-size: 1.15em;
    color: #293292;
    border-bottom: 2px solid #293292;
    letter-spacing: 0.01em;
}
.iga-faq > h3::before {
    content: "❓ ";
    font-size: 1em;
}

/* FAQ Accordion item */
details.iga-faq__item {
    border-top: 1px solid #e5e7eb;
    padding: 0;
    margin: 0;
}
details.iga-faq__item:first-of-type {
    border-top: 0;
}
details.iga-faq__item summary {
    cursor: pointer;
    font-size: 1.02em;
    font-weight: 600;
    color: var(--iga-accent-2);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    user-select: none;
    transition: background 0.15s, padding-left 0.15s;
}
details.iga-faq__item summary:hover {
    background: rgba(41, 50, 146, 0.04);
    padding-left: 28px;
}
details.iga-faq__item summary::-webkit-details-marker {
    display: none;
}
details.iga-faq__item summary::after {
    content: "+";
    font-size: 1.2em;
    font-weight: 600;
    color: #fff;
    background: #293292;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    flex-shrink: 0;
    margin-left: 12px;
    transition: background 0.2s, transform 0.2s;
}
details.iga-faq__item summary:hover::after {
    background: #1e2570;
    transform: scale(1.1);
}
details[open].iga-faq__item summary::after {
    content: "\2212";
    background: var(--iga-accent);
}
details[open].iga-faq__item summary {
    background: rgba(41, 50, 146, 0.03);
    border-bottom: 1px solid #e5e7eb;
}
details.iga-faq__item p,
details.iga-faq__item .iga-faq__answer {
    margin: 0;
    padding: 16px 24px;
    color: #444;
    line-height: 1.75;
    background: #fafbfd;
}
details.iga-faq__item ul,
details.iga-faq__item ol {
    margin: 0;
    padding: 10px 24px 16px 44px;
    color: #444;
    background: #fafbfd;
}
details.iga-faq__item li {
    margin: 4px 0;
}
details.iga-faq__item:last-child p,
details.iga-faq__item:last-child .iga-faq__answer,
details.iga-faq__item:last-child ul,
details.iga-faq__item:last-child ol {
    border-radius: 0 0 var(--iga-radius) var(--iga-radius);
}

/* Backward compat: old div.iga-faq__item format */
div.iga-faq__item {
    border-top: 1px solid var(--iga-border);
    padding-top: 12px;
    margin-top: 12px;
}
div.iga-faq__item:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
div.iga-faq__item h3 {
    margin: 0 0 6px;
    font-size: 1.05em;
    color: var(--iga-accent-2);
}
div.iga-faq__item p {
    margin: 0;
    color: #444;
}

/* ---------- HIGHLIGHT INLINE ---------- */
.iga-highlight {
    background: linear-gradient(180deg, transparent 55%, rgba(176, 141, 87, 0.28) 55%);
    padding: 0 0.15em;
    border-radius: 4px;
}

/* ---------- POWIĄZANE ARTYKUŁY ---------- */
.iga-related {
    border-top: 2px solid var(--iga-accent);
    padding: 18px 0 0;
    margin: 24px 0 var(--iga-gap);
}
.iga-related strong,
.iga-related b {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
    color: var(--iga-accent-2);
}
.iga-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.iga-related li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}
.iga-related li::before {
    content: "📄";
    position: absolute;
    left: 0;
    font-size: 0.9em;
}
.iga-related a {
    font-weight: 600;
}
.iga-related .iga-related__desc {
    display: block;
    font-size: 0.88em;
    color: #666;
    margin-top: 2px;
}

/* ---------- CTA BOX ---------- */
.iga-cta {
    background: var(--iga-soft);
    border: 2px solid var(--iga-accent);
    border-radius: var(--iga-radius);
    padding: 20px 24px;
    margin: var(--iga-gap) 0;
    text-align: center;
}
.iga-cta a {
    display: inline-block;
    background: var(--iga-accent);
    color: #fff;
    padding: 10px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    transition: background 0.2s;
}
.iga-cta a:hover {
    background: var(--iga-accent-2);
    color: #fff;
}

/* ---------- RANKING CARD ---------- */
.iga-ranking-card {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1.5px solid var(--iga-border);
    border-radius: var(--iga-radius);
    background: #fff;
    margin: 28px 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}
.iga-ranking-card:hover {
    box-shadow: 0 4px 16px rgba(176, 141, 87, 0.12);
}
.iga-ranking-card__badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    background: var(--iga-accent);
    color: #fff;
    font-size: 1.3em;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 var(--iga-radius) 0;
    z-index: 2;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.08);
}
.iga-ranking-card__image {
    flex: 0 0 280px;
    max-width: 280px;
    min-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f8f6;
}
.iga-ranking-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.iga-ranking-card:hover .iga-ranking-card__image img {
    transform: scale(1.03);
}
.iga-ranking-card__body {
    flex: 1 1 0;
    padding: 20px 24px;
    min-width: 0;
}
.iga-ranking-card__body h2 {
    margin: 0 0 8px;
    font-size: 1.25em;
    color: var(--iga-accent-2);
    line-height: 1.3;
}
.iga-ranking-card__body h3 {
    margin: 0 0 8px;
    font-size: 1.15em;
    color: var(--iga-accent-2);
}
.iga-ranking-card__price {
    font-size: 1.35em;
    font-weight: 800;
    color: var(--iga-accent);
    margin-bottom: 10px;
}
.iga-ranking-card__body p {
    margin: 0 0 12px;
    color: #444;
    line-height: 1.65;
}
.iga-ranking-card__body .iga-callout {
    margin: 12px 0 0;
    padding: 12px 14px 12px 42px;
    font-size: 0.93em;
}
.iga-ranking-card__body .iga-callout ul {
    margin: 6px 0 0;
    padding-left: 18px;
}
.iga-ranking-card__body .iga-callout li {
    margin: 3px 0;
}
.iga-ranking-card__cta {
    flex: 0 0 100%;
    padding: 0 24px 20px;
    display: flex;
    justify-content: center;
}
.iga-ranking-card__cta a {
    display: inline-block;
    background: var(--iga-accent);
    color: #fff;
    padding: 10px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95em;
    transition: background 0.2s, transform 0.15s;
}
.iga-ranking-card__cta a:hover {
    background: var(--iga-accent-2);
    color: #fff;
    transform: translateY(-1px);
}

/* Ranking card: responsive */
@media (max-width: 700px) {
    .iga-ranking-card {
        flex-direction: column;
    }
    .iga-ranking-card__image {
        flex: 0 0 auto;
        max-width: 100%;
        min-height: 180px;
        max-height: 260px;
    }
    .iga-ranking-card__body {
        padding: 16px 18px;
    }
    .iga-ranking-card__cta {
        padding: 0 18px 16px;
        justify-content: stretch;
    }
    .iga-ranking-card__cta a {
        width: 100%;
        text-align: center;
    }
}

/* ---------- RANKING DETAILS (50/50: Zalety + Cechy) ---------- */
.iga-ranking-details {
    display: flex;
    gap: 16px;
    margin: 14px 0 28px;
    align-items: stretch;
}
.iga-ranking-details > .iga-callout {
    flex: 1 1 50%;
    margin: 0;
    min-width: 0;
}
.iga-ranking-details > .iga-table {
    flex: 1 1 50%;
    margin: 0;
    min-width: 0;
}
.iga-ranking-details > .iga-table table {
    min-width: 0;
    height: 100%;
}
@media (max-width: 700px) {
    .iga-ranking-details {
        flex-direction: column;
    }
    .iga-ranking-details > .iga-callout,
    .iga-ranking-details > .iga-table {
        flex: 1 1 auto;
    }
}

/* Accordion heading (matches H2 size, no border) */
.stb-accordion__heading {
    margin: 0 0 0.75em;
    font-size: 1.4em;
    font-weight: 700;
}

/* ==========================================================================
   List Block
   ========================================================================== */

.stb-list {
    padding: 20px 24px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    margin: 1em 0;
}

.stb-list__heading {
    margin: 0 0 0.4em;
    font-size: 1.1em;
    font-weight: 700;
}

.stb-list__desc {
    margin: 0 0 0.75em;
    font-size: 0.95em;
    color: #555;
}

.stb-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stb-list__items li {
    padding: 4px 0;
    line-height: 1.6;
}

.stb-list__items li.checked {
    color: #1a1a1a;
}

/* ==========================================================================
   Flex Row (WPBakery vc_row_inner conversion)
   Preserves multi-column layout from inner rows without nested sections.
   ========================================================================== */

.stb-flex-row {
    display: flex;
    gap: var(--stb-gap);
    flex-wrap: wrap;
    align-items: flex-start;
}

.stb-flex-col {
    min-width: 0;
}

.stb-flex-col img {
    max-width: 100%;
    height: auto;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .stb-flex-row {
        flex-direction: column;
        gap: var(--stb-gap-sm);
    }

    .stb-flex-col {
        flex: 0 0 100% !important;
    }
}

/* Section background (from WPBakery css attribute) */
.stb-section {
    background-color: var(--stb-section-bg, transparent);
    padding-top: var(--stb-section-pt, 0);
    padding-bottom: var(--stb-section-pb, 0);
}

/* ==========================================================================
   Accessibility - Focus States (WCAG 2.1)
   ========================================================================== */

.stb-block--link:focus,
.stb-button:focus,
.stb-product__link:focus,
.stb-accordion__title:focus {
    outline: 2px solid var(--stb-focus-color, #2271b1);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .stb-block--link:focus,
    .stb-button:focus,
    .stb-product__link:focus,
    .stb-accordion__title:focus {
        outline: 3px solid CanvasText;
    }
}

/* ==========================================================================
   Reduced Motion (accessibility)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .stb-product:hover {
        transform: none;
    }

    .stb-button:hover {
        transform: none;
    }

    .stb-product:hover .stb-product__image img {
        transform: none;
    }
}
/* ==========================================================================
   WooCommerce Picture Element Fix
   Content_Filter wraps gallery <img> in <picture>; prevent baseline gap
   that causes colored lines (green/gray) under product images.
   ========================================================================== */

.woocommerce-product-gallery .stb-picture,
.woocommerce-product-gallery__image .stb-picture {
    display: block;
    line-height: 0;
    font-size: 0;
}

.woocommerce-product-gallery .stb-picture img {
    display: block;
}


/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .stb-content {
        max-width: 100% !important;
    }

    .stb-block--image {
        break-inside: avoid;
    }

    .stb-video-wrapper {
        display: none;
    }
}

/* ==========================================================================
   Short Description — Product Benefits (v3 — ultra-thin elegant)
   ========================================================================== */

.stb-benefits {
    --_icon-size: var(--stb-b-icon-size, 22px);
    --_gap: var(--stb-b-gap, 10px);
    --_padding: var(--stb-b-padding, 20px);
    --_radius: var(--stb-b-radius, 10px);
    --_icon-color: var(--stb-b-icon-color, #6B8C7F);
    --_text-color: var(--stb-b-text-color, #3D3D3D);
    --_bg: var(--stb-b-bg, #FAFAF7);
    --_border: var(--stb-b-border, #E8E4DE);

    display: flex;
    flex-direction: column;
    gap: var(--_gap);
    padding: var(--_padding);
    border-radius: var(--_radius);
    background: var(--_bg);
    border: 1px solid var(--_border);
    color: var(--_text-color);
    margin: 0 0 1.25em;
    font-family: inherit;
}

.stb-benefits__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stb-benefits__icon {
    flex-shrink: 0;
    width: var(--_icon-size);
    height: var(--_icon-size);
    color: var(--_icon-color);
    line-height: 0;
}

.stb-benefits__icon svg {
    width: 100%;
    height: 100%;
}

.stb-benefits__text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: var(--_text-color);
}
