/* Tabela usług i cen – Usługa (tekst), Zawiera (WYSIWYG), Cena w Polsce, Cena netto, Cena w Holandii */

/* Wrapper Gutenberg/ACF – margines jest tu (nie na <section>), stąd „nic się nie zmieniało” */
.wp-block-acf-pricing-table {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.vca-pricing-table {
    background: #fff;
    margin-top: 0;
    margin-block-start: 0;
    /* 70px góra/dół przy bazie 16px */
    padding: 4.375rem 0;
}

.vca-pricing-table__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.vca-pricing-table__table {
    display: grid;
    grid-template-columns: 24% 35% 20% 21%;
    gap: 0;
    border: 1px solid #e1e6eb;
    border-radius: 4px;
    overflow: hidden;
}

.vca-pricing-table__header {
    display: contents;
}

.vca-pricing-table__header .vca-pricing-table__cell {
    width: 100%;
    background: #23c767;
    color: #fff;
    margin: 0;
    line-height: 1;
    font-size: inherit;
    font-weight: 400;
    padding: 2rem 1.7rem;
    border: none;
    display: flex;
    justify-content: flex-start;
    text-align: left;
    align-items: center;
}

/* Nagłówki kolumn – semantycznie h5, rozmiar 1rem */
.vca-pricing-table__header .vca-pricing-table__header-title {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.25;
    color: #fff;
}

.vca-pricing-table__row {
    display: contents;
}

/* Na desktopie row-detail nie tworzy osobnego boksu – komórki biorą udział w gridzie tabeli */
.vca-pricing-table__row-detail {
    display: contents;
}

.vca-pricing-table__cell {
    padding: 15px;
    display: flex;
    text-align: left;
}

.vca-pricing-table__row .vca-pricing-table__cell {
    border-bottom: 1px solid #e1e6eb;
}

.vca-pricing-table__row:last-child .vca-pricing-table__cell {
    border-bottom: none;
}

/* Komórki „Usługa” w wierszach danych (nie nagłówek) – mniejsza czcionka; treść jest w span.service-name */
.vca-pricing-table__row .vca-pricing-table__cell--service {
    box-sizing: border-box;
    color: rgb(14, 6, 32);
    cursor: default;
    font-family: type-36, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    padding-right: 1.5rem;
}

.vca-pricing-table__row .vca-pricing-table__cell--service .vca-pricing-table__service-name {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.vca-pricing-table__service-name {
    display: flex;
    align-items: center;
}

.vca-pricing-table__cell--includes {
    margin: 0;
    font-size: 1.6rem;
    line-height: 2.2rem;
    color: #838c95;
}

.vca-pricing-table__table > .vca-pricing-table__row:nth-child(2) .vca-pricing-table__cell--includes {
    padding-top: 1.2rem;
}

.vca-pricing-table__includes {
    margin: 0;
    padding: 0;
}

.vca-pricing-table__includes li,
.vca-pricing-table__includes p,
.vca-pricing-table__includes div {
    box-sizing: border-box;
    color: rgb(131, 140, 149);
    font-family: "type-36", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 22px;
}

.vca-pricing-table__includes li {
    display: list-item;
}

.vca-pricing-table__includes p,
.vca-pricing-table__includes div {
    display: block;
}

.vca-pricing-table__includes p {
    margin: 0 0 0.5rem;
    padding: 0;
}

.vca-pricing-table__includes p:last-child {
    margin-bottom: 0;
}

.vca-pricing-table__includes a {
    color: #23c767;
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
}

.vca-pricing-table__includes a:hover {
    text-decoration: underline;
}

.vca-pricing-table__cell--price-pln,
.vca-pricing-table__cell--price-eur {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    justify-content: center;
    text-align: left;
}

.vca-pricing-table__header .vca-pricing-table__cell--price-pln,
.vca-pricing-table__header .vca-pricing-table__cell--price-eur {
    text-align: left;
}

.vca-pricing-table__price-main {
    color: #23c767;
    font-weight: 400;
    font-size: 1.5625rem;
    line-height: 1.6rem;
    text-align: left;
}

.vca-pricing-table__price-netto {
    box-sizing: border-box;
    color: rgb(131, 140, 149);
    display: block;
    font-family: "type-36", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    padding-top: 3px;
    text-align: left;
}

@media (max-width: 992px) {
    .vca-pricing-table__table {
        grid-template-columns: 1fr 1fr;
    }

    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(3),
    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(4) {
        display: none;
    }

    .vca-pricing-table__row,
    .vca-pricing-table__row-detail {
        display: contents;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--service {
        grid-column: 1;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--includes {
        grid-column: 2;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-pln {
        grid-column: 1;
        grid-row: span 1;
        border-bottom: 1px solid #e1e6eb;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-eur {
        grid-column: 2;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-pln::before {
        content: 'Cena w Polsce';
        display: block;
        font-size: 1.2rem;
        color: #838c95;
        margin-bottom: 0.25rem;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-eur::before {
        content: 'Cena w Holandii';
        display: block;
        font-size: 1.2rem;
        color: #838c95;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 640px) {
    .vca-pricing-table,
    .ipb-module.ipb-blocks.ipb-blocks--1-in-row.vca-price-list {
        padding: 1rem 0;
    }

    .vca-pricing-table__table {
        grid-template-columns: 1fr;
    }

    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(1),
    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(2),
    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(3),
    .vca-pricing-table__header .vca-pricing-table__cell:nth-child(4) {
        display: none;
    }

    .vca-pricing-table__row {
        display: block;
        grid-template-columns: unset;
        border-bottom: 1px solid #e1e6eb;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--service {
        grid-column: unset;
        cursor: pointer;
        user-select: none;
    }

    .vca-pricing-table__row-detail {
        display: block;
        grid-column: unset;
        grid-template-columns: unset;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .vca-pricing-table__row.is-open .vca-pricing-table__row-detail {
        max-height: 1200px;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--includes,
    .vca-pricing-table__row .vca-pricing-table__cell--price-pln,
    .vca-pricing-table__row .vca-pricing-table__cell--price-eur {
        grid-column: unset;
        border-bottom: none;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-pln::before {
        content: 'Cena w Polsce';
        display: block;
        font-size: 1.2rem;
        color: #838c95;
        margin-bottom: 0.25rem;
    }

    .vca-pricing-table__row .vca-pricing-table__cell--price-eur::before {
        content: 'Cena w Holandii';
        display: block;
        font-size: 1.2rem;
        color: #838c95;
        margin-bottom: 0.25rem;
    }

    .vca-pricing-table__row:last-child {
        border-bottom: none;
    }
}
