/* ==========================================================================
   ESTILOS PARA EL PANEL DE ESTADÍSTICAS (100% PURE DOM)
   ========================================================================== */

.container-estadistic {
    width: 100%;
    padding: 2rem 5%; /* Un padding relativo para que no pegue a los bordes */
    background-color: #F6F6F6;
    min-height: 100vh;
}

.stats-dashboard {
    text-decoration: none;
}

/* ==========================================================================
   CABECERA DEL HUB
   ========================================================================== */
.hub-header {
    margin-bottom: 3.5rem;
    padding-top: 1.5rem;
}

.btn-back-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: white;
    background-image: linear-gradient(to right, #00c6ff 0%, #0072ff 51%, #00c6ff 100%);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 2px 6px -2px rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-back-stats:hover  {
    transform: translateX(-4px);
	color: white;
}
.stats-hub-title-page {
	font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.0;
	
}

.stats-hub-subtitle-page {
	font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    color: #6c757d;
    max-width: 800px;
    margin: 0;
    line-height: 1.6;
}
.stats-hub-title {
	font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.stats-hub-subtitle {
	font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    color: #6c757d;
    max-width: 800px;
    margin: 0;
    line-height: 1.6;
}
.stats-hub-desc{
	font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    color: #6c757d;
    max-width: 800px;
    margin: 0;
    line-height: 1.6;	
}
.stats-btn {
  font-size: 16px;
  padding: 1em 3.3em;
  cursor: pointer;
  transform: perspective(200px) rotateX(15deg);
  color: white;
  font-weight: 900;
  border: none;
  border-radius: 5px;
  background: linear-gradient(
    0deg,
    rgba(63, 94, 251, 1) 0%,
    rgba(70, 135, 252, 1) 100%
  );
  box-shadow: rgba(63, 94, 251, 0.2) 0px 40px 29px 0px;
  will-change: transform;
  transition: all 0.3s;
  border-bottom: 2px solid rgba(70, 135, 252, 1);
}

.stats-btn:hover {
  transform: perspective(180px) rotateX(30deg) translateY(2px);
}

.stats-btn:active {
  transform: perspective(170px) rotateX(36deg) translateY(5px);
}
/* ==========================================================================
   CONTENEDOR DE GRÁFICOS (ECHARTS)
   ========================================================================== */
.boque-estadistica {
    
	margin-bottom: 45px;
}
.titular-bloque{
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #bedbf4;
    text-align: center;
    background-color: #007BFF;
    padding: 7px;
    padding-bottom: 15px;
    padding-top: 15px;
    margin: 0px;
border-radius: 15px 15px 0px 0px;
	
}
/*Población de países extranjeros.*/
.nav{
	background-color: white;
	    border: 1px solid rgba(0, 0, 0, .125);
		    box-shadow: 0 0 20px #a2a0a0;
}
.mb-3, .my-3 {
     margin-bottom: 0rem !important; 
}

/*Población de países extranjeros.*/

.count-title {
    font-size: 40px;
    font-weight: normal;
    margin-top: 10px;
    margin-bottom: 0;
    text-align: center;
}
.iconocovid{
	color: #4ad1e5;
}
.espacioentre{
	height: 40px;
	display: block;
	
}


@media (max-width: 768px) {
	
	
	.stats-hub-title-page{
		text-align: center !important;
	}
	.stats-hub-subtitle-page{
		text-align: center !important;
	}
	.stats-hub-title{
		text-align: center !important;
	}
	.stats-hub-subtitle{
		text-align: center !important;
	}
	.stats-hub-desc{
		text-align: center !important;
	}
    .chart-container {
        min-height: 400px;
    }
	.stats-hub-card{
		margin-bottom: 30px;
	}
	.stats-hub-icon {
        margin-left: auto;
        margin-right: auto;
        width: 160px !important;
        height: 120px !important;
        font-size: 5.8rem !important;
		color: #9cb7e4 !important;
	}	
	.stats-btn{
    margin-left: auto;
    margin-right: auto;		
	}
}

/* ==========================================================================
   Fin del CSS
   ========================================================================== */

.stats-hub-grid {
    gap: 2rem 0;
}

/* Hub Cards Premium Design */
.stats-hub-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.stats-hub-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-hub-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stats-hub-card:hover::before {
    opacity: 1;
}

.stats-hub-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.stats-hub-card:hover .stats-hub-icon {
    transform: scale(1.1);
    background: #3b82f6;
    color: #ffffff;
}

.stats-hub-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.stats-hub-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 1.2rem;
    display: flex;
    justify-content: flex-end;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-hub-card {
        padding: 1.5rem;
    }
}



/* Estilos para el men lateral de elecciones (PURE DOM) */
.elecciones-menu-lista { list-style: none; padding: 0; margin: 0; }
.elecciones-menu-lista li { border-bottom: 1px solid #eee; }
.elecciones-menu-lista li:last-child { border-bottom: none; }
.elecciones-menu-lista li a { display: block; padding: 10px 15px; color: #4e73df; text-decoration: none; font-weight: 500; transition: all 0.2s; }
.elecciones-menu-lista li a:hover { background-color: #f8f9fc; color: #2e59d9; }
.elecciones-menu-lista li.active a { background-color: #17A2B8; color: white; }


/* Centrar textos del menú histórico en versión móvil */
@media (max-width: 768px) {
    .elecciones-menu-lista li a {
        text-align: center;
    }
}

/* Boton Subir Arriba */
.btn-scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none; /* Oculto por defecto */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.btn-scroll-top:hover {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(-3px);
}
