/* Tablas */

.tabla {
  text-align: left;
}

.tabla .columna {
  display: grid;
  grid-template-rows: clamp(3.25rem, 3.162rem + 0.3756vw, 3.5rem) 1fr;
}

.tabla .columna:nth-child(1) {
  margin-bottom: 0;
}

.tabla :is(h3, h4) {
  padding-bottom: 0;
  padding: 0.8rem 1.25rem;
  background: #007ebf;
  color: white;
  border-radius: 0.875rem;
  margin-inline: 0.25rem;
}

@media (width < 668px) {
  .tabla {
    display: block !important;
    margin-inline: -0.5rem;
    box-shadow: none;
  }

  .tabla ul {
    padding: 0.81rem 0.81rem 1.2rem !important;
  }

  .tabla .columna:nth-child(1) {
    margin-bottom: 1.5rem;
  }
}

@media (width < 980px) {
  .et_pb_module:has(.tabla.carrusel) {
    width: 100vw; /* Set width to 100% of viewport width */
    margin-left: calc((100% - 100vw) / 2) !important; /* Compensate for the centered row */
    margin-right: calc((100% - 100vw) / 2) !important; /* Compensate for the centered row */
  }

  .tabla.carrusel {
    display: flex !important;
    gap: 0;
    margin-inline: 0;
  }

  .tabla.carrusel .columna {
    flex-shrink: 0;
    width: 22rem !important;
  }

  .tabla.carrusel .columna:nth-child(1) {
    margin-bottom: 0;
  }
}

/* agregue .et_pb_row para mayor especifidad */

.et_pb_row .tabla ul {
  margin-top: 0.25rem;
  padding: 0.75rem 1.81rem 1.2rem 1.2rem;
  border-radius: 0.875rem;
  margin-inline: 0.25rem;
  background: white;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.12);
}

.et_pb_row .tabla li {
  list-style: none;
}

li.marca-de-verificacion:before {
  content: url('https://audifonos.net/wp-content/uploads/2023/10/marca-de-verificacion.svg');
  display: inline-block;
  padding-right: clamp(0.5rem, 0.412rem + 0.3756vw, 0.75rem);
  transform: translateY(0.25rem);
}

li.marca-de-cruz:before {
  content: url('https://audifonos.net/wp-content/uploads/2023/10/marca-de-cruz.svg');
  display: inline-block;
  padding-right: clamp(0.5rem, 0.412rem + 0.3756vw, 0.75rem);
  transform: translateY(0.25rem);
}

.tabla .et_pb_button {
  font-size: clamp(1rem, 0.9338rem + 0.2824vw, 1.188rem);
  text-align: center;
}

.tabla li a.et_pb_button {
  color: #ffffff !important;
}

.tabla li.boton {
  padding-block: clamp(1rem, 0.6479rem + 1.5023vw, 2rem) !important;
  text-align: center;
}

.tabla .et_pb_button,
.tabla .et_pb_button:hover {
  padding: 0.65em 1em !important;
}

/* Tabla de los mejores aparatos auditivos */

.tabla-de-mejores-aparatos-auditivos table {
  border-collapse: separate;
}

.tabla-de-mejores-aparatos-auditivos table tr th,
.tabla-de-mejores-aparatos-auditivos table tr td {
  text-align: center;
  min-width: clamp(11.5rem, 10.3116rem + 5.0704vw, 14.875rem);
  padding: 1rem 0.25rem;
  border-right: 1px solid #bbb;
  border-bottom: 1px solid #bbb;
  line-height: 150%;
}

.tabla-de-mejores-aparatos-auditivos table tr th:first-child {
  border-left: 1px solid #bbb;
  min-width: clamp(9rem, 7.2835rem + 7.3239vw, 13.875rem);
}

.tabla-de-mejores-aparatos-auditivos table thead tr th {
  color: #6e706f;
  font-weight: 600;
  line-height: 135.49%;
  border-top: solid 1px #bbb;
  font-size: clamp(0.875rem, 0.787rem + 0.3756vw, 1.125rem);
}

.tabla-de-mejores-aparatos-auditivos table thead tr:first-child th:first-child {
  border-top-left-radius: 0.4375rem;
}

.tabla-de-mejores-aparatos-auditivos table tr:first-child th:last-child {
  border-top-right-radius: 0.4375rem;
}

.tabla-de-mejores-aparatos-auditivos table thead strong {
  display: block;
  color: #101010;
}

.tabla-de-mejores-aparatos-auditivos h3 + p {
  font-size: clamp(0.55rem, 0.4796rem + 0.3005vw, 0.75rem);
  line-height: 114.99%; /* 0.86244rem */
  padding-top: 0.25rem;
  font-weight: 600;
}

.tabla-de-mejores-aparatos-auditivos tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='marca'] ~ td {
  padding-block: clamp(1.5rem, 0.7958rem + 3.0047vw, 3.5rem);
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='marca'] ~ td img {
  max-width: 80%;
  max-height: clamp(2.5rem, 2.3239rem + 0.7512vw, 3rem);
  object-fit: contain;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='aparato-auditivo'] ~ td img {
  height: clamp(4.5rem, 3.6197rem + 3.7559vw, 7rem);
  object-fit: contain;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='tipo-de-audifono'] ~ td strong {
  display: block;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='grado-de-satisfaccion'],
.tabla-de-mejores-aparatos-auditivos tbody th[data-type='grado-de-satisfaccion'] ~ td {
  background-color: #256aaf;
  color: white;
  font-weight: 600;
  padding-block: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='grado-de-satisfaccion'] ~ td strong {
  font-size: clamp(2.375rem, 1.9789rem + 1.6901vw, 3.5rem);
  display: block;
  padding-bottom: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='precio'],
.tabla-de-mejores-aparatos-auditivos tbody th[data-type='precio'] ~ td {
  background-color: rgba(255, 185, 66, 0.3);
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='precio'] {
  color: #1e59bc;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='precio'] ~ td {
  color: #313131;
  font-size: 1.25rem;
  font-weight: 600;
  padding-block: 1.5rem;
}

.tabla-de-mejores-aparatos-auditivos tbody th[data-type='precio'] ~ td a {
  margin-top: 0.75rem !important;
}

@media (width < 768px) {
  .tabla-de-mejores-aparatos-auditivos .et_pb_text_inner {
    width: 100% !important;
    overflow-x: scroll;
    padding-inline: 1rem;
    scrollbar-width: none;
  }

  .tabla-de-mejores-aparatos-auditivos .et_pb_text_inner::-webkit-scrollbar {
    display: none;
  }

  .tabla-de-mejores-aparatos-auditivos .et_pb_button:before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.0' width='12' height='12' viewBox='0 0 512.000000 512.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(0.000000,512.000000) scale(0.100000,-0.100000)' fill='%23000000' stroke='none'%3E%3Cpath d='M0 4865 l0 -255 257 -2 256 -3 436 -920 c240 -506 447 -944 460 -972 l24 -52 -180 -308 c-160 -275 -182 -319 -203 -398 -54 -211 -10 -386 131 -525 31 -31 83 -70 116 -88 123 -65 30 -62 1751 -62 l1562 0 0 255 0 255 -1488 0 c-1631 0 -1532 -4 -1532 57 0 15 51 122 112 239 l113 213 995 3 995 3 65 22 c116 40 202 109 263 211 19 31 236 422 482 867 246 446 456 819 466 830 43 49 51 132 19 218 -23 60 -67 108 -125 134 -38 17 -136 18 -1970 21 l-1931 2 -114 255 -115 255 -422 0 -423 0 0 -255z'/%3E%3Cpath d='M1380 997 c-269 -91 -416 -379 -329 -645 56 -171 224 -313 406 -344 260 -43 523 139 579 401 18 89 18 134 -5 222 -46 180 -182 321 -360 373 -81 24 -211 21 -291 -7z'/%3E%3Cpath d='M3940 997 c-269 -91 -416 -379 -329 -645 56 -171 224 -313 406 -344 260 -43 523 139 579 401 18 89 18 134 -5 222 -46 180 -182 321 -360 373 -81 24 -211 21 -291 -7z'/%3E%3C/g%3E%3C/svg%3E") !important;
    margin-left: -1.5em !important;
  }

  .tabla-de-mejores-aparatos-auditivos .et_pb_button {
    font-size: 0.85rem !important;
  }
}

/* Tabla comparativa de precios */

.tabla-comparativa-de-precios table {
  border-collapse: separate;
}

.tabla-comparativa-de-precios table tr th,
.tabla-comparativa-de-precios table tr td {
  text-align: center;
  min-width: clamp(12rem, 11.6479rem + 1.5023vw, 13rem);
  padding: 1rem 0.25rem;
  border-top: 1px solid #d2d2d2;
  border-right: 1px solid #d2d2d2;
  line-height: 150%;
}

.tabla-comparativa-de-precios table tr th:first-child {
  min-width: clamp(9rem, 8.2958rem + 3.0047vw, 11rem);
  border-left: 1px solid #d2d2d2;
}

.tabla-comparativa-de-precios table thead tr th {
  border-top: solid 1px #d2d2d2;
  background-color: #256aaf;
  color: white;
  font-size: clamp(0.875rem, 0.787rem + 0.3756vw, 1.125rem);
  font-weight: 600;
  line-height: 135.49%;
}

.tabla-comparativa-de-precios table thead tr:first-child th:first-child {
  border-top-left-radius: 0.4375rem;
  border-left: 1px solid #1e59bc;
}

.tabla-comparativa-de-precios table tr:first-child th:last-child {
  border-top-right-radius: 0.4375rem;
  border-right: 1px solid #1e59bc;
}

.tabla-comparativa-de-precios h3 + p {
  color: #1e59bc;
  padding-top: 0.25rem;
  font-size: clamp(0.55rem, 0.4796rem + 0.3005vw, 0.75rem);
  line-height: 114.99%; /* 0.86244rem */
  font-weight: 600;
  font-style: italic;
}

.tabla-comparativa-de-precios tbody th[data-type='precio'] ~ td {
  font-size: 0.625rem;
  font-style: italic;
  line-height: 161.49%;
}

.tabla-comparativa-de-precios tbody th[data-type='precio'] ~ td strong {
  display: block;
  font-size: 1rem;
  font-style: normal;
  line-height: 161.49%; /* 1.61488rem */
  color: #3c3d38;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] {
  background-color: rgba(255, 185, 66, 0.3);
  border-top: 1px solid #ffb942 !important;
  border-left: 1px solid #ffb942 !important;
  border-bottom: 1px solid #ffb942 !important;
  border-right: none !important;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td {
  background-color: rgba(255, 185, 66, 0.3);
  color: #6e706f;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 135.49%; /* 1.18556rem */
  border-right: none !important;
  border-top: 1px solid #ffb942 !important;
  border-bottom: 1px solid #ffb942 !important;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td strong {
  display: block;
  color: #101010;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td img {
  height: clamp(4.5rem, 3.6197rem + 3.7559vw, 5rem);
  display: block;
  mix-blend-mode: multiply;
  margin-inline: auto;
  padding-block: 0.5rem;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td .precio {
  color: #313131;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 161.49%;
  padding-bottom: 0.5rem;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td .et_pb_button {
  font-size: 0.75rem !important;
  min-width: clamp(10rem, 9.6479rem + 1.5023vw, 11rem);
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td .et_pb_button:before {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.0' width='13' height='13' viewBox='0 0 512.000000 512.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(0.000000,512.000000) scale(0.100000,-0.100000)' fill='%23000000' stroke='none'%3E%3Cpath d='M0 4865 l0 -255 257 -2 256 -3 436 -920 c240 -506 447 -944 460 -972 l24 -52 -180 -308 c-160 -275 -182 -319 -203 -398 -54 -211 -10 -386 131 -525 31 -31 83 -70 116 -88 123 -65 30 -62 1751 -62 l1562 0 0 255 0 255 -1488 0 c-1631 0 -1532 -4 -1532 57 0 15 51 122 112 239 l113 213 995 3 995 3 65 22 c116 40 202 109 263 211 19 31 236 422 482 867 246 446 456 819 466 830 43 49 51 132 19 218 -23 60 -67 108 -125 134 -38 17 -136 18 -1970 21 l-1931 2 -114 255 -115 255 -422 0 -423 0 0 -255z'/%3E%3Cpath d='M1380 997 c-269 -91 -416 -379 -329 -645 56 -171 224 -313 406 -344 260 -43 523 139 579 401 18 89 18 134 -5 222 -46 180 -182 321 -360 373 -81 24 -211 21 -291 -7z'/%3E%3Cpath d='M3940 997 c-269 -91 -416 -379 -329 -645 56 -171 224 -313 406 -344 260 -43 523 139 579 401 18 89 18 134 -5 222 -46 180 -182 321 -360 373 -81 24 -211 21 -291 -7z'/%3E%3C/g%3E%3C/svg%3E") !important;
}

.tabla-comparativa-de-precios tbody th[data-type='modelo'] ~ td:last-child {
  border-right: 1px solid #ffb942 !important;
}

@media (width < 768px) {
  .tabla-comparativa-de-precios .et_pb_text_inner {
    width: 100% !important;
    overflow-x: scroll;
    scrollbar-width: none;
  }

  .tabla-comparativa-de-precios .et_pb_text_inner::-webkit-scrollbar {
    display: none;
  }
}

/* Tabla de definiciones */
.tabla-de-definiciones {
  margin-top: clamp(1.75rem, 1.4859rem + 1.1268vw, 2.5rem);
}

.tabla-de-definiciones div {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
  padding-bottom: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
  align-items: baseline;
}

.tabla-de-definiciones p {
  margin-top: 0;
}

@media (max-width: 667px) {
  .tabla-de-definiciones div {
    grid-template-columns: 1.25fr 3fr;
  }
}

/* Tabla de horarios de centros auditivos */

.et_pb_column:has(.tabla-de-horario-de-centros) h4 {
  padding-left: 0.5rem;
  padding-bottom: clamp(0.75rem, 0.662rem + 0.3756vw, 1rem);
}

.tabla-de-horario-de-centros {
  border: none !important;
}

.tabla-de-horario-de-centros td {
  border-top: 1px solid #e4e7eb !important;
}

.tabla-de-horario-de-centros tr:nth-child(1) td {
  border-top: 1px solid #848484 !important;
}

.tabla-de-horario-de-centros tr:last-child td {
  border-bottom: 1px solid #e4e7eb !important;
}

.tabla-de-horario-de-centros td:nth-child(1) {
  color: #404040;
  font-weight: 700;
}

.tabla-de-horario-de-centros td:nth-child(2) {
  color: #848484;
}

/* Tablas de precios de audifonos */

.tabla-de-precios-de-audifonos-segun-modelo {
  & table {
    font-size: 15px;
    border: none !important;
    margin: 0 !important;
  }

  & thead {
    border: 1px solid #007ebf !important;
  }

  & th {
    background: #007ebf !important;
    color: #fff !important;
    height: 60px;
  }

  & td {
    height: 40px;
    text-wrap: balance;
    padding: 0.5rem 1rem !important;

    &:not(:first-child) {
      text-align: center;
    }
  }

  & tr:nth-child(even) td {
    background-color: #fafafa;
  }

  /* estilos agregados para mostrar los headers completos */

  & th {
    &:first-child {
      min-width: 180px !important;
      width: 180px !important;
    }

    &:nth-child(2) {
      min-width: 180px !important;
      width: 180px !important;
    }

    &:nth-child(3) {
      min-width: 200px !important;
      width: 200px !important;
    }
    &:last-child {
      min-width: 220px !important;
      width: 220px !important;
    }

    & .gridjs-th-content {
      text-wrap: balance;
      text-align: center;
    }

    & button.gridjs-sort {
      position: absolute;
      top: 50%;
      right: 1rem;
      transform: translateY(-50%);
    }
  }

  @media (width < 600px) {
    & .gridjs-summary {
      font-size: 1rem;
      padding-bottom: 1rem;
    }
  }
}

@media (width < 980px) {
  .et_pb_row:has(.tabla-de-precios-de-audifonos-segun-modelo) {
    width: calc(100% + 2px);
    padding-left: 1rem !important;
  }
  & :is(td, th.gridjs-th) {
    width: 170px !important;
  }
}

/* estilos agregados para ocultar nodo de texto (imposibilidad de eliminar contenido de celda antiguo en tablaPreciosDeAudifonos.js) detras de anchor */

.tabla-de-precios-de-audifonos-segun-modelo {
  & td:first-child {
    position: relative;
    padding-block: 0;
    font-weight: 500;
    color: #1e59bc;
    text-align: center;

    & a {
      position: absolute;
      inset: 0;
      display: grid;
      place-content: center;
      padding: 0.5rem 1rem;
    }
  }

  & tr:nth-child(odd) td:first-child a {
    background-color: #ffffff !important;
  }

  & tr:nth-child(even) td:first-child a {
    background-color: #fafafa !important;
  }

  & .gridjs-message {
    color: #101010 !important;
  }
}
