.filtros-container {
}
.filtros-container .filtro {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}

.filtros-container .filtro .card {
  flex: 0 0 calc(11.1% - 10px); /* 100% / 9 columnas - espacio */
  margin: 5px;
  text-align: center;
  transition: transform 0.3s;
  opacity: 0.25;
}
.filtros-container .filtro .card.active {
  opacity: 1;
}
.filtros-container .filtro .card:hover {
  transform: scale(1.05);
}
.filtros-container .filtro .card.descargar {
  background-color: #012c50;
  opacity: 1;
}
.filtros-container .filtro .card.descargar a {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  height: 100%;
}
.filtros-container .filtro .card.descargar span {
  font-size: 10px;
  font-weight: 500;
  color: #fff;
  line-height: normal;
}

.data-container h2 {
  font-weight: 500;
  font-size: 24px;
}

.data-container .image-placeholder img {
  width: 100%;
}

.data-container .descripcion {
  margin-top: 30px;
  margin-bottom: 40px;
  text-align: justify;
}

.data-container .descripcion p {
  line-height: 20px;
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .filtros-container .filtro .card {
    flex: 0 0 calc(25% - 10px); /* 100% / 4 columnas - espacio */
  }
}

@media (max-width: 480px) {
  .filtros-container .filtro .card {
    flex: 0 0 calc(33.3% - 10px); /* 100% / 3 columnas - espacio */
  }
}

/* TAB METAS */

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid #e5243b;
  color: #e5243b;
  padding: 8px 15px;
  cursor: pointer;
  background-color: white;
  font-size: 14px;
  border-radius: 0px;
}
.tab:hover {
  background-color: #e5243b;
}

.tab.active {
  background-color: #e5243b;
  color: white;
}
.metas,
.indicadores,
.estadisticas {
  margin-bottom: 40px;
}

/* Indicadores */
.meta-header,
.indicador-header {
  background-color: #e5243b;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
}

.meta-header h3,
.indicador-header h3 {
  margin: 0 !important;
  font-weight: normal;
  color: white;
  font-size: 16px;
}
.indicadores > h3 {
  font-size: 18px;
}

.content-box {
  background-color: #f2f2f2;
  padding: 20px;
  border-radius: 3px;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

.indicadores .content-box {
  display: flex;
  flex-wrap: wrap;
}

.content-box .content-header {
  font-size: 18px;
  line-height: normal;
  margin: 5px 0 20px 0;
  width: 100%;
}

.content-box .content-datos {
  width: 50%;
  margin: 10px 0;
}

.content-box .content-notas {
  width: 100%;
  margin: 10px 0;
}

.content-box .content-dato-title {
  font-size: 14px;
}

.content-box .content-dato-description {
  font-weight: 700;
  line-height: 24px;
}

.meta-content,
.indicador-content,
.footnote {
  display: none;
}

.metas .content-box {
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
}

.meta-content.active,
.indicador-content.active,
.footnote.active {
  display: block;
}

.boton-indicadores,
.boton-indicadores:hover,
.boton-indicadores:active,
.boton-indicadores:focus {
  display: flex;
  background-color: white;
  border: solid 1px #0f69c4;
  color: #0f69c4;
  border-radius: 0px;
}

.boton-indicadores img {
  margin-right: 10px;
}

.indicador-header .enlaces {
  display: flex;
  align-items: center;
  gap: 30px;
  color: white;
}

@media (max-width: 480px) {
  .indicador-header {
    padding: 12px;
  }
  .indicador-header .enlaces {
    gap: 10px;
    font-size: 12px;
  }
}

.indicador-header a,
.indicador-header a:hover,
.indicador-header a:focus,
.indicador-header a:active {
  color: white;
  text-decoration: none;
  display: flex;
  gap: 10px;
}

.indicador-header img {
  width: 14px;
}

/* Estadísticas */
.estadisticas h3 {
  font-size: 18px;
}

.estadisticas table {
  border-collapse: collapse;
  width: 100%;
}

.estadisticas th,
.estadisticas td {
  padding: 10px;
  text-align: center;
}
.estadisticas th:first-child {
  font-weight: bold !important;
  white-space: nowrap;
}

.estadisticas th {
  background-color: #0f69c4;
  color: white;
  font-weight: normal !important;
}

.estadisticas tr:nth-child(odd) td {
  background-color: #fff !important;
}

.estadisticas tr:nth-child(even) td {
  background-color: #cfe1f3 !important;
}

.estadisticas .footnote {
  font-size: 14px;
  margin-top: 10px;
  color: #555;
}

.text-nowrap {
  white-space: nowrap !important;
}
.width-categoria {
  width: 200px !important;
}
.width-antes-2015 {
  width: 80px !important;
}
.text-bold {
  font-weight: bold !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .estadisticas th,
  .estadisticas td {
    padding: 8px 6px;
    font-size: 14px;
  }
  .estadisticas th:first-child {
    white-space: normal;
  }
  .width-categoria {
    width: 100px !important;
  }
}

@media (max-width: 480px) {
  .estadisticas th,
  .estadisticas td {
    padding: 6px 4px;
    font-size: 12px;
  }
  .width-categoria {
    width: 80px !important;
  }
}

/* Gráficos */
.chart-container {
  width: 100%;
  margin: 20px auto;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  position: relative;
}
.chart-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}
.chart-footer {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}
.chart-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  height: 400px;
}
/* Estilos para la leyenda personalizada */
.custom-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid #eee;
  margin-top: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  margin-right: 10px;
  margin-bottom: 5px;
  cursor: pointer;
}
.legend-color {
  width: 20px;
  height: 3px;
  margin-right: 5px;
  display: inline-block;
}
.legend-text {
  font-size: 12px;
  color: #333;
}
.legend-checkbox {
  margin-right: 5px;
}
/* Estilo para categorías */
.legend-category {
  width: 100%;
  font-weight: bold;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  color: #555;
}
/* Botones selectores */
.indicator-selector {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.indicator-btn {
  padding: 8px 12px;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.indicator-btn:hover {
  background-color: #e1e1e1;
}
.indicator-btn.active {
  background-color: #4a86e8;
  color: white;
  border-color: #2a66c8;
}
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  font-size: 16px;
  color: #333;
}
.indicator-selector {
  display: none;
}

/* Estilo normal (sin carga) */
#datos {
  opacity: 1;
  filter: blur(0);
  transition: all 0.3s ease;
}
.loading-blur {
  opacity: 0.6 !important;
  filter: blur(2px) !important;
  pointer-events: none !important;
  transition: all 0.3s ease !important;
}
