/* ==========================================================================
   Dashboard de resultados — Índice de Alfabetización en Autocuidado
   Reutiliza la paleta de marca CLAPAS:
   teal #076a79 · cyan #60bfc1 · naranja #f7941e · coral #ed7c57
   ========================================================================== */

.dashboard-page {
  background: #f8fafc;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.meta-chip {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  color: #555;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.meta-chip strong { color: #076a79; }

/* Secciones del dashboard */
.dash-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 5%;
}

.dash-section h2 {
  font-size: 1.9rem;
  color: #076a79;
  margin-bottom: 0.4rem;
}

.dash-section .section-sub {
  color: #666;
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
}

/* Primera sección: deja espacio para el header fijo (120px) */
.dash-section--top { padding-top: 150px; }

.dash-section .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f7941e;
  margin-bottom: 0.6rem;
}

.dash-section h1 {
  font-size: 2.4rem;
  color: #076a79;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.wheel-section .section-sub { max-width: 900px; }

/* ---- Rueda interactiva del índice ---- */
.wheel-layout {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.wheel-box {
  flex: 1 1 420px;
  max-width: 560px;
  margin: 0 auto;
}

#wheelSvg {
  width: 100%;
  height: auto;
  display: block;
}

.wheel-seg {
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.wheel-seg:focus { outline: none; }

.wheel-dim .wheel-seg:not(.active) { opacity: 0.32; }

.wheel-seg.active { filter: brightness(1.06) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18)); }

.wheel-label {
  pointer-events: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wheel-info {
  --wi-accent: #076a79;
  position: relative;
  overflow: hidden;
  flex: 1 1 320px;
  min-width: 300px;
  align-self: stretch;
  min-height: 260px;
  padding: 2.25rem 2.1rem;
  border-radius: 20px;
  background: color-mix(in srgb, var(--wi-accent) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--wi-accent) 22%, #fff);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Aro decorativo que hace eco de la rueda */
.wheel-info::after {
  content: '';
  position: absolute;
  right: -55px;
  top: -55px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 20px solid var(--wi-accent);
  opacity: 0.12;
  pointer-events: none;
  transition: border-color 0.35s ease;
}

.wheel-info .wi-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--wi-accent);
  margin-bottom: 0.75rem;
}

.wheel-info .wi-kicker::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--wi-accent);
  flex-shrink: 0;
}

.wheel-info h3 {
  position: relative;
  font-size: 1.5rem;
  color: #1f2b2e;
  margin-bottom: 0.8rem;
  line-height: 1.22;
}

.wheel-info p {
  position: relative;
  color: #48555a;
  line-height: 1.7;
  font-size: 1rem;
  max-width: 46ch;
}

.wheel-info .wi-hint { color: #6b7280; font-style: italic; }

/* Cuerpo dinámico + enlace de descarga persistente */
.wi-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
}

.wi-doc {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--wi-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--wi-accent) 40%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.35s ease;
}

.wi-doc svg { flex-shrink: 0; }
.wi-doc em { font-style: italic; font-weight: 500; }

.wi-doc:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--wi-accent) 45%, transparent);
}

/* ---- KPIs ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.kpi-card {
  background: white;
  border-radius: 15px;
  padding: 1.75rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f4;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, #076a79, #f7941e);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.13);
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: #076a79;
  font-weight: 700;
  line-height: 1;
}

.kpi-num { font-size: 2.8rem; }
.kpi-unit { font-size: 1.4rem; color: #f7941e; }

.kpi-label {
  font-weight: 700;
  color: #1f2937;
  margin: 0.6rem 0 0.35rem;
  font-size: 1.05rem;
}

.kpi-desc {
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.5;
}

/* ---- Comparación por dominio ---- */
.chart-card {
  background: white;
  border-radius: 15px;
  padding: 1.75rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f4;
}

.overview-box {
  position: relative;
  height: 520px;
}

.chart-note {
  font-size: 0.82rem;
  color: #9ca3af;
  margin-top: 1rem;
  font-style: italic;
}

/* ---- Cita de fuente ---- */
.source-cite {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 5% 60px;
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.6;
  text-align: center;
}

.source-cite a { color: #076a79; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .overview-box { height: 620px; }
}

@media (max-width: 768px) {
  .dash-section--top { padding-top: 130px; }
  .dash-section h1 { font-size: 1.9rem; }
  .overview-box { height: 700px; }
}

@media (max-width: 480px) {
  .dash-section h1 { font-size: 1.6rem; }
  .kpi-num { font-size: 2.3rem; }
  .dash-section h2 { font-size: 1.5rem; }
}
