/* ==========================================================================
   CSS PRINCIPAL - INFOGRAFÍA INTERACTIVA (CRISIS DEL EMPLEO)
   Estilo editorial minimalista, premium, interactivo y responsivo.
   ========================================================================== */

:root {
  /* Paleta de Colores Requerida */
  --color-primary: #0070D7;      /* Color central - Azul vibrante */
  --color-teal: #00D6CC;         /* Compuesto - Turquesa (Género) */
  --color-gold: #D6B000;         /* Compuesto - Oro (Comida) */
  --color-orange: #D68500;       /* Compuesto - Naranja (Alquiler / Alerta) */
  --color-slate: #2B5881;        /* Compuesto - Azul Pizarra (Deudas) */

  /* Colores Neutros y de Interfaz */
  --color-bg-main: #FFFFFF;
  --color-bg-card: #F8F9FA;
  --color-bg-hover: #F0F4F8;
  --color-text-main: #1C2833;
  --color-text-muted: #566573;
  --color-border: #E5E8E8;
  --color-shadow: rgba(43, 88, 129, 0.06);
  --color-shadow-lg: rgba(43, 88, 129, 0.12);

  /* Fuentes del Sistema */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   RESETEOS Y ESTILOS BASE
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #EBF2F7;
  font-family: var(--font-body);
  color: var(--color-text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* ==========================================================================
   CONTENEDOR 4:3 (EL WIDGET EMBEBIBLE)
   ========================================================================== */

.info-card-container {
  width: 100%;
  max-width: 900px;
  height: 675px; /* Alto fijo exacto para evitar variaciones según la sección */
  background-color: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 12px 40px var(--color-shadow);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ==========================================================================
   ENCABEZADO EDITORIAL
   ========================================================================== */

.info-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
}

.header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-bg-card);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 50%;
  animation: pulse-ring 1.8s infinite ease-in-out;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.tag-text {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-slate);
}

.main-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.main-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.4;
}

/* ==========================================================================
   DIAPOSITIVAS Y SISTEMA DE TRANSICIONES
   ========================================================================== */

.info-content {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 20px;
  min-height: 0; /* Permite un correcto escalado en flex */
}

.info-slide {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  height: 100%;
  animation: slide-in-fade 0.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.info-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

@keyframes slide-in-fade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   DIAPOSITIVA 1: RADIOGRAFÍA DEL BOLSILLO
   ========================================================================== */

.pocket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  height: 100%;
  align-items: stretch;
}

.stat-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  cursor: help;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--color-shadow-lg);
  border-color: var(--color-slate);
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  background-color: rgba(0, 112, 215, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.badge-slate {
  color: var(--color-slate);
  background-color: rgba(43, 88, 129, 0.08);
}

.badge-warning {
  color: var(--color-orange);
  background-color: rgba(214, 133, 0, 0.08);
}

.badge-orange {
  color: var(--color-orange);
  background-color: rgba(214, 133, 0, 0.08);
}

.stat-visual {
  margin-bottom: 8px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  display: block;
}

#card-pocket-duration .stat-number {
  color: var(--color-slate);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

.card-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.card-desc strong {
  color: var(--color-text-main);
  font-weight: 600;
}

/* Donut de Ahorro Especial */
.text-center-card {
  align-items: center;
  text-align: center;
}

.text-center-card .card-badge {
  align-self: center;
}

.saving-gauge-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 10px;
}

.circular-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 2.8;
}

.circle {
  fill: none;
  stroke: var(--color-orange);
  stroke-width: 2.8;
  stroke-linecap: round;
  transition: stroke-dasharray 1.2s ease-out;
}

.gauge-percentage-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-number {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-orange);
}

.gauge-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* ==========================================================================
   ESTRUCTURA DE DOS COLUMNAS (DIAPOSITIVAS 2 Y 3)
   ========================================================================== */

.slide-two-cols {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 30px;
  height: 100%;
  align-items: center;
}

.col-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 8px 0 10px 0;
  color: var(--color-text-main);
}

.section-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.total-alert-box {
  background-color: rgba(214, 133, 0, 0.05);
  border-left: 3px solid var(--color-orange);
  padding: 12px;
  border-radius: 0 8px 8px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.alert-percent {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-orange);
  line-height: 1;
}

.alert-text {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.alert-text strong {
  color: var(--color-text-main);
}

/* ==========================================================================
   DIAPOSITIVA 2: COSTO DE VIDA (GRÁFICO DE BARRAS INTERACTIVO)
   ========================================================================== */

.col-chart {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.expense-bars-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.expense-row {
  cursor: pointer;
  outline: none;
  padding: 6px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.expense-row:hover, .expense-row:focus {
  background-color: var(--color-bg-hover);
}

.expense-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.expense-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.expense-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
}

/* Colores de texto específicos */
.text-orange { color: var(--color-orange); }
.text-gold { color: var(--color-gold); }
.text-slate { color: var(--color-slate); }
.text-gray { color: var(--color-text-muted); }
.text-blue { color: var(--color-primary); }
.text-teal { color: var(--color-teal); }

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  width: 0; /* Controlado dinámicamente con JS */
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fill-orange { background-color: var(--color-orange); }
.fill-gold { background-color: var(--color-gold); }
.fill-slate { background-color: var(--color-slate); }
.fill-gray { background-color: var(--color-text-muted); }
.fill-blue { background-color: var(--color-primary); }
.fill-teal { background-color: var(--color-teal); }

.expense-detail {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1.3;
}

/* Estado activo para el detalle colapsable */
.expense-row.active .expense-detail,
.expense-row:hover .expense-detail {
  max-height: 40px;
  opacity: 1;
  margin-top: 4px;
}

/* ==========================================================================
   DIAPOSITIVA 3: EL PLURIEMPLEO (TOGGLE REGIONAL/NACIONAL)
   ========================================================================== */

.toggle-control-container {
  margin-top: 10px;
}

.toggle-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 6px;
}

.toggle-group {
  display: inline-flex;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 4px;
  border-radius: 8px;
}

.toggle-btn {
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 112, 215, 0.2);
}

.display-flex-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

/* Control de Vistas Pluriempleo */
.pluri-data-view {
  display: none;
  opacity: 0;
  transform: scale(0.97);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pluri-data-view.active {
  display: flex;
  flex-direction: column;
  gap: 15px;
  opacity: 1;
  transform: scale(1);
}

.pluri-metric-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 15px;
}

.pluri-metric-card.highlight-card {
  border-left: 4px solid var(--color-primary);
}

.metric-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.metric-percent {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.metric-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-slate);
}

.metric-paragraph {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.metric-paragraph strong {
  color: var(--color-text-main);
}

.pluri-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pluri-mini-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-number {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-slate);
}

.mini-label {
  font-size: 0.65rem;
  line-height: 1.3;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Gráfico Comparativo de Historial (Nacional) */
.history-comparison-bar {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 15px;
}

.history-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.margin-top-sm {
  margin-top: 8px;
}

.history-line-bg {
  width: 100%;
  height: 6px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.history-line-fill {
  height: 100%;
  background-color: var(--color-text-muted);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease-out;
}

.history-line-fill.fill-blue {
  background-color: var(--color-primary);
}

.history-footer-text {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin-top: 10px;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
}

.history-footer-text strong {
  color: var(--color-text-main);
}

/* ==========================================================================
   DIAPOSITIVA 4: PERFIL DEL PLURIEMPLEADO (TABS INTERNAS)
   ========================================================================== */

.profile-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.profile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--color-border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.profile-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.profile-tabs {
  display: flex;
  gap: 8px;
}

.profile-tab {
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.profile-tab:hover {
  background-color: var(--color-bg-card);
}

.profile-tab.active {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
  color: var(--color-primary);
  font-weight: 700;
}

.profile-panels-content {
  flex-grow: 1;
  position: relative;
  min-height: 0;
}

.profile-panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  width: 100%;
  animation: slide-in-fade 0.4s forwards ease;
}

.profile-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Panel Género */
.gender-panel-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  height: 100%;
}

.gender-column {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.gender-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.gender-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.gender-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.gender-track {
  width: 100%;
  height: 10px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gender-bar {
  height: 100%;
  border-radius: 4px;
}

.gender-description {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.gender-description strong {
  color: var(--color-text-main);
}

/* Panel Edad */
.age-chart-container {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 18px;
}

.age-main-highlight {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin-bottom: 15px;
}

.age-main-highlight strong {
  color: var(--color-text-main);
}

.age-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-bar-row {
  display: grid;
  grid-template-columns: 24% 64% 12%;
  align-items: center;
  gap: 10px;
}

.age-label-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.age-bar-bg {
  height: 12px;
  background-color: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.age-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.age-percent-val {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--color-text-main);
}

/* Panel Rol Hogar */
.role-panel-layout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.role-metric {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.role-stat {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
}

.role-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 6px;
}

.role-description {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* ==========================================================================
   CONTROLES DE NAVEGACIÓN (STEPPER)
   ========================================================================== */

.info-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  margin-top: 10px;
  position: relative;
}

.info-nav::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 5%;
  right: 5%;
  height: 2px;
  background-color: var(--color-border);
  z-index: 1;
}

.nav-step {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 2;
  width: 25%;
  outline: none;
}

.step-circle {
  width: 32px;
  height: 32px;
  background-color: #FFFFFF;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.step-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}

/* Estados de Stepper */
.nav-step.active .step-circle {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 112, 215, 0.3);
  transform: scale(1.1);
}

.nav-step.active .step-label {
  color: var(--color-primary);
  font-weight: 700;
}

.nav-step:hover:not(.active) .step-circle {
  border-color: var(--color-slate);
  color: var(--color-slate);
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.info-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  margin-top: 15px;
}

.footer-source {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

.footer-source strong {
  color: var(--color-text-main);
  font-weight: 600;
}

.footer-actions {
  display: flex;
  gap: 10px;
}

.btn-action-embed {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-action-embed:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-slate);
  border-color: var(--color-slate);
}

.embed-icon {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   MODAL EMBED
   ========================================================================== */

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(28, 40, 51, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background-color: #FFFFFF;
  border-radius: 12px;
  width: 90%;
  max-width: 460px;
  padding: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text-main);
}

.btn-close-modal {
  border: none;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: var(--color-text-main);
}

.modal-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 15px;
}

.code-box-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

#embed-code-textarea {
  flex-grow: 1;
  height: 70px;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px;
  font-family: monospace;
  font-size: 0.65rem;
  color: var(--color-slate);
  resize: none;
  outline: none;
}

.btn-copy-code {
  background-color: var(--color-primary);
  color: white;
  border: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-copy-code:hover {
  background-color: #005bb5;
}

.copy-success-message {
  font-size: 0.7rem;
  font-weight: 700;
  color: #27AE60;
  text-align: right;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.copy-success-message.show {
  opacity: 1;
}

/* ==========================================================================
   ADAPTABILIDAD RESPONSIVA (MÓVILES)
   ========================================================================== */

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .info-card-container {
    aspect-ratio: auto; /* Anulamos proporción rígida en móvil para evitar colapsos */
    height: auto;
    min-height: 580px;
    padding: 20px;
  }

  .main-title {
    font-size: 1.4rem;
  }

  .main-subtitle {
    font-size: 0.78rem;
  }

  /* Diapositiva 1 móvil */
  .pocket-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left !important;
  }

  .stat-card .card-badge {
    position: static;
    margin-bottom: 4px;
  }

  .stat-visual {
    margin-bottom: 0;
  }

  .stat-number {
    font-size: 2.2rem;
    min-width: 80px;
  }

  .saving-gauge-container {
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .gauge-number {
    font-size: 1rem;
  }

  .gauge-label {
    font-size: 0.45rem;
  }

  .card-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .card-desc {
    font-size: 0.75rem;
  }

  /* Diapositivas de Dos Columnas móvil */
  .slide-two-cols {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .col-chart {
    padding: 12px;
  }

  .section-heading {
    font-size: 1.25rem;
    margin: 4px 0 6px 0;
  }

  .section-desc {
    font-size: 0.78rem;
    margin-bottom: 10px;
  }

  .total-alert-box {
    padding: 8px 12px;
  }

  .alert-percent {
    font-size: 1.4rem;
  }

  /* Perfil móvil */
  .profile-nav-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .profile-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .profile-tab {
    padding: 5px 8px;
    font-size: 0.72rem;
    flex-grow: 1;
    text-align: center;
  }

  .gender-panel-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gender-column {
    padding: 12px;
  }

  .gender-value {
    font-size: 1.3rem;
  }

  .age-bar-row {
    grid-template-columns: 32% 54% 14%;
  }

  .role-panel-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .role-metric {
    padding: 12px;
  }

  .role-stat {
    font-size: 1.8rem;
  }

  /* Footer móvil */
  .info-footer {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }

  /* Stepper móvil */
  .info-nav::before {
    top: 26px;
  }

  .step-circle {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
  }

  .step-label {
    font-size: 0.65rem;
  }
}
