.ntgy-block-data-table {
  box-sizing: border-box;
  min-width: 0;
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

/* The preceding module owns the section gap; do not add a second one. */
:is(.entry-content, .ntgy-news-section) > :where([class*="ntgy-block-"]):not(.ntgy-block-hero-distributiva):not(.ntgy-block-hero-quick-access):not(.ntgy-block-home-hero-v1) + .ntgy-block-data-table,
.editor-styles-wrapper .is-root-container > :where([class*="ntgy-block-"]):not(.ntgy-block-hero-distributiva):not(.ntgy-block-hero-quick-access):not(.ntgy-block-home-hero-v1) + .ntgy-block-data-table,
.editor-styles-wrapper .is-root-container > :where([data-type^="acf/ntgy-"]):not([data-type="acf/ntgy-hero-distributiva"]):not([data-type="acf/ntgy-hero-quick-access"]):not([data-type="acf/ntgy-home-hero-v1"]) + [data-type="acf/ntgy-data-table"] .ntgy-block-data-table {
  padding-block-start: 0;
}

.ntgy-block-data-table *,
.ntgy-block-data-table *::before,
.ntgy-block-data-table *::after {
  box-sizing: border-box;
}

.ntgy-block-data-table__inner {
  width: 100%;
  min-width: 0;
}

.ntgy-block-data-table__frame {
  min-width: 0;
  padding: 1rem;
  border-radius: var(--ntgy-radius-md);
  background: var(--ntgy-color-gray-10);
}

.ntgy-block-data-table__surface {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  padding-block: 1rem;
  border-radius: var(--ntgy-radius-md);
  background: var(--ntgy-color-white-true);
}

.ntgy-block-data-table__table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  color: var(--ntgy-color-blue-80);
  text-align: left;
}

.ntgy-block-data-table__head-cell,
.ntgy-block-data-table__cell {
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid var(--ntgy-color-gray-40);
  color: var(--ntgy-color-blue-80);
  background: var(--ntgy-color-white);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

/*
 * `anywhere` lowers the min-content width, so keep short values unbroken.
 * The minimum shrinks with the column count so the table never overflows.
 */
.ntgy-block-data-table__table :is(th, td) {
  min-width: min(7.5rem, calc(100cqi / var(--ntgy-data-table-columns, 4)));
}

.ntgy-block-data-table__head-cell {
  font-size: 0.875rem;
  font-weight: 600;
}

.ntgy-block-data-table__head-cell:first-child,
.ntgy-block-data-table__cell:first-child {
  width: 35%;
  padding-inline: 3rem;
}

.ntgy-block-data-table--cols-2 .ntgy-block-data-table__head-cell:first-child,
.ntgy-block-data-table--cols-2 .ntgy-block-data-table__cell:first-child {
  width: 50%;
}

/* Wide tables only stay tabular from 1024px; below that they stack. */
@media (min-width: 1024px) {
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__head-cell:first-child,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell:first-child {
    width: 25%;
    padding-inline: 1rem;
  }
}

.ntgy-block-data-table__cell--row-header {
  color: var(--ntgy-color-blue-80);
  font-weight: 600;
}

.ntgy-block-data-table__cell-label {
  display: none;
}

.ntgy-block-data-table__cell-value a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ntgy-block-data-table__cell-value a:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: 3px;
}

/* Explicit ACF design option; the default retains the original mobile cards. */
.ntgy-block-data-table--documentary .ntgy-block-data-table__surface {
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.ntgy-block-data-table--documentary .ntgy-block-data-table__surface:focus-visible {
  outline: 2px solid var(--ntgy-color-blue-80);
  outline-offset: 3px;
}

.ntgy-block-data-table--documentary .ntgy-block-data-table__table {
  min-width: max(40rem, calc(var(--ntgy-data-table-columns, 4) * 9rem));
}

/* Keep accessible empty headings inside the horizontal scrolling surface. */
.ntgy-block-data-table--documentary .ntgy-block-data-table__head-cell {
  position: relative;
}

.ntgy-block-data-table--documentary .ntgy-block-data-table__head-cell:first-child,
.ntgy-block-data-table--documentary .ntgy-block-data-table__cell:first-child {
  width: 25%;
  padding-inline: 1rem;
}

.ntgy-block-data-table__placeholder {
  margin: 0;
  padding: 2rem;
  border: 1px dashed var(--ntgy-color-gray-40);
  border-radius: var(--ntgy-radius-md);
  color: var(--ntgy-color-blue-80);
  background: var(--ntgy-color-gray-10);
  text-align: center;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ntgy-block-data-table:not(.is-wide-table, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__head-cell,
  .ntgy-block-data-table:not(.is-wide-table, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell {
    padding: 0.75rem;
  }

  .ntgy-block-data-table:not(.is-wide-table, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__head-cell:first-child,
  .ntgy-block-data-table:not(.is-wide-table, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell:first-child {
    padding-inline: 1rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__frame {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__surface {
    overflow: hidden;
    padding: 0;
    border-radius: 0.75rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table thead,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table tbody,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table tr,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table th,
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table thead tr {
    position: relative;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__head-cell {
    padding: 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--ntgy-color-gray-40);
    color: var(--ntgy-color-blue-80);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table.has-row-headers .ntgy-block-data-table__head-cell:not(:first-child),
  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table:not(.has-row-headers) .ntgy-block-data-table__head-cell {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table:not(.has-row-headers) .ntgy-block-data-table__table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__table :is(th, td) {
    min-width: 0;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__head-cell:first-child {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell:first-child {
    width: 100%;
    padding-inline: 0;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.75rem;
    border-bottom: 1px solid var(--ntgy-color-gray-40);
    background: var(--ntgy-color-white);
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.75rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell:not(.ntgy-block-data-table__cell--row-header) {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell--row-header {
    color: var(--ntgy-color-blue-100);
    font-size: 0.875rem;
    font-weight: 600;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell-label {
    display: block;
    flex: 0 0 auto;
    max-width: 50%;
    color: var(--ntgy-color-blue-80);
    font-weight: 600;
    overflow-wrap: break-word;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell-value {
    flex: 1 1 0;
    min-width: 0;
    color: var(--ntgy-color-blue-100);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell--row-header .ntgy-block-data-table__cell-value {
    display: block;
    text-align: left;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).is-wide-table .ntgy-block-data-table__cell.is-empty {
    display: none;
  }
}

@media (max-width: 767px) {
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__frame {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__surface {
    overflow: hidden;
    padding: 0;
    border-radius: 0.75rem;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table,
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table thead,
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table tbody,
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table tr,
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table th,
  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table thead tr {
    position: relative;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__head-cell {
    padding: 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--ntgy-color-gray-40);
    color: var(--ntgy-color-blue-80);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)).has-row-headers .ntgy-block-data-table__head-cell:not(:first-child),
  .ntgy-block-data-table:not(.has-row-headers, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__head-cell {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .ntgy-block-data-table:not(.has-row-headers, :where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__table :is(th, td) {
    min-width: 0;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__head-cell:first-child {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .ntgy-block-data-table:not(:where(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell:first-child {
    width: 100%;
    padding-inline: 0;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__row {
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.75rem;
    border-bottom: 1px solid var(--ntgy-color-gray-40);
    background: var(--ntgy-color-white);
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.75rem;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell:not(.ntgy-block-data-table__cell--row-header) {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell--row-header {
    color: var(--ntgy-color-blue-100);
    font-size: 0.875rem;
    font-weight: 600;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell-label {
    display: block;
    flex: 0 0 auto;
    max-width: 50%;
    color: var(--ntgy-color-blue-80);
    font-weight: 600;
    overflow-wrap: break-word;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell-value {
    flex: 1 1 0;
    min-width: 0;
    color: var(--ntgy-color-blue-100);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell--row-header .ntgy-block-data-table__cell-value {
    display: block;
    text-align: left;
  }

  :where(.ntgy-block-data-table:not(.ntgy-block-data-table--documentary)) .ntgy-block-data-table__cell.is-empty {
    display: none;
  }
}

/* Explicit ACF opt-out: retain column associations without a visible header band. */
.ntgy-block-data-table--hidden-header .ntgy-block-data-table__table thead {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ntgy-block-data-table--hidden-header .ntgy-block-data-table__cell-label {
  display: none !important;
}
