/* Estilos para páginas del hub temático Ley Karin */

.hub-breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.hub-breadcrumb a {
  color: #4f46e5;
  text-decoration: none;
}

.hub-breadcrumb a:hover {
  text-decoration: underline;
}

.hub-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hub-meta a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.respuesta-directa {
  background: #f0f0fe;
  border: 1px solid #c9c8fb;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.respuesta-directa p {
  color: #1e1b4b;
  line-height: 1.7;
  font-size: 0.95rem;
}

.hub-article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.hub-article p,
.hub-article li {
  color: #475569;
  line-height: 1.7;
  font-size: 0.95rem;
}

.hub-article ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.75rem 0 1rem;
}

.hub-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.hub-table caption {
  text-align: left;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.hub-table th,
.hub-table td {
  border: 1px solid #e2e8f0;
  padding: 0.625rem 0.75rem;
  text-align: left;
}

.hub-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.hub-fuentes {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.hub-fuentes ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.hub-fuentes li {
  margin-bottom: 0.5rem;
}

.hub-fuentes a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hub-aviso {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #78350f;
  line-height: 1.6;
}

.hub-aviso a {
  color: #4f46e5;
  text-decoration: underline;
}

.hub-related {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.hub-related h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.hub-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hub-related li {
  margin-bottom: 0.5rem;
}

.hub-related a {
  color: #4f46e5;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hub-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #0d9488, #4f46e5);
  border-radius: 1rem;
  text-align: center;
  color: #fff;
}

.hub-cta p {
  color: #e0f2fe;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.hub-cta a {
  display: inline-block;
  background: #fff;
  color: #372f9c;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.hub-cta a:hover {
  background: #f0f0fe;
}

.hub-paso {
  scroll-margin-top: 5rem;
}

/* Datos y noticias: cifras oficiales y gráficos */

.hub-kicker {
  margin: 0 0 0.5rem;
  color: #4f46e5;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hub-note {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
}

.stat-tile {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.stat-tile .n {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-tile .l {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 0.35rem;
  line-height: 1.4;
}

.chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1rem;
  margin: 0.75rem 0 1.5rem;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.bar-label {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.35;
}

.bar-track {
  background: #eef2ff;
  border-radius: 4px;
  height: 0.9rem;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: #4f46e5;
}

.bar-fill.teal {
  background: #0d9488;
}

.bar-fill.slate {
  background: #64748b;
}

.bar-val {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  min-width: 4.5rem;
  text-align: right;
  font-weight: 600;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 3px;
  display: inline-block;
}

.stack-bar {
  display: flex;
  gap: 2px;
  height: 1.5rem;
  margin: 0.4rem 0 0.75rem;
  border-radius: 6px;
  overflow: hidden;
}

.stack-bar div {
  height: 100%;
}

.hub-table td.num,
.hub-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hub-table tr.total td {
  font-weight: 700;
  background: #f8fafc;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.news-card {
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 20px rgb(79 70 229 / 0.08);
}

.news-card .hub-kicker {
  margin-bottom: 0.35rem;
}

.news-card h2,
.hub-article .news-card h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.news-card p {
  margin: 0;
}

.news-card .news-cta {
  display: inline-block;
  margin-top: 0.85rem;
  color: #4f46e5;
  font-size: 0.875rem;
  font-weight: 600;
}

.news-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.news-highlights div {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
}

.news-highlights .n {
  display: block;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.news-highlights .l {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .bar-row {
    grid-template-columns: 1fr auto;
  }

  .bar-label {
    grid-column: 1 / -1;
  }

  .news-highlights {
    grid-template-columns: 1fr;
  }
}
