.list {
    padding-top: 80px;
}

.list__top {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.list__lead {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 24px;
    border-radius: 24px;
    background: #fff;
}

.list__lead-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list__label {
    color: #111122;
    font-size: 16px;
    line-height: 1.4;
}

.list__value,
.list__phone {
    color: #23716d;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    text-decoration: none;
}

.list__table {
    margin-top: 32px;
    border-radius: 32px;
    overflow: hidden;
    background: #fff;
}

.list__table-head,
.list__row-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1.6fr) repeat(calc(var(--list-columns, 3) - 1), minmax(0, 1fr));
    column-gap: 21px;
}
/* --list-columns теперь равен count($args['columns']) целиком, включая первую колонку */

.list__table-head {
    min-height: 84px;
    align-items: center;
    padding: 24px;
    background: linear-gradient(139deg, #23716d 6.7%, #1b5349 91%);
    color: #fff;
    font-size: 24px;
    line-height: 1.5;
    font-weight: 500;
}

.list__row:nth-child(odd) .list__row-panel {
    background: rgba(35, 113, 109, .05);
}

.list__row-trigger {
    display: none;
}

.list__row-panel {
    min-height: 119px;
    align-items: center;
}

/*
 * 'open' в $args управляет аккордеоном только в мобильной раскладке.
 * На десктопе таблица всегда развёрнута полностью, поэтому здесь принудительно
 * отменяем действие нативного [hidden], которым управляет общий accordion-скрипт.
 * Специфичность выше, чем у .list-accordion__panel[hidden] (0,2,0), поэтому
 * побеждает независимо от порядка подключения файлов.
 */
@media (min-width: 768px) {
    .list__table .list__row-panel[hidden] {
        display: grid !important;
    }
}

.list__cell {
    padding: 24px;
    color: #111122;
    font-size: 24px;
    line-height: 1.5;
}

.list__cell--name {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list__name {
    font-weight: 500;
}

.list__position {
    font-size: 18px;
    font-weight: 400;
}

/* Mobile layout from Figma node 189:6485 */
@media (max-width: 767px) {
    .list {
        padding-top: 48px;
    }

    .list__top {
        gap: 20px;
    }

    .list__lead {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
        border-radius: 24px;
    }

    .list__lead::before {
        content: 'Запишитесь на прием';
        display: block;
        color: #111122;
        font-size: 20px;
        line-height: 1.5;
        font-weight: 500;
    }

    .list__lead-item {
        gap: 12px;
    }

    .list__label {
        font-size: 16px;
        line-height: 1.4;
    }

    .list__value {
        font-size: 20px;
        line-height: 1.2;
    }

    .list__table {
        margin-top: 16px;
        border-radius: 0;
        overflow: visible;
        background: transparent;
    }

    .list__table-head {
        display: none;
    }

    .list__row {
        margin-bottom: 16px;
        border-radius: 16px;
        overflow: hidden;
        background: #fff;
    }

    .list__row:nth-of-type(odd) {
        background: #fff;
    }

    .list__row:nth-of-type(even) {
        background: rgba(35, 113, 109, .05);
    }

    .list__row-trigger {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 24px;
        align-items: start;
        min-height: 86px;
        padding: 16px;
        gap: 12px;
        border: 0;
        background: transparent;
        text-align: left;
        width: 100%;
    }

    .list__row-name {
        grid-column: 1;
        color: #111122;
        font-size: 18px;
        line-height: 1.5;
        font-weight: 600;
    }

    .list__row-position {
        grid-column: 1;
        color: #111122;
        font-size: 16px;
        line-height: 1.5;
        font-weight: 400;
    }

    .list__row-trigger .list-accordion__icon {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: end;
    }

    .list__row-panel {
        display: flex;
        flex-direction: column;
        gap: 16px;
        min-height: 0;
        padding: 0 16px 16px;
        background: transparent !important;
        border-top: 0;
    }

    .list__row-panel[hidden] {
        display: none !important;
    }

    .list__row.is-open .list__row-panel {
        padding-top: 0;
    }

    .list__row.is-open .list__row-panel::before {
        content: '';
        display: block;
        width: 100%;
        height: 1px;
        background: rgba(35, 113, 109, .1);
    }

    .list__cell {
        padding: 0;
        font-size: 18px;
        line-height: 1.5;
    }

    .list__cell--name {
        display: none;
    }

    .list__cell:not(.list__cell--name) {
        display: block;
    }

    .list__phone {
        font-size: 18px;
        font-weight: 400;
    }
}