.dimaq-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.dimaq-table-title {
    margin: 40px 0 16px;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.25;
}

.dimaq-table-wrapper {
    width: 100%;
    margin: 24px 0;
}

.dimaq-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    background: var(--dimaq-background);
}

.dimaq-table tr:nth-child(even) td {
    background: var(--dimaq-background-alt);
}

.dimaq-table p:first-child,
.dimaq-table ul:first-child,
.dimaq-table ol:first-child {
    margin-top: 0;
}

.dimaq-table p:last-child,
.dimaq-table ul:last-child,
.dimaq-table ol:last-child {
    margin-bottom: 0;
}

.dimaq-table ul,
.dimaq-table ol {
    margin: 10px 0;
    padding-left: 24px;
}

.dimaq-table li + li {
    margin-top: 5px;
}


.dimaq-table a:hover,
.dimaq-table a:focus {
    text-decoration-thickness: 2px;
}

/* Перша таблиця: питання та відповідь */
.dimaq-faq-table td:first-child {
    width: 32%;
    background: var(--dimaq-heading-background);
    font-weight: 700;
}

.dimaq-faq-table tr:nth-child(even) td:first-child {
    background: var(--dimaq-heading-background);
}

/* Друга таблиця: порівняння Basic і Professional */
.dimaq-comparison-table td:first-child {
    width: 22%;
    font-weight: 700;
}

.dimaq-comparison-table td:nth-child(2),
.dimaq-comparison-table td:nth-child(3) {
    width: 39%;
}

.dimaq-comparison-table tr:first-child td {
    background: var(--dimaq-heading-background);
    font-weight: 700;
}

/* Планшети */
@media (max-width: 991px) {
    body {
        padding: 24px 16px;
    }

    .dimaq-table td,
    .dimaq-table th {
        padding: 14px 15px;
    }

    .dimaq-faq-table td:first-child {
        width: 36%;
    }
}

/* Мобільні пристрої */
@media (max-width: 767px) {
    body {
        padding: 18px 12px;
        font-size: 15px;
    }

    /*
     * FAQ перетворюється на вертикальні картки.
     * Горизонтальна прокрутка для неї не потрібна.
     */
    .dimaq-faq-table,
    .dimaq-faq-table tbody,
    .dimaq-faq-table tr,
    .dimaq-faq-table td {
        display: block;
        width: 100%;
    }

    .dimaq-faq-table {
        border: 0;
        table-layout: auto;
        background: transparent;
    }

    .dimaq-faq-table tr {
        margin: 0 0 16px;
        overflow: hidden;
        border: 1px solid var(--dimaq-border);
        border-radius: var(--dimaq-radius);
        background: var(--dimaq-background);
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    }

    .dimaq-faq-table td {
        border: 0;
        border-bottom: 1px solid var(--dimaq-border-light);
        padding: 14px 15px;
        background: var(--dimaq-background);
    }

    .dimaq-faq-table td:first-child,
    .dimaq-faq-table tr:nth-child(even) td:first-child {
        width: 100%;
        background: var(--dimaq-heading-background);
        font-size: 16px;
        line-height: 1.4;
    }

    .dimaq-faq-table td:last-child {
        border-bottom: 0;
    }

    /*
     * Порівняльна таблиця зберігає три колонки.
     * Контейнер створює горизонтальну прокрутку.
     */
    .dimaq-comparison-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .dimaq-comparison-table {
        min-width: 720px;
        table-layout: fixed;
    }

    .dimaq-comparison-table td {
        padding: 13px 14px;
    }

    .dimaq-comparison-table td:first-child {
        width: 160px;
        min-width: 160px;
        background: var(--dimaq-heading-background);
    }

    .dimaq-comparison-table td:nth-child(2),
    .dimaq-comparison-table td:nth-child(3) {
        width: 280px;
        min-width: 280px;
    }

    .dimaq-comparison-wrapper::after {
        display: block;
        margin-top: 8px;
        color: #666666;
        font-size: 13px;
        text-align: center;
        content: "Прокрутіть таблицю горизонтально";
    }
}

/* Дуже вузькі екрани */
@media (max-width: 420px) {
    .dimaq-faq-table td {
        padding: 13px;
    }

    .dimaq-table ul,
    .dimaq-table ol {
        padding-left: 20px;
    }
}