/* modern-css.css — versión final centrada con espacio entre tablas y sin separación interna en móvil */

/* ==========================================
   Todo el estilo solo se aplica a .tarifas-wrapper
   ========================================== */

.tarifas-wrapper {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #222;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 15px;
  box-sizing: border-box;
  background-color: transparent; /* antes era #f8f9fb */
}

/* Encabezados */
.tarifas-wrapper .rpi-header {
  background-color: #ffea72;
  color: #000;
  text-align: center;
  font-weight: 700;
  padding: 14px 8px;
  border: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
  font-size: 16px;
  margin-bottom: 0;
}

.tarifas-wrapper .header-lp {
  background-color: #ffd69e;
  color: #000;
  text-align: center;
  font-weight: 700;
  padding: 14px 8px;
  border: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
  font-size: 16px;
  margin-bottom: 0;
}

.tarifas-wrapper .header-nac {
  background-color: #bde3ff;
  color: #000;
  text-align: center;
  font-weight: 700;
  padding: 14px 8px;
  border: 1px solid #ddd;
  border-radius: 10px 10px 0 0;
  font-size: 16px;
  margin-bottom: 0;
}

/* Tabla base */
.tarifas-wrapper table.tarifas {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-radius: 0 0 10px 10px;
  overflow: hidden;

  /* ?? espacio vertical entre tablas */
  margin: 0 auto 20px auto;
}

.tarifas-wrapper table.tarifas thead {
  display: none;
}

.tarifas-wrapper table.tarifas td {
  padding: 14px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 15px;
  white-space: nowrap;
}

.tarifas-wrapper table.tarifas td:nth-child(3) {
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-overflow: clip;
}

.tarifas-wrapper table.tarifas td[data-label="Descripción"] {
  display: block;
  text-align: left !important;
  font-weight: bold;
  white-space: normal;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
}

/* Secciones */
.tarifas-wrapper table.tarifas tr.section-title td {
  background-color: #e9ecef;
  font-weight: bold;
  text-align: left;
  color: #333;
  padding: 12px 15px;
  border-bottom: 2px solid #d0d4d9;
}

/* Filas clickeables */
.tarifas-wrapper table.tarifas tr.clickable {
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.tarifas-wrapper table.tarifas tr.clickable:hover {
  background-color: #fff7cc;
}

/* Notas */
.tarifas-wrapper table.tarifas tr.section-note td {
  background-color: #fffef2;
  color: #444;
  font-size: 14px;
  font-style: italic;
  text-align: left;
  padding: 10px 15px;
  border-left: 4px solid #ffd500;
  border-right: 4px solid #ffd500;
  border-bottom: 1px solid #eee;
  margin: 0 5px;
  border-radius: 6px;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Texto destacado */
.tarifas-wrapper .destacado-tramite-negro {
  color: #000 !important;
  font-weight: bold !important;
}

.tarifas-wrapper .destacado-tramite-rojo {
  color: #d60000 !important;
  font-size: 0.9em !important;
  font-weight: bold !important;
}

/* Nota final */
.tarifas-wrapper table.tarifas tr.nota-final td {
  text-align: center;
  color: #d60000;
  font-weight: bold;
  font-size: 13px;
  padding: 10px;
  background-color: #fff;
  border-top: 2px solid #eee;
}

/* Versión móvil */
@media (max-width: 700px) {
  .tarifas-wrapper table.tarifas,
  .tarifas-wrapper table.tarifas tbody,
  .tarifas-wrapper table.tarifas tr,
  .tarifas-wrapper table.tarifas td {
    display: block;
    width: 100%;
  }

  /* Cada tabla separada de la siguiente */
  .tarifas-wrapper table.tarifas {
    margin-bottom: 18px;
  }

  /* Sin separación interna entre filas dentro de la misma tabla */
  .tarifas-wrapper table.tarifas tr {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 0; /* elimina separación entre título y datos */
  }

  .tarifas-wrapper table.tarifas tr.section-title td {
    background-color: #e9ecef;
    border: none;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
    margin: 0;
  }

  .tarifas-wrapper table.tarifas td {
    border: none;
    display: block;
    text-align: left;
    white-space: normal;
    padding: 6px 15px;
    margin: 0;
  }

  .tarifas-wrapper table.tarifas td[data-label="Descripción"] {
    display: block !important;
    text-align: left !important;
    font-weight: bold !important;
    white-space: normal !important;
    overflow: visible;
    padding-top: 4px; /* más cerca del título */
    padding-bottom: 2px;
    margin: 0;
  }

  .tarifas-wrapper table.tarifas td:nth-child(3) {
    display: block !important;
    text-align: left !important;
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: visible !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-top: 2px;
    padding-bottom: 10px;
    margin: 0;
  }

  .tarifas-wrapper .rpi-header,
  .tarifas-wrapper .header-lp,
  .tarifas-wrapper .header-nac {
    margin-top: 20px;
  }
}

/* ==============================
   ALINEACIÓN Y CENTRADO FINAL
   ============================== */

.tarifas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.tarifas-wrapper .container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto !important;
  padding: 0 10px !important;
  box-sizing: border-box;
}

.tarifas-wrapper .rpi-header,
.tarifas-wrapper .header-lp,
.tarifas-wrapper .header-nac {
  width: 100%;
  max-width: 1000px;
  text-align: center;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.tarifas-wrapper table.tarifas {
  margin: 0 auto 20px auto !important; /* centrado + espacio entre tablas */
  width: 100%;
  max-width: 1000px;
}

@media (min-width: 768px) {
  .tarifas-wrapper {
    padding-left: calc((100vw - 1000px) / 2);
    padding-right: calc((100vw - 1000px) / 2);
  }
}

.invisible-keyword {
  display: none;
}